Exemplo n.º 1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            player = new Player(Game.Content.Load<Texture2D>(@"Images/pl00"), new Vector2(228,374), new Point(32, 48), new Point(0, 0), new Point(8, 1),new Vector2(4.5f,4.5f),66);
            player.loadOtherTexture(Game.Content.Load<Texture2D>(@"Images/etama2"));
            enemy = new Enemy(Game.Content.Load<Texture2D>(@"Images/stg4enm"), new Vector2(228,150), new Point(48, 64), new Point(0, 0), new Point(4, 2), Vector2.Zero, 120);
            Bullet.loadTextureImage(Game.Content.Load<Texture2D>(@"Images/etama"));
            PlayerBullet.loadOtherTexture(Game.Content.Load<Texture2D>(@"Images/pl00"));
            ft=new Front(Game.Content.Load<Texture2D>(@"Images/front00"));
            bulletManager=new BulletManager();

            GameVariable.player = player;
            GameVariable.enemy = enemy;
            GameVariable.bulletManager = bulletManager;
            GameVariable.audioManager.playBGM("satoribgm");
        }
Exemplo n.º 2
0
 public static bool playerBulletToEnemy(PlayerBullet playerBullet, Enemy enemy)
 {
     return playerBullet.getCollisionRectangle().Intersects(enemy.getCollisionRectangle());
 }