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); }
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); }
public bool IsOpponent() { return(damagable.IsOpponent()); }