示例#1
0
文件: Scene.cs 项目: oks2024/Maze
 public void BuildFromMaze(MazeStructure pMaze)
 {
     for (int y = 0; y < pMaze.YSize; y++)
     {
         for (int x = 0; x < pMaze.XSize; x++)
         {
             if (pMaze.MazeData[y][x].IsFloor)
             {
                 Add(new DeferredSprite(@"Models\ground_diffuse", @"Models\ground_normal", @"Models\ground_specular", new Vector3(x * 200 , y * 200, 0)));
             }
         }
     }
 }
示例#2
0
文件: Game1.cs 项目: oks2024/Maze
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     Engine.Instance.CurrentScene = new Scene();
     MazeStructure maze = new MazeStructure();
     //Engine.Instance.CurrentScene.BuildFromMaze(maze);
 }