示例#1
0
        void downClick(object sender, EventArgs e)
        {
            RadioButton button = (RadioButton)sender;

            TileInfo.WallType type = getWallType(button);
            selectedTile.down = type;
            if (selectedTile.y < height - 1)
            {
                tiles[selectedTile.x, selectedTile.y + 1].up = type;
            }
            redrawRoomTiles();
        }
示例#2
0
        void leftClick(object sender, EventArgs e)
        {
            RadioButton button = (RadioButton)sender;

            TileInfo.WallType type = getWallType(button);
            selectedTile.left = type;
            if (selectedTile.x > 0)
            {
                tiles[selectedTile.x - 1, selectedTile.y].right = type;
            }
            redrawRoomTiles();
        }
示例#3
0
        private byte getWallType(TileInfo.WallType type)
        {
            switch (type)
            {
            case TileInfo.WallType.Empty:
                return(0);

            case TileInfo.WallType.Wall:
                return(1);

            case TileInfo.WallType.Door:
                return(2);

            case TileInfo.WallType.BlastDoor:
                return(3);
            }
            throw new Exception();
        }
示例#4
0
        private void drawVerticalWall(int i, int j, TileInfo.WallType type)
        {
            switch (type)
            {
            case TileInfo.WallType.Wall:
                verticalWalls[i, j].Image = wall_v;
                break;

            case TileInfo.WallType.Door:
                verticalWalls[i, j].Image = door_v;
                break;

            case TileInfo.WallType.BlastDoor:
                verticalWalls[i, j].Image = blastDoor_v;
                break;
            }
            if (type != TileInfo.WallType.Empty)
            {
                roomTilesPanel.Controls.Add(verticalWalls[i, j]);
            }
        }