コード例 #1
0
        public RemoveShipObserver(RemoveShipObserver m)
        {
            Debug.Assert(m.pShip != null);
            this.pShip = m.pShip;

            this.scenePlay = m.scenePlay;
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        //----------------------------------------------------------------------
        // 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);
            }
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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);
            }
        }
コード例 #6
0
 public RemoveShipObserver(RemoveShipObserver observer)
 {
     this.pShip = observer.pShip;
 }
コード例 #7
0
 public RemoveShipObserver(RemoveShipObserver b)
 {
     Debug.Assert(b != null);
     this.pShip = b.pShip;
 }
コード例 #8
0
 public RemoveShipObserver(RemoveShipObserver m)
 {
     Debug.Assert(m.pShip != null);
     this.pShip = m.pShip;
 }
コード例 #9
0
 public RemoveShipObserver(RemoveShipObserver b)
 {
     this.pShip = b.pShip;
 }