2using System.Collections.Generic;
15 public readonly
string mod;
19 public readonly
string Name;
27 public readonly Action<InfoType>
layer;
71 while (parentLayer !=
null) {
72 if (!parentLayer.
visible || !layers.Contains((T)parentLayer)) {
75 parentLayer = parentLayer.parent;
84 public virtual void Draw(ref InfoType drawInfo) {
225 return new PlayerLayer(
"Terraria", name, _ => { });
This class represents a layer of the drawing of an object, using a certain type of InfoType to help w...
readonly string Name
The name which identifies this DrawLayer.
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...
virtual void Draw(ref InfoType drawInfo)
Invokes this DrawLayer's layer action.
DrawLayer(string mod, string name, Action< InfoType > layer)
Creates a DrawLayer with the given mod name, identifier name, and drawing action.
readonly string mod
The name of the mod to which this DrawLayer belongs.
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.
readonly Action< InfoType > layer
The delegate of this method, which can either do the actual drawing or add draw data,...
readonly DrawLayer< InfoType > parent
The parent of this DrawLayer. If the parent is not drawn, this layer will not be drawn either....
bool visible
Whether or not this DrawLayer should be drawn. For vanilla layers, this will be set to true before al...
This class represents a DrawLayer for the player's map icon, and uses PlayerDrawHeadInfo as its InfoT...
static readonly PlayerHeadLayer AltHair
Draws the player's alternate (hat) hair.
PlayerHeadLayer(string mod, string name, Action< PlayerHeadDrawInfo > layer)
Creates a PlayerHeadLayer with the given mod name, identifier name, and drawing action.
PlayerHeadLayer(string mod, string name, PlayerHeadLayer parent, Action< PlayerHeadDrawInfo > layer)
Creates a PlayerHeadLayer with the given mod name, identifier name, parent layer, and drawing action.
static readonly PlayerHeadLayer Head
Draws the player's face and eyes.
static readonly PlayerHeadLayer Armor
Draws the player's head armor.
static PlayerHeadLayer CreateVanillaLayer(string name)
static readonly PlayerHeadLayer FaceAcc
Draws the player's face accessory.
static readonly PlayerHeadLayer Hair
Draws the player's hair.
This class represents a DrawLayer for the player, and uses PlayerDrawInfo as its InfoType....
static readonly PlayerLayer Legs
Draws the player's leg armor or pants and shoes.
PlayerLayer(string mod, string name, PlayerLayer parent, Action< PlayerDrawInfo > layer)
Creates a PlayerLayer with the given mod name, identifier name, parent layer, and drawing action.
PlayerLayer(string mod, string name, Action< PlayerDrawInfo > layer)
Creates a PlayerLayer with the given mod name, identifier name, and drawing action.
static readonly PlayerLayer MountBack
Draws the back textures of the player's mount. Also draws the player's magic carpet.
static readonly PlayerLayer MiscEffectsFront
Draws miscellaneous effects in front of the player.
static readonly PlayerLayer Face
Draws the player's face and eyes.
static readonly PlayerLayer SolarShield
Draws the player's solar shield if the player has one.
static readonly PlayerLayer NeckAcc
Draws the player's neck accessory.
static readonly PlayerLayer FrontAcc
Draws the player's front accessory.
static readonly PlayerLayer BackAcc
Draws the player's back accessory and held item's backpack.
static readonly PlayerLayer FaceAcc
Draws the player's face accessory.
static PlayerLayer CreateVanillaLayer(string name)
static readonly PlayerLayer Wings
Draws the layer's wings.
static readonly PlayerLayer Hair
Draws the player's hair.
static readonly PlayerLayer HeldProjFront
Draws the player's held projectile if it should be drawn in front of the held item and arms.
static readonly PlayerLayer HairBack
Draws the player's hair. To be honest this layer seems kind of useless.
static readonly PlayerLayer Arms
Draws the player's arms (including the armor's arms if applicable).
static readonly PlayerLayer Head
Draws the player's head armor.
static readonly PlayerLayer WaistAcc
Draws the player's waist accessory.
static readonly PlayerLayer BalloonAcc
Draws the player's balloon accessory.
static readonly PlayerLayer ShieldAcc
Draws the player's shield accessory.
static readonly PlayerLayer HeldItem
Draws the player's held item.
static readonly PlayerLayer Body
Draws the player's body armor or shirts.
static readonly PlayerLayer HandOnAcc
Draws the player's hand on accessory. Also draws the player's held item if the player is in the middl...
static readonly PlayerLayer ShoeAcc
Draws the player's shoe accessory.
static readonly PlayerLayer HandOffAcc
Draws the player's hand off accessory.
static readonly PlayerLayer Skin
Draws the player's body and leg skin.
static readonly PlayerLayer HeldProjBack
Draws the player's held projectile if it should be drawn behind the held item and arms.
static readonly PlayerLayer MiscEffectsBack
Draws miscellaneous effects behind the player.
static readonly PlayerLayer MountFront
Draws the front textures of the player's mount. Also draws the pulley if the player is hanging on a r...