コード例 #1
0
        public override void Notify()
        {
            // Delete missile
            //Debug.WriteLine("RemoveBrickObserver: {0} {1}", this.pSubject.pObjA, this.pSubject.pObjB);

            this.pBomb = (Bomb)this.pSubject.pObjB;
            Debug.Assert(this.pBomb != null);

            if (pBomb.bMarkForDeath == false)
            {
                pBomb.bMarkForDeath = true;
                //   Delay
                RemoveBomb2Observer pObserver = new RemoveBomb2Observer(this);
                DelayedObjectMan.Attach(pObserver);
            }
        }
コード例 #2
0
 public RemoveBomb2Observer(RemoveBomb2Observer b)
 {
     Debug.Assert(b != null);
     this.pBomb = b.pBomb;
 }