Terraria.ModLoader.ProjectileLoader.GetProjectile C# (CSharp) Method

GetProjectile() public static method

public static GetProjectile ( int type ) : ModProjectile
type int
return ModProjectile
        public static ModProjectile GetProjectile(int type)
        {
            return type >= ProjectileID.Count && type < ProjectileCount ? projectiles[type - ProjectileID.Count] : null;
        }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Gets the ModProjectile instance corresponding to the specified type.
 /// </summary>
 /// <param name="type">The type of the projectile</param>
 /// <returns>The ModProjectile instance in the projectiles array, null if not found.</returns>
 public static ModProjectile GetModProjectile(int type) => ProjectileLoader.GetProjectile(type);