コード例 #1
0
        public override void Notify()
        {
            GameObject pObject = this.pSubject.pObjB;

            Debug.Assert(pObject != null);

            GameSprite pUFOSplat = GameSpriteMan.Find(GameSprite.Name.UFOsplat);

            //future concept
            //pObject.GetProxy().SetRealSprite(this.pSprite);


            //get the locations and render the image
            pUFOSplat.PosX(pObject.x);
            pUFOSplat.PosY(pObject.y);
            pUFOSplat.Update();

            SpriteBatch pSB_Aliens = SpriteBatchMan.Find(SpriteBatch.Name.Aliens);


            pSB_Aliens.Attach(pUFOSplat);


            TimerMan.Add(TimeEvent.Name.SplatAnim, new SplatAnim(pUFOSplat, pSB_Aliens), 0.5f);
        }
コード例 #2
0
        public override void Notify()
        {
            //when this notify is called we swap the images and draw it to the alien spritebatch
            //then maybe add a time event that..... removes it somehow... remove from spritebatch after a half second

            GameObject pObject = this.pSubject.pObjB;

            Debug.Assert(pObject != null);

            GameSprite pShipSplat = GameSpriteMan.Find(GameSprite.Name.ShipSplat);

            //future concept
            //pObject.GetProxy().SetRealSprite(this.pSprite);


            //get the locations and render the image
            //I'm really upset about this........ but here we are creating a new
            pShipSplat.PosX(pObject.x);
            pShipSplat.PosY(pObject.y);
            pShipSplat.Update();

            SpriteBatch pSB_Aliens = SpriteBatchMan.Find(SpriteBatch.Name.Aliens);

            pSB_Aliens.Attach(pShipSplat);

            TimerMan.Add(TimeEvent.Name.SplatAnim, new SplatAnim(pShipSplat, pSB_Aliens), 0.5f);
        }