Esempio n. 1
0
        public void HandleHit(MotherSpaceShip i_MotherSpaceShip, Bullet i_Bullet)
        {
            if (i_Bullet.Type == Bullet.eBulletType.PlayerOneBullet)
            {
                this.m_Players[(int)PlayerIndex.One].Score += i_MotherSpaceShip.ScoreValue;
            }
            else if (i_Bullet.Type == Bullet.eBulletType.PlayerTwoBullet)
            {
                this.m_Players[(int)PlayerIndex.Two].Score += i_MotherSpaceShip.ScoreValue;
            }

            this.m_SoundManager.PlaySoundEffect("MotherShipKill");
        }
Esempio n. 2
0
        public PlayScreen(Game i_Game)
            : base(i_Game)
        {
            this.m_ScoreBoard   = new ScoreBoardHeader(this);
            this.m_GameEngine   = Game.Services.GetService(typeof(ISpaceInvadersEngine)) as ISpaceInvadersEngine;
            this.m_SoundManager = Game.Services.GetService(typeof(ISoundMananger)) as ISoundMananger;

            i_Game.IsMouseVisible    = true;
            this.m_Background        = new Background(this, @"Sprites\BG_Space01_1024x768", 1);
            this.m_MotherSpaceShip   = new MotherSpaceShip(this);
            this.m_EnemysGroup       = new EnemiesGroup(this);
            this.m_WallsGroup        = new WallsGroup(this, SpaceInvadersConfig.k_NumOfWalls);
            this.m_PauseScreenScreen = new PauseScreen(this.Game);
        }