コード例 #1
0
        internal static List<Wall> Create(Game game)
        {
            int mapWidth = game.Window.ClientBounds.Width;
            int mapHeight = game.Window.ClientBounds.Height;

            var result = new Wall[WallRows * WallCols];

            int index = 0, pos_x, pos_y;

            for (int i = 0; i < WallCols;i++ )
            {
                pos_x = WallColMultiplier * (i + 1);

                for (int k = 0; k < WallRows; k++)
                {
                    pos_y = WallRowMultiplier * (k + 1);
                    result[index++] = new Wall(game, pos_x, pos_y, RandomWallOrientation());
                }
            }

            return result.ToList();
        }