public override void Update()
        {
            GameObject pExplosion = GameObjectManager.Find(this.goName);

            if (pExplosion.markedForDeath == false)
            {
                pExplosion.markedForDeath = true;
                RemoveExplosionObserver pObserver = new RemoveExplosionObserver(pExplosion);
                DelayedGameObjectManager.Attach(pObserver);
            }
        }
Esempio n. 2
0
        public override void Update()
        {
            GameObject pSplat = GameObjectManager.Find(GameObjectName.Splat);

            if (pSplat.markedForDeath == false)
            {
                pSplat.markedForDeath = true;
                RemoveSplatObserver pObserver = new RemoveSplatObserver(pSplat);
                DelayedGameObjectManager.Attach(pObserver);
            }
        }
Esempio n. 3
0
        public override void Update()
        {
            //Debug.WriteLine("RemoveAlienObserver: {0} {1}", this.pSubject.goA, this.pSubject.goB);
            GameObject pAlien = this.pSubject.goB;

            if (pAlien.markedForDeath == false)
            {
                pAlien.markedForDeath = true;
                RemoveAlienObserver pObserver = new RemoveAlienObserver(pAlien);
                DelayedGameObjectManager.Attach(pObserver);
            }
        }
        public override void Update()
        {
            Debug.WriteLine("ShipRemoveMissileObserver: {0} {1}", this.pSubject.goA, this.pSubject.goB);

            this.pMissile = Missile.GetMissile(this.pSubject.goA, this.pSubject.goB);
            Debug.WriteLine("MissileRemoveObserver: --> delete missile {0}", pMissile);
            if (pMissile.markedForDeath == false)
            {
                pMissile.markedForDeath = true;
                ShipRemoveMissileObserver pObserver = new ShipRemoveMissileObserver(this);
                DelayedGameObjectManager.Attach(pObserver);
            }
        }
Esempio n. 5
0
        public override void Update()
        {
            //Debug.WriteLine("RemoveBrickObserver: {0} {1}", this.pSubject.goA, this.pSubject.goB);

            this.pBrick = (ShieldBrick)this.pSubject.goB;
            //Debug.WriteLine("BrickRemoveObserver: --> delete missile {0}", pBrick);
            if (pBrick.markedForDeath == false)
            {
                pBrick.markedForDeath = true;
                RemoveBrickObserver pObserver = new RemoveBrickObserver(this);
                DelayedGameObjectManager.Attach(pObserver);
            }
        }
Esempio n. 6
0
        public override void Update()
        {
            //Debug.WriteLine("RemoveBombObserver: {0} {1}", this.pSubject.goA, this.pSubject.goB);

            //this.pBomb = (Bomb)this.pSubject.goA;
            this.pBomb = Bomb.GetBomb(this.pSubject.goA, this.pSubject.goB);
            Debug.Assert(this.pBomb != null);
            //Debug.WriteLine("BombRemoveObserver: --> delete bomb {0}", pBomb);
            if (pBomb.markedForDeath == false)
            {
                pBomb.markedForDeath = true;
                RemoveBombObserver pObserver = new RemoveBombObserver(this);
                DelayedGameObjectManager.Attach(pObserver);
            }
        }