Exemple #1
0
 public bool HasDamagable()
 {
     for (int i = 0; i < areaCells.Count; i++)
     {
         Damagable d = areaCells[i].CellContent as Damagable;
         if (d != null && d.IsOpponent())
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #2
0
    public List <Damagable> GetDamagables()
    {
        List <Damagable> damagableContents = new List <Damagable>();

        if (areaCells == null || areaCells.Count == 0)
        {
            return(damagableContents);
        }

        for (int i = 0; i < areaCells.Count; i++)
        {
            Damagable d = areaCells[i].CellContent as Damagable;
            if (d != null && d.IsOpponent())
            {
                damagableContents.Add(d);
            }
        }

        return(damagableContents);
    }
Exemple #3
0
 public bool IsOpponent()
 {
     return(damagable.IsOpponent());
 }