public HashSet <Tile> GetAvailableTargets(Tile tile) { HashSet <Tile> ret = new HashSet <Tile>(RangeAndMelee.StaticGetTiles(tile)); ret.UnionWith(IncreasedRange.StaticGetTiles(tile)); return(ret); }
public HashSet <Tile> GetAvailableTargets() { Tile t = GetComponent <Unit>().Tile; HashSet <Tile> ret = new HashSet <Tile>(RangeAndMelee.StaticGetTiles(t)); ret.UnionWith(IncreasedRange.StaticGetTiles(t)); return(ret); }
public System.Collections.Generic.HashSet <Tile> GetAvailableTargets(Tile tile) { Unit host = GetComponent <Unit>(); HashSet <Tile> retVal = new HashSet <Tile>(); foreach (Tile t in RangeAndMelee.StaticGetTiles(tile)) { if (t.isOccuppied && host.isHostile(t.Unit) && !t.Unit.invisible) { retVal.Add(t); } } return(retVal); }
public HashSet <Tile> GetAvailableTargets(Tile tile) { Unit host = GetComponent <Unit>(); HashSet <Tile> retVal = new HashSet <Tile>(); if (host == null) { Debug.LogError("host not found, is the charm ability sitting on a unit?"); return(retVal); } foreach (Tile t in RangeAndMelee.StaticGetTiles(tile)) { if (t.isOccuppied && host.isHostile(t.Unit) && !t.Unit.invisible) { retVal.Add(t); } } return(retVal); }