tModLoader v0.11.8.9
A mod to make and play Terraria mods
|
This class represents a layer of the drawing of an object, using a certain type of InfoType to help with its drawing. More...
Public Member Functions | |
virtual void | Draw (ref InfoType drawInfo) |
Invokes this DrawLayer's layer action. More... | |
bool | ShouldDraw< T > (IList< T > layers) |
Whether or not this layer should be drawn. Returns false if visible is false. If layerList is of type List<DrawLayer<InfoType>> and parent is not null, this will also return false if the parent is not drawn. More... | |
Public Attributes | |
readonly Action< InfoType > | layer |
The delegate of this method, which can either do the actual drawing or add draw data, depending on what kind of layer this is. More... | |
readonly string | mod |
The name of the mod to which this DrawLayer belongs. More... | |
readonly string | Name |
The name which identifies this DrawLayer. More... | |
readonly DrawLayer< InfoType > | parent |
The parent of this DrawLayer. If the parent is not drawn, this layer will not be drawn either. Defaults to null, which skips the parent check. More... | |
bool | visible = true |
Whether or not this DrawLayer should be drawn. For vanilla layers, this will be set to true before all drawing-related hooks are called. For modded layers, you must set this to true or false yourself. More... | |
Protected Member Functions | |
DrawLayer (string mod, string name, Action< InfoType > layer) | |
Creates a DrawLayer with the given mod name, identifier name, and drawing action. More... | |
DrawLayer (string mod, string name, DrawLayer< InfoType > parent, Action< InfoType > layer) | |
Creates a DrawLayer with the given mod name, identifier name, parent layer, and drawing action. More... | |
This class represents a layer of the drawing of an object, using a certain type of InfoType to help with its drawing.
InfoType |
Definition at line 10 of file DrawLayer.cs.
|
protected |
Creates a DrawLayer with the given mod name, identifier name, and drawing action.
mod | |
name | |
layer |
Definition at line 39 of file DrawLayer.cs.
References Terraria.ModLoader.DrawLayer< InfoType >.layer, and Terraria.ModLoader.DrawLayer< InfoType >.mod.
|
protected |
Creates a DrawLayer with the given mod name, identifier name, parent layer, and drawing action.
mod | |
name | |
parent | |
layer |
Definition at line 53 of file DrawLayer.cs.
References Terraria.ModLoader.DrawLayer< InfoType >.layer, Terraria.ModLoader.DrawLayer< InfoType >.mod, and Terraria.ModLoader.DrawLayer< InfoType >.parent.
|
virtual |
Invokes this DrawLayer's layer action.
drawInfo |
Definition at line 84 of file DrawLayer.cs.
References Terraria.ModLoader.DrawLayer< InfoType >.layer.
bool Terraria.ModLoader.DrawLayer< InfoType >.ShouldDraw< T > | ( | IList< T > | layers | ) |
Whether or not this layer should be drawn. Returns false if visible is false. If layerList is of type List<DrawLayer<InfoType>> and parent is not null, this will also return false if the parent is not drawn.
T |
layers |
T | : | DrawLayer<InfoType> |
Definition at line 66 of file DrawLayer.cs.
References Terraria.ModLoader.DrawLayer< InfoType >.parent, and Terraria.ModLoader.DrawLayer< InfoType >.visible.
readonly Action<InfoType> Terraria.ModLoader.DrawLayer< InfoType >.layer |
The delegate of this method, which can either do the actual drawing or add draw data, depending on what kind of layer this is.
Definition at line 27 of file DrawLayer.cs.
Referenced by Terraria.ModLoader.DrawLayer< InfoType >.DrawLayer(), and Terraria.ModLoader.DrawLayer< InfoType >.Draw().
readonly string Terraria.ModLoader.DrawLayer< InfoType >.mod |
The name of the mod to which this DrawLayer belongs.
Definition at line 15 of file DrawLayer.cs.
Referenced by Terraria.ModLoader.DrawLayer< InfoType >.DrawLayer().
readonly string Terraria.ModLoader.DrawLayer< InfoType >.Name |
The name which identifies this DrawLayer.
Definition at line 19 of file DrawLayer.cs.
readonly DrawLayer<InfoType> Terraria.ModLoader.DrawLayer< InfoType >.parent |
The parent of this DrawLayer. If the parent is not drawn, this layer will not be drawn either. Defaults to null, which skips the parent check.
Definition at line 23 of file DrawLayer.cs.
Referenced by Terraria.ModLoader.DrawLayer< InfoType >.DrawLayer(), and Terraria.ModLoader.DrawLayer< InfoType >.ShouldDraw< T >().
bool Terraria.ModLoader.DrawLayer< InfoType >.visible = true |
Whether or not this DrawLayer should be drawn. For vanilla layers, this will be set to true before all drawing-related hooks are called. For modded layers, you must set this to true or false yourself.
Definition at line 31 of file DrawLayer.cs.
Referenced by Terraria.ModLoader.DrawLayer< InfoType >.ShouldDraw< T >().