Ejemplo n.º 1
0
        public override void Notify()
        {
            GameObject placeObject;

            if (this.p == 1)
            {
                placeObject = this.pSubject.pObjA;
            }
            else
            {
                placeObject = this.pSubject.pObjB;
            }

            // TODO new ??
            GameObject pGameObjDies = this.factory.Create(this.pGOname, this.pGSname, this.container, placeObject.x, placeObject.y);

            //SpriteBatch pSB_Aliens = SpriteBatchMan.Find(SpriteBatch.Name.Aliens);
            //SpriteBatch pSB_Box = SpriteBatchMan.Find(SpriteBatch.Name.Boxes);

            //GameObject pGameObjDies = new AlienDies(this.pGOname, this.pGSname, placeObject.x, placeObject.y);
            //GameObject pExplosionGroup = GameObjectMan.Find(GameObject.Name.ExplosionGroup);
            //Debug.Assert(pExplosionGroup != null);

            //pExplosionGroup.Add(pGameObjDies);

            //pGameObjDies.ActivateGameSprite(pSB_Aliens);
            //pGameObjDies.ActivateCollisionSprite(pSB_Box);

            this.pGameObj = pGameObjDies;

            if (pGameObj.bMarkForDeath == false)
            {
                pGameObj.bMarkForDeath = true;
                //   Delay
                AnimExplosionObserver pObserver = new AnimExplosionObserver(this);
                DelayedObjectMan.Attach(pObserver);
            }
        }
Ejemplo n.º 2
0
 public AnimExplosionObserver(AnimExplosionObserver b)
 {
     Debug.Assert(b != null);
     this.pGameObj = b.pGameObj;
 }