This class allows you to customize the behavior of a custom gore. Create a new instance of this and pass it as a parameter to Mod.AddGore to customize the gore you are adding. If you are autoloading gore, then give it the same name as the gore texture.
More...
|
virtual bool | DrawBehind (Gore gore) |
| Allows you to determine whether or not this gore will draw behind tiles, etc. Returns false by default. More...
|
|
virtual ? Color | GetAlpha (Gore gore, Color lightColor) |
| Allows you to override the color this gore will draw in. Return null to draw it in the normal light color; returns null by default. More...
|
|
virtual void | OnSpawn (Gore gore) |
| Allows you to modify a gore's fields when it is created. More...
|
|
virtual bool | Update (Gore gore) |
| Allows you to customize how you want this type of gore to behave. Return true to allow for vanilla gore updating to also take place; returns true by default. More...
|
|
|
static int | GetGoreSlot (string texture) |
| Gets the type of the custom gore corresponding to the given texture. Returns 0 if the texture does not represent a gore. More...
|
|
|
int | updateType = -1 |
| Allows you to copy the Update behavior of a different type of gore. This defaults to 0, which means no behavior is copied. More...
|
|
This class allows you to customize the behavior of a custom gore. Create a new instance of this and pass it as a parameter to Mod.AddGore to customize the gore you are adding. If you are autoloading gore, then give it the same name as the gore texture.
Definition at line 12 of file ModGore.cs.
◆ DrawBehind()
virtual bool Terraria.ModLoader.ModGore.DrawBehind |
( |
Gore |
gore | ) |
|
|
virtual |
Allows you to determine whether or not this gore will draw behind tiles, etc. Returns false by default.
Definition at line 127 of file ModGore.cs.
127 {
128 return false;
129 }
◆ GetAlpha()
virtual ? Color Terraria.ModLoader.ModGore.GetAlpha |
( |
Gore |
gore, |
|
|
Color |
lightColor |
|
) |
| |
|
virtual |
Allows you to override the color this gore will draw in. Return null to draw it in the normal light color; returns null by default.
- Returns
Definition at line 120 of file ModGore.cs.
120 {
121 return null;
122 }
◆ GetGoreSlot()
static int Terraria.ModLoader.ModGore.GetGoreSlot |
( |
string |
texture | ) |
|
|
static |
Gets the type of the custom gore corresponding to the given texture. Returns 0 if the texture does not represent a gore.
Definition at line 31 of file ModGore.cs.
31 {
32 if (gores.ContainsKey(texture)) {
33 return gores[texture];
34 }
35 else {
36 return 0;
37 }
38 }
◆ OnSpawn()
virtual void Terraria.ModLoader.ModGore.OnSpawn |
( |
Gore |
gore | ) |
|
|
virtual |
Allows you to modify a gore's fields when it is created.
Definition at line 101 of file ModGore.cs.
◆ Update()
virtual bool Terraria.ModLoader.ModGore.Update |
( |
Gore |
gore | ) |
|
|
virtual |
Allows you to customize how you want this type of gore to behave. Return true to allow for vanilla gore updating to also take place; returns true by default.
Definition at line 109 of file ModGore.cs.
109 {
110 return true;
111 }
◆ nextGore
int Terraria.ModLoader.ModGore.nextGore = GoreID.Count |
|
staticprivate |
◆ updateType
int Terraria.ModLoader.ModGore.updateType = -1 |
Allows you to copy the Update behavior of a different type of gore. This defaults to 0, which means no behavior is copied.
Definition at line 20 of file ModGore.cs.
◆ GoreCount
int Terraria.ModLoader.ModGore.GoreCount |
|
staticget |