Exemplo n.º 1
0
 public static IEnumerable <HexPos> GetNeighbours(Vector3 pos, HexCubMap map)
 {
     foreach (Vector3 dir in directions)
     {
         HexPos hex = map.GetHexPos(dir + pos);
         if (hex != null && hex.enabled)
         {
             yield return(hex);
         }
     }
 }
Exemplo n.º 2
0
    static public bool isMeristemPosition(HexCubMap map, Vector3 pos)
    {
        Tile tile = map.GetHexPos(pos).occupant;

        if (tile)
        {
            return(tile.tileType == TileType.Meristem);
        }
        else
        {
            return(false);
        }
    }