public RemoveShipObserver(RemoveShipObserver m) { Debug.Assert(m.pShip != null); this.pShip = m.pShip; this.scenePlay = m.scenePlay; }
public override void Notify() { this.pShip = this.pSubject.pObjB; if (this.pShip.bMarkForDeath == false) { this.pShip.bMarkForDeath = true; // Delay - remove object later // TODO - reduce the new functions RemoveShipObserver pObserver = new RemoveShipObserver(this); DelayedObjectManager.Attach(pObserver); } }
//---------------------------------------------------------------------- // Override abstract class //---------------------------------------------------------------------- public override void notify() { this.pShip = (Ship)this.pSubject.pObjB; Debug.Assert(this.pShip != null); if (pShip.bMarkForDeath == false) { pShip.bMarkForDeath = true; // Delay RemoveShipObserver pObserver = new RemoveShipObserver(this); DelayedObjectMan.Attach(pObserver); } }
public override void Notify() { // Delete missile //Debug.WriteLine("RemoveBrickObserver: {0} {1}", this.pSubject.pObjA, this.pSubject.pObjB); this.pShip = (Ship)this.pSubject.pObjB; Debug.Assert(this.pShip != null); if (pShip.bMarkForDeath == false) { pShip.bMarkForDeath = true; // Delay RemoveShipObserver pObserver = new RemoveShipObserver(this); DelayedObjectMan.Attach(pObserver); } }
public override void Notify() { // At this point we have two game objects // Actually we can control the objects in the visitor // Alphabetical ordering... A is missile, B is wall // This cast will throw an exception if I'm wrong this.pShip = (Ship)this.pSubject.pObjB; if (pShip.bMarkForDeath == false) { pShip.bMarkForDeath = true; // Delay - remove object later // TODO - reduce the new functions RemoveShipObserver pObserver = new RemoveShipObserver(this); DelayedObjectMan.Attach(pObserver); } }
public RemoveShipObserver(RemoveShipObserver observer) { this.pShip = observer.pShip; }
public RemoveShipObserver(RemoveShipObserver b) { Debug.Assert(b != null); this.pShip = b.pShip; }
public RemoveShipObserver(RemoveShipObserver m) { Debug.Assert(m.pShip != null); this.pShip = m.pShip; }
public RemoveShipObserver(RemoveShipObserver b) { this.pShip = b.pShip; }