tModLoader v2024.05
A mod to make and play Terraria mods
Gore Class Reference

Public Member Functions

Color GetAlpha (Color newColor)
 
void Update ()
 

Static Public Member Functions

static int NewGore (IEntitySource source, Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
 Spawns a gore with given properties More...
 
static Gore NewGoreDirect (IEntitySource source, Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
 Spawns a gore with given properties More...
 
static Gore NewGorePerfect (IEntitySource source, Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
 Spawns a gore with an exact position and velocity, no randomization More...
 

Public Attributes

bool active
 
int alpha
 
bool behindTiles
 
Vector2 drawOffset
 
SpriteFrame Frame = new SpriteFrame(1, 1)
 
byte frameCounter
 
float light
 
Vector2 position
 
float rotation
 
float scale
 
bool sticky = true
 
int timeLeft = goreTime
 
int type
 
Vector2 velocity
 

Static Public Attributes

static int goreTime = 600
 

Properties

Rectangle AABBRectangle [get]
 
byte frame [get, set]
 
float Height [get]
 
ModGore ModGore [get]
 
byte numFrames [get, set]
 
float Width [get]
 

Member Function Documentation

◆ NewGore()

static int Gore.NewGore ( IEntitySource  source,
Vector2  Position,
Vector2  Velocity,
int  Type,
float  Scale = 1f 
)
static

Spawns a gore with given properties

Parameters
sourceRecommend using Entity.GetSource_Death or Entity.GetSource_FromThis" as the spawn source</param> <param name="Position"></param> <param name="Velocity"></param> <param name="Type"></param> <param name="Scale"></param> <returns>The index of the gore in the <see cref="Main.gore"/> array

◆ NewGoreDirect()

static Gore Gore.NewGoreDirect ( IEntitySource  source,
Vector2  Position,
Vector2  Velocity,
int  Type,
float  Scale = 1f 
)
static

Spawns a gore with given properties

Parameters
sourceRecommend using Entity.GetSource_Death or Entity.GetSource_FromThis" as the spawn source</param> <param name="Position"></param> <param name="Velocity"></param> <param name="Type"></param> <param name="Scale">
Returns
A reference to the gore

◆ NewGorePerfect()

static Gore Gore.NewGorePerfect ( IEntitySource  source,
Vector2  Position,
Vector2  Velocity,
int  Type,
float  Scale = 1f 
)
static

Spawns a gore with an exact position and velocity, no randomization

Parameters
sourceRecommend using Entity.GetSource_Death or Entity.GetSource_FromThis" as the spawn source</param> <param name="Position"></param> <param name="Velocity"></param> <param name="Type"></param> <param name="Scale">
Returns