Exemplo n.º 1
0
 public void addShot(Shot shot)
 {
     _shots.Add(shot);
 }
Exemplo n.º 2
0
 public void removeShot(Shot shot)
 {
     _shots.Remove(shot);
     removeScreenObject(shot);
 }
Exemplo n.º 3
0
        private void assignShielder(Shot enemy)
        {
            if (this is EnemyFormation)
                return;

            Soldier guard = null;

            foreach (Soldier shot in (ArrayList)_meleeRows[0])
            {
                if (shot is Targeteer)
                {
                    if (shot.guardTarget == enemy)
                        return;
                }
            }
            foreach (Soldier shot in (ArrayList)_meleeRows[0])
            {
                if (shot is Targeteer)
                {
                    if (shot.guardTarget == null && ((Targeteer)shot)._hasShield)
                    {
                        guard = checkGuard(guard, shot, enemy);
                    }
                }
            }
            if (guard != null)
                guard.guardTarget = enemy;
        }