//--------------------------------------------------------------------------------------------------------- // Override abstract methods //--------------------------------------------------------------------------------------------------------- public override void notify() { if (this.pKiller == GameObject.Name.Missile) { this.pBrick = (ShieldBrick)this.pSubject.pObjA; } else if (this.pKiller == GameObject.Name.Bomb) { this.pBrick = (ShieldBrick)this.pSubject.pObjB; } Debug.Assert(this.pBrick != null); if (pBrick.bMarkForDeath == false) { pBrick.bMarkForDeath = true; // Delay RemoveShieldObserver pObserver = new RemoveShieldObserver(this); DelayedObjectMan.Attach(pObserver); } }
public RemoveShieldObserver(RemoveShieldObserver b) { Debug.Assert(b != null); this.pBrick = b.pBrick; }