Example #1
0
    private int GetWeight(TileBase neighborTile)
    {
        GameObject   allowedObject = GameObject.Find("AllowedTiles");
        AllowedTiles allowed       = allowedObject.GetComponent <AllowedTiles>();

        return(allowed.GetWeight(neighborTile));
    }
Example #2
0
        public bool CheckNextStep(int tile)
        {
            bool OkToStep = false;

            if (AllowedTiles.Contains(tile))
            {
                OkToStep = true;
            }

            return(OkToStep);
        }
Example #3
0
 public TilemapGraph(Tilemap tilemap, AllowedTiles allowedTiles)
 {
     this.tilemap      = tilemap;
     this.allowedTiles = allowedTiles;
 }