Exemplo n.º 1
0
 public override void Notify()
 {
     if (IsValidCollision() && this.pBrick.isDead == false)
     {
         this.pBrick.isDead = true;
         DelayRemoveManager.Attach(new RemoveBrickObserver(this));
     }
 }
Exemplo n.º 2
0
 private static DelayRemoveManager PrivGetInstance()
 {
     if (pInstance == null)
     {
         pInstance = new DelayRemoveManager();
     }
     Debug.Assert(pInstance != null);
     return(pInstance);
 }
Exemplo n.º 3
0
        public override void Notify()
        {
            if (IsValidCollision() && !this.pBomb.isDead)
            {
                pBomb.isDead = true;

                ExplosionManager.GetBombExplosion(this.pBomb);

                DelayRemoveManager.Attach(new RemoveBombObserver(this));
            }
        }
Exemplo n.º 4
0
        static public void RemoveAll()
        {
            DelayRemoveManager pMan  = DelayRemoveManager.PrivGetInstance();
            CollisionObservers pNode = pMan.head;
            CollisionObservers pTmp  = null;

            while (pNode != null)
            {
                pTmp  = pNode;
                pNode = (CollisionObservers)pNode.pNext;
                pMan.PrivDetach(pTmp, ref pMan.head);
            }
        }
Exemplo n.º 5
0
 public override void Notify()
 {
     if (this.IsValidCollision())
     {
         if (this.pAlien.isDead == false)
         {
             SoundManager.Play(Sound.Name.AlienExplode);
             this.pAlien.isDead = true;
             ExplosionManager.GetAlienExplosion(this.pAlien);
             DelayRemoveManager.Attach(new RemoveAlienObserver(this));
         }
     }
 }
Exemplo n.º 6
0
        public override void Notify()
        {
            if (this.IsValidCollision())
            {
                if (this.pMissile.isDead == false)
                {
                    Player pPlayer = PlayerManager.GetPlayer();
                    Debug.Assert(pPlayer != null);
                    pPlayer.SetShootingState(PlayerManager.ShootState.MissileReady);

                    this.pMissile.isDead = true;
                    this.pMissile.SetFlyingStatus(false);

                    DelayRemoveManager.Attach(new RemoveMissileObserver(this));
                }
            }
        }
Exemplo n.º 7
0
        static public void Attach(CollisionObservers pObs)
        {
            Debug.Assert(pObs != null);

            DelayRemoveManager pMan = DelayRemoveManager.PrivGetInstance();

            if (pMan.head == null)
            {
                pMan.head  = pObs;
                pObs.pNext = null;
                pObs.pPrev = null;
            }
            else
            {
                pObs.pNext      = pMan.head;
                pObs.pPrev      = null;
                pMan.head.pPrev = pObs;
                pMan.head       = pObs;
            }
        }