private void Callback_TileChanged(GameLogic.TileGrid tiles, Vector2i pos,
                                   GameLogic.TileTypes oldVal, GameLogic.TileTypes newVal)
 {
     //Update the tile data texture.
     tileGridTex.SetPixel(pos.x, pos.y, tileTypeToMaterialParam[newVal]);
     tileGridTex.Apply();
 }
Exemple #2
0
        private void Callback_TileTypeChanged(GameLogic.TileGrid tiles,
                                              Vector2i tilePos,
                                              GameLogic.TileTypes oldType,
                                              GameLogic.TileTypes newType)
        {
            foreach (var kvp in UIObjectsByTileType)
            {
                kvp.Value.SetActive(kvp.Key == newType);
            }

            switch (newType)
            {
            case GameLogic.TileTypes.Empty:
                Label_Title.Key = "WINDOW_TILE_EMPTY";
                break;

            case GameLogic.TileTypes.Wall:
                Label_Title.Key = "WINDOW_TILE_WALL";
                break;

            case GameLogic.TileTypes.Deposit:
                Label_Title.Key = "WINDOW_TILE_DEPOSIT";
                break;

            case GameLogic.TileTypes.Bedrock:
                Label_Title.Key = "WINDOW_TILE_BEDROCK";
                break;
            }
        }