示例#1
0
        public override void execute()
        {
            this.pBomb.getProxySprite().setGameSprite(GameSpriteMan.Find(GameSprite.Name.Bomb_Explosion));
            ExplosionEvent pExplosionEvent = new ExplosionEvent(this.pBomb);

            TimerMan.Add(TimeEvent.Name.ExplosionEvent, pExplosionEvent, 0.1f);
        }
示例#2
0
        public override void execute()
        {
            //GameObject pA = (GameObject)this.pAlien;

            //GameObject pB = (GameObject)Iterator.GetParent(pA);
            //pA.remove();

            //if (checkParent(pB) == true)
            //{
            //    GameObject pC = (GameObject)Iterator.GetParent(pB);
            //    pB.remove();
            //}

            //pA.getProxySprite().setGameSprite(GameSpriteMan.Find(GameSprite.Name.Alien_Explosion));
            //GameObjectMan.Find(GameObject.Name.ExplosionGroup).add(pA);
            //SpriteBatchMan.Find(SpriteBatch.Name.Explosions).attach(pA.getProxySprite());
            //pA.activateCollisionSprite(SpriteBatchMan.Find(SpriteBatch.Name.Boxes));

            GameSprite pGameSprite = this.pAlien.getProxySprite().getGameSprite();
            Scene      pScene      = SceneMan.GetScene();

            if (pGameSprite.getName() == GameSprite.Name.Squid)
            {
                pScene.addScoreOne(30);
            }
            else if (pGameSprite.getName() == GameSprite.Name.Crab)
            {
                pScene.addScoreOne(20);
            }
            else if (pGameSprite.getName() == GameSprite.Name.Octopus)
            {
                pScene.addScoreOne(10);
            }

            FontMan.Find(Font.Name.ScoreOne).updateMessage(pScene.getScoreOne().ToString("D4"));

            if (pScene.getScoreOne() > pScene.getHighestScore())
            {
                pScene.setHighstScore(pScene.getScoreOne());
                FontMan.Find(Font.Name.HighestScore).updateMessage(pScene.getHighestScore().ToString("D4"));
            }

            this.pAlien.getProxySprite().setGameSprite(GameSpriteMan.Find(GameSprite.Name.Alien_Explosion));
            ExplosionEvent pExplosionEvent = new ExplosionEvent(this.pAlien);

            TimerMan.Add(TimeEvent.Name.ExplosionEvent, pExplosionEvent, 0.1f);
        }
        public override void execute()
        {
            //GameObject pA = (GameObject)this.pBrick;
            //GameObject pB = (GameObject)Iterator.GetParent(pA);

            //pA.remove();

            //// TODO: Need a better way...
            //if (checkParent(pB) == true)
            //{
            //    GameObject pC = (GameObject)Iterator.GetParent(pB);
            //    pB.remove();

            //    if (checkParent(pC) == true)
            //    {
            //        pC.remove();
            //    }
            //}
            this.pBrick.getProxySprite().setGameSprite(GameSpriteMan.Find(GameSprite.Name.Missile_Explosion));
            ExplosionEvent pExplosionEvent = new ExplosionEvent(this.pBrick);

            TimerMan.Add(TimeEvent.Name.ExplosionEvent, pExplosionEvent, 0.1f);
        }
        public override void execute()
        {
            Scene pScene = SceneMan.GetScene();

            pScene.addScoreOne(200);

            FontMan.Find(Font.Name.ScoreOne).updateMessage(pScene.getScoreOne().ToString("D4"));

            if (pScene.getScoreOne() > pScene.getHighestScore())
            {
                pScene.setHighstScore(pScene.getScoreOne());
                FontMan.Find(Font.Name.HighestScore).updateMessage(pScene.getHighestScore().ToString("D4"));
            }

            this.pUFO.getProxySprite().setGameSprite(GameSpriteMan.Find(GameSprite.Name.UFO_Explosion));
            ExplosionEvent pExplosionEvent = new ExplosionEvent(this.pUFO);

            TimerMan.Add(TimeEvent.Name.ExplosionEvent, pExplosionEvent, 0.1f);

            UFOEvent pUFOEvent = new UFOEvent();

            TimerMan.Add(TimeEvent.Name.MovementAnimation, pUFOEvent, UFOMan.getDeltaTime());
        }