Beispiel #1
0
        public ITile GetTile(Vector2Int _position)
        {
            int chance = tileProbabilityRND.Range(_position, 100);

            if (chance >= (int)TileTypeChance.Gold)
            {
                return(new Gold(_position));
            }
            else if (chance >= (int)TileTypeChance.Dirt)
            {
                return(new Dirt(_position));
            }
            else if (chance >= (int)TileTypeChance.Leaves)
            {
                return(new Leaves(_position));
            }
            else if (chance >= (int)TileTypeChance.Sand)
            {
                return(new Sand(_position));
            }
            else
            {
                return(new Water(_position));
            }
        }