public CollisionManager(Rectangle ground, Player player, EnemyHandler enemyHandler, BulletHandler bulletHandler, SoundEffect hurt)
 {
     this.sound_hurt    = hurt;
     this.ground        = ground;
     this.player        = player;
     this.enemyHandler  = enemyHandler;
     this.bulletHandler = bulletHandler;
 }
Ejemplo n.º 2
0
        public World(GraphicsDevice gd, ContentManager content)
        {
            ground    = new Rectangle(0, GameSettings.g_screenheight - groundHeight, GameSettings.g_screenwidth, groundHeight);
            groundTex = content.Load <Texture2D>("Assets/Texture/ground");

            background    = new Rectangle(0, 0, GameSettings.g_screenwidth, GameSettings.g_screenheight);
            backgroundTex = content.Load <Texture2D>("Assets/Texture/background");

            sound_shot = content.Load <SoundEffect>("Assets/Sound/shoot");
            SoundEffect hurt = content.Load <SoundEffect>("Assets/Sound/hurt");

            player       = new Player(content);
            enemyHandler = new EnemyHandler(content);

            bulletHandler    = new BulletHandler(content);
            collisionManager = new CollisionManager(ground, player, enemyHandler, bulletHandler, hurt);
        }