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

ReserveProjectileID() static private method

static private ReserveProjectileID ( ) : int
return int
        internal static int ReserveProjectileID()
        {
            if (ModNet.AllowVanillaClients) throw new Exception("Adding projectiles breaks vanilla client compatiblity");

            int reserveID = nextProjectile;
            nextProjectile++;
            return reserveID;
        }

Usage Example

Ejemplo n.º 1
0
        protected sealed override void Register()
        {
            ModTypeLookup <ModProjectile> .Register(this);

            projectile.type = ProjectileLoader.ReserveProjectileID();
            DisplayName     = Mod.GetOrCreateTranslation($"Mods.{Mod.Name}.ProjectileName.{Name}");

            ProjectileLoader.projectiles.Add(this);
        }
All Usage Examples Of Terraria.ModLoader.ProjectileLoader::ReserveProjectileID