tModLoader v2023.01
A mod to make and play Terraria mods
Terraria.Lighting Class Reference

Static Public Member Functions

static void AddLight (int i, int j, float r, float g, float b)
 
static void AddLight (int i, int j, int torchID, float lightAmount)
 
static void AddLight (Vector2 position, float r, float g, float b)
 
static void AddLight (Vector2 position, int torchID)
 
static void AddLight (Vector2 position, Vector3 rgb)
 
static float Brightness (int x, int y)
 
static void Clear ()
 
static Color GetColor (int x, int y)
 
static Color GetColor (int x, int y, Color oldColor)
 
static Color GetColor (Point tileCoords)
 
static Color GetColor (Point tileCoords, Color originalColor)
 
static void GetColor4Slice (int centerX, int centerY, ref Color[] slices)
 
static void GetColor4Slice (int x, int y, ref Vector3[] slices)
 
static void GetColor9Slice (int centerX, int centerY, ref Color[] slices)
 
static void GetColor9Slice (int x, int y, ref Vector3[] slices)
 
static Color GetColorClamped (int x, int y, Color oldColor)
 
static void GetCornerColors (int centerX, int centerY, out VertexColors vertices, float scale=1f)
 
static Vector3 GetSubLight (Vector2 position)
 
static void Initialize ()
 
static void LightTiles (int firstX, int lastX, int firstY, int lastY)
 
static void NextLightMode ()
 

Static Public Attributes

static readonly LegacyLighting LegacyEngine = new LegacyLighting(Main.Camera)
 
static int OffScreenTiles = 45
 

Properties

static float GlobalBrightness [get, set]
 
static LightMode Mode [get, set]
 
static bool NotRetro [get]
 
static bool UpdateEveryFrame [get]
 
static bool UsingNewLighting [get]