![]() |
tModLoader v2022.09
A mod to make and play Terraria mods
|
Public Member Functions | |
TileDrawing (TilePaintSystemV2 paintSystem) | |
void | AddSpecialLegacyPoint (int x, int y) |
void | AddSpecialLegacyPoint (Point p) |
void | ClearCachedTileDraws (bool solidLayer) |
void | Draw (bool solidLayer, bool forRenderTargets, bool intoRenderTargets, int waterStyleOverride=-1) |
void | EmitLivingTreeLeaf (int i, int j, int leafGoreType) |
Emits a single living tree leaf or other gore instance directly below the target tile. With a 50% chance, also emits a second leaf or other gore instance directly to the side of the target tile, dependent on wind direction. Used by vanilla's two types of Living Trees, from which this method and its two submethods get their collective name. More... | |
void | GetTileDrawData (int x, int y, Tile tileCache, ushort typeCache, ref short tileFrameX, ref short tileFrameY, out int tileWidth, out int tileHeight, out int tileTop, out int halfBrickHeight, out int addFrX, out int addFrY, out SpriteEffects tileSpriteEffect, out Texture2D glowTexture, out Rectangle glowSourceRect, out Color glowColor) |
Texture2D | GetTileDrawTexture (Tile tile, int tileX, int tileY) |
Texture2D | GetTileDrawTexture (Tile tile, int tileX, int tileY, int paintOverride) |
void | GetTileOutlineInfo (int x, int y, ushort typeCache, ref Color tileLight, ref Texture2D highlightTexture, ref Color highlightColor) |
float | GetWindCycle (int x, int y, double windCounter) |
Fetches the degree to which wind would/should affect a tile at the given location. More... | |
float | GetWindGridPush (int i, int j, int pushAnimationTimeTotal, float pushForcePerFrame) |
Determines how much wind should affect a theoretical tile at the target location on the current update tick. More... | |
float | GetWindGridPushComplex (int i, int j, int pushAnimationTimeTotal, float totalPushForce, int loops, bool flipDirectionPerLoop) |
Determines how much wind should affect a theoretical tile at the target location on the current update tick. More complex version of GetWindGridPush. More... | |
void | PostDrawTiles (bool solidLayer, bool forRenderTargets, bool intoRenderTargets) |
void | PreDrawTiles (bool solidLayer, bool forRenderTargets, bool intoRenderTargets) |
void | PrepareForAreaDrawing (int firstTileX, int lastTileX, int firstTileY, int lastTileY, bool prepareLazily) |
void | PreparePaintForTilesOnScreen () |
bool | ShouldSwayInWind (int x, int y, Tile tileCache) |
Determines whether or not the tile at the given location should be able to sway in the wind. More... | |
void | Update () |
Static Public Member Functions | |
static int | GetTreeVariant (int x, int y) |
static bool | IsTileDangerous (int tileX, int tileY, Player player) |
Checks if a tile at the given coordinates counts towards tile coloring from the Dangersense buff. Vanilla only uses Main.LocalPlayer for player | |
Properties | |
WindGrid | Wind [get] |
The wind grid used to exert wind effects on tiles. | |
void Terraria.GameContent.Drawing.TileDrawing.EmitLivingTreeLeaf | ( | int | i, |
int | j, | ||
int | leafGoreType | ||
) |
Emits a single living tree leaf or other gore instance directly below the target tile.
With a 50% chance, also emits a second leaf or other gore instance directly to the side of the target tile, dependent on wind direction.
Used by vanilla's two types of Living Trees, from which this method and its two submethods get their collective name.
i | The X coordinate of the target tile. |
j | The Y coordinate of the target tile. |
leafGoreType | The numerical ID of the leaf or other gore instance that should be spawned. |
float Terraria.GameContent.Drawing.TileDrawing.GetWindCycle | ( | int | x, |
int | y, | ||
double | windCounter | ||
) |
Fetches the degree to which wind would/should affect a tile at the given location.
x | The X coordinate of the theoretical target tile. |
y | The Y coordinate of the theoretical target tile. |
windCounter |
float Terraria.GameContent.Drawing.TileDrawing.GetWindGridPush | ( | int | i, |
int | j, | ||
int | pushAnimationTimeTotal, | ||
float | pushForcePerFrame | ||
) |
Determines how much wind should affect a theoretical tile at the target location on the current update tick.
i | The X coordinate of the theoretical target tile. |
j | The Y coordinate of the theoretical target tile. |
pushAnimationTimeTotal | The total amount of time, in ticks, that a wind push cycle for the theoretical target tile should last for. |
pushForcePerFrame | The amount which wind should affect the theoretical target tile per frame. |
float Terraria.GameContent.Drawing.TileDrawing.GetWindGridPushComplex | ( | int | i, |
int | j, | ||
int | pushAnimationTimeTotal, | ||
float | totalPushForce, | ||
int | loops, | ||
bool | flipDirectionPerLoop | ||
) |
Determines how much wind should affect a theoretical tile at the target location on the current update tick.
More complex version of GetWindGridPush.
i | The X coordinate of the theoretical target tile. |
j | The Y coordinate of the theoretical target tile. |
pushAnimationTimeTotal | The total amount of time, in ticks, that a wind push cycle for the theoretical target tile should last for. |
totalPushForce | |
loops | |
flipDirectionPerLoop |
bool Terraria.GameContent.Drawing.TileDrawing.ShouldSwayInWind | ( | int | x, |
int | y, | ||
Tile | tileCache | ||
) |
Determines whether or not the tile at the given location should be able to sway in the wind.
x | The X coordinate of the given tile. |
y | The Y coordinate of the given tile. |
tileCache | The tile to determine the sway-in-wind-ability of. |