Exemple #1
0
        protected Texture2D GetTex(TileType cell)
        {
            switch (cell.Name)
            {
                case "Grass":
                    return textures[0];
                case "Rock":
                    return textures[1];
                case "Tree":
                    return textures[2];
                case "Water":
                    return textures[3];

                default:
                    return null;
            }
        }
Exemple #2
0
 private static string GetTileView(TileType tile)
 {
     switch (tile.Name)
     {
         case "Grass":
             return ".";
         case "Rock":
             return "@";
         case "Tree":
             return "T";
         case "Water":
             return "~";
         default:
             return "?";
     }
 }