Exemple #1
0
        public static LSProjectile Create(string projCode, Vector3d position, Func <LSAgent, bool> agentConditional, Func <byte, bool> bucketConditional, Action <LSAgent> hitEffect)
        {
            curProj = RawCreate(projCode);

            int id = ProjectileBucket.Add(curProj);

            curProj.Prepare(id, position, agentConditional, bucketConditional, hitEffect, true);
            return(curProj);
        }
        public static LSProjectile Create(string projCode, Vector3d position, Func <RTSAgent, bool> agentConditional, Func <byte, bool> bucketConditional, Action <RTSAgent> onHit)
        {
            var curProj = RawCreate(projCode);

            int id = ProjectileBucket.Add(curProj);

            if (curProj != null)
            {
                curProj.Prepare(id, position, agentConditional, bucketConditional, onHit, true);
            }
            return(curProj);
        }
 public static void EndProjectile(LSProjectile projectile)
 {
     if (projectile.Deterministic)
     {
         int id = projectile.ID;
         if (!ProjectileBucket.SafeRemoveAt(id, projectile))
         {
             Debug.Log("BOO! This is a terrible bug.");
         }
     }
     else
     {
         if (!NDProjectileBucket.SafeRemoveAt(projectile.ID, projectile))
         {
             Debug.Log("BOO! This is a terrible bug.");
         }
     }
     CacheProjectile(projectile);
     projectile.Deactivate();
 }