Example #1
0
    public HashSet <Tile> GetAvailableTargets(Tile tile)
    {
        HashSet <Tile> ret = new HashSet <Tile>(RangeAndMelee.StaticGetTiles(tile));

        ret.UnionWith(IncreasedRange.StaticGetTiles(tile));
        return(ret);
    }
Example #2
0
    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);
    }
Example #3
0
    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);
    }
Example #4
0
    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);
    }