コード例 #1
0
        public override void Initialize()
        {
            ground = new Ground(Game.Content.Load<Model>(@"Models/Ground/Ground"));

            models.Add(new SkyBox(
                   Game.Content.Load<Model>(@"Models/Skybox/skybox")));
            tank = new Tank(Game.Content.Load<Model>(@"Models/Tank/tank"), (((Game1)Game).GraphicsDevice), ((Game1)Game).camera);

            base.Initialize();
        }
コード例 #2
0
ファイル: ModelManager.cs プロジェクト: 11614765/assignment2
        public override void Initialize()
        {
            ground = new Ground(Game.Content.Load<Model>(@"Models/Ground/Ground"));

            models.Add(new SkyBox(
                   Game.Content.Load<Model>(@"Models/Skybox/skybox")));
            tank = new Tank(Game.Content.Load<Model>(@"Models/Tank/tank"), (((Game1)Game).GraphicsDevice), ((Game1)Game).camera);
            //pursuitenemy = new PursuitEnemy(Game.Content.Load<Model>(@"Models/Tank/tank"), (((Game1)Game).GraphicsDevice), ((Game1)Game).camera);
            for (int i = 0; i < wallstone.Length; i++)
            {
                Vector3 stoneposition = map.MapToWorld(map.barrierList[i], true);
                wallstone[i] = new Wallstone(Game.Content.Load<Model>(@"Models/Obstacle/stone"), stoneposition);
                obstacles.Add(wallstone[i]);
            }

            //for(int x=0; x<21; x++)
            //{
            //    for (int y = 0; y < 21; y++)
            //    {
            //        if (y == 0 ||x==0 || y==20||x==20)
            //        {
            //            AddWall(-1200 + y * 120, -1200 + x * 120);
            //        }

            //    }
            //}
            for (int x = -1 * 1200; x <= 1200; x += 120)
            {
                AddWall(x, 1200);
                AddWall(x, -1200);
                AddWall(1200, x);
                AddWall(-1200, x);

            }

            base.Initialize();
        }