Terraria ModLoader  0.10.1.5
A framework for Terraria mods
Terraria.ModLoader.PlayerHeadLayer Class Reference

This class represents a DrawLayer for the player's map icon, and uses PlayerDrawHeadInfo as its InfoType. Drawing should be done directly through drawInfo.spriteBatch. More...

+ Inheritance diagram for Terraria.ModLoader.PlayerHeadLayer:
+ Collaboration diagram for Terraria.ModLoader.PlayerHeadLayer:

Public Member Functions

 PlayerHeadLayer (string mod, string name, Action< PlayerHeadDrawInfo > layer)
 Creates a PlayerHeadLayer with the given mod name, identifier name, and drawing action. More...
 
 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. More...
 
- Public Member Functions inherited from Terraria.ModLoader.DrawLayer< PlayerHeadDrawInfo >
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...
 

Static Public Attributes

static readonly PlayerHeadLayer AltHair = CreateVanillaLayer("AltHair")
 Draws the player's alternate (hat) hair. More...
 
static readonly PlayerHeadLayer Armor = CreateVanillaLayer("Armor")
 Draws the player's head armor. More...
 
static readonly PlayerHeadLayer FaceAcc = CreateVanillaLayer("FaceAcc")
 Draws the player's face accessory. More...
 
static readonly PlayerHeadLayer Hair = CreateVanillaLayer("Hair")
 Draws the player's hair. More...
 
static readonly PlayerHeadLayer Head = CreateVanillaLayer("Head")
 Draws the player's face and eyes. More...
 

Static Private Member Functions

static PlayerHeadLayer CreateVanillaLayer (string name)
 

Additional Inherited Members

- Public Attributes inherited from Terraria.ModLoader.DrawLayer< PlayerHeadDrawInfo >
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
 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 inherited from Terraria.ModLoader.DrawLayer< PlayerHeadDrawInfo >
 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...
 

Detailed Description

This class represents a DrawLayer for the player's map icon, and uses PlayerDrawHeadInfo as its InfoType. Drawing should be done directly through drawInfo.spriteBatch.

Definition at line 232 of file DrawLayer.cs.

Constructor & Destructor Documentation

Terraria.ModLoader.PlayerHeadLayer.PlayerHeadLayer ( string  mod,
string  name,
Action< PlayerHeadDrawInfo layer 
)

Creates a PlayerHeadLayer with the given mod name, identifier name, and drawing action.

Parameters
mod
name
layer

Definition at line 261 of file DrawLayer.cs.

262  : base(mod, name, layer) {
263  }
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.
Definition: DrawLayer.cs:27
readonly string mod
The name of the mod to which this DrawLayer belongs.
Definition: DrawLayer.cs:15
Terraria.ModLoader.PlayerHeadLayer.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.

Parameters
mod
name
parent
layer

Definition at line 272 of file DrawLayer.cs.

273  : base(mod, name, parent, layer) {
274  }
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.
Definition: DrawLayer.cs:27
readonly string mod
The name of the mod to which this DrawLayer belongs.
Definition: DrawLayer.cs:15
readonly DrawLayer< InfoType > parent
The parent of this DrawLayer. If the parent is not drawn, this layer will not be drawn either...
Definition: DrawLayer.cs:23

Member Function Documentation

static PlayerHeadLayer Terraria.ModLoader.PlayerHeadLayer.CreateVanillaLayer ( string  name)
staticprivate

Definition at line 276 of file DrawLayer.cs.

276  {
277  return new PlayerHeadLayer("Terraria", name, _ => { });
278  }
PlayerHeadLayer(string mod, string name, Action< PlayerHeadDrawInfo > layer)
Creates a PlayerHeadLayer with the given mod name, identifier name, and drawing action.
Definition: DrawLayer.cs:261

Member Data Documentation

readonly PlayerHeadLayer Terraria.ModLoader.PlayerHeadLayer.AltHair = CreateVanillaLayer("AltHair")
static

Draws the player's alternate (hat) hair.

Definition at line 245 of file DrawLayer.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers().

readonly PlayerHeadLayer Terraria.ModLoader.PlayerHeadLayer.Armor = CreateVanillaLayer("Armor")
static

Draws the player's head armor.

Definition at line 249 of file DrawLayer.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers().

readonly PlayerHeadLayer Terraria.ModLoader.PlayerHeadLayer.FaceAcc = CreateVanillaLayer("FaceAcc")
static

Draws the player's face accessory.

Definition at line 253 of file DrawLayer.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers().

readonly PlayerHeadLayer Terraria.ModLoader.PlayerHeadLayer.Hair = CreateVanillaLayer("Hair")
static

Draws the player's hair.

Definition at line 241 of file DrawLayer.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers().

readonly PlayerHeadLayer Terraria.ModLoader.PlayerHeadLayer.Head = CreateVanillaLayer("Head")
static

Draws the player's face and eyes.

Definition at line 237 of file DrawLayer.cs.

Referenced by Terraria.ModLoader.PlayerHooks.GetDrawHeadLayers().