Beispiel #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 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;
 }