Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     spr_render         = GetComponent <SpriteRenderer>();
     controller         = GetComponent <LostSoul>();
     spr_render.enabled = false;
     controller.enabled = false;
 }
Example #2
0
        /// <summary>
        /// This is the method a projectile can call after it dies to be removed from the projectile list of the AI.
        /// </summary>
        /// <param name="projectile">The projectile to remove from the list.</param>
        public void DeleteProjectile(LostSoul projectile)
        {
            bool done = false;

            for (int i = 0; i < projectiles.Count && !done; i++)
            {
                if (projectiles[i] == projectile)
                {
                    projectiles.RemoveAt(i);
                    done = true;
                }
            }
        }