TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CloneDefaults()

void Terraria.Projectile.CloneDefaults ( int TypeToClone)
inline

Definition at line 743 of file Projectile.cs.

744 {
745 int originalType = type;
753 if (num != oldPos.Length)
754 {
755 Array.Resize(ref oldPos, num);
756 Array.Resize(ref oldRot, num);
758 }
759 for (int i = 0; i < oldPos.Length; i++)
760 {
761 oldPos[i].X = 0f;
762 oldPos[i].Y = 0f;
763 oldRot[i] = 0f;
764 oldSpriteDirection[i] = 0;
765 }
766 }
static int[] TrailCacheLength
The length of the trail to store. Each projectile type defaults to 10. Use for drawing trails....
This class allows you to modify and use hooks for all projectiles, including vanilla projectiles....
This class serves as a place for you to place all your properties and hooks for each projectile....
float[] oldRot
Holds the value of F:Terraria.Projectile.rotation from previous updates from newest to oldest....
int[] oldSpriteDirection
Holds the value of F:Terraria.Projectile.spriteDirection from previous updates from newest to oldest....
Vector2[] oldPos
Holds the value of F:Terraria.Entity.position from previous updates from newest to oldest....
void SetDefaults(int Type)
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
ModProjectile ModProjectile
The ModProjectile instance that controls the behavior of this projectile. This property is null if th...
GlobalProjectile[] _globals

References Terraria.Projectile._globals, Terraria.Projectile.ModProjectile, Terraria.Projectile.oldPos, Terraria.Projectile.oldRot, Terraria.Projectile.oldSpriteDirection, Terraria.Projectile.SetDefaults(), Terraria.ID.ProjectileID.Sets.TrailCacheLength, and Terraria.Projectile.type.

+ Here is the call graph for this function: