コード例 #1
0
ファイル: Program.cs プロジェクト: mbrews10/GP3-Coursework
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
コード例 #2
0
ファイル: Player.cs プロジェクト: Bhanna200/Coursework
        public Player(Game1 game)
        {
            //graphicsDevice = device;
            this.game = game;
            shipColBox = new Box(shipPos, 1f, 1f, 1f);
            shipColBox.Mass = 2.0f;
            shipColBox.IsAffectedByGravity = false;
            game.space.Add(shipColBox);
            shipModel = new EntityModel(shipColBox, game.Content.Load<Model>("Models/Ship"), Matrix.Identity * Matrix.CreateScale(0.0005f), game);
            laser = game.Content.Load<SoundEffect>("Audio/Laser");
            game.Components.Add(shipModel);

            shipColBox.Tag = shipModel;
        }
コード例 #3
0
ファイル: Enemy.cs プロジェクト: Bhanna200/Coursework
 public Enemy(Game1 game)
 {
     this.game = game;
     enemyColBox = new Box(enemyPos, 3f, 3f, 3f);
     game.space.Add(enemyColBox);
     //enemyColBox.Mass = 2.0f;
     //enemyColBox.IsAffectedByGravity = false;
     //shipColBox.BecomeDynamic(1);
     //shipColBox.LinearVelocity = new Vector3(0,-100f,0f);
     enemyModel = new EntityModel(enemyColBox, game.Content.Load<Model>("Models/enemyShip1"), Matrix.Identity * Matrix.CreateScale(0.03f), game);
     hit = game.Content.Load<SoundEffect>("Audio/Hit");
     game.Components.Add(enemyModel);
     enemyColBox.Tag = enemyModel;
 }