Ejemplo n.º 1
0
        public UFO createUFO(UFO.UFOType mUfoType, GameObject.GameObjectName gameName, int index = 0, float mX = 0.0f, float mY = 0.0f)
        {
            UFO ufo = null;

            switch (mUfoType)
            {
            case UFO.UFOType.UFORoot:
                ufo = new UFORoot(gameName, Sprite.SpriteName.NullObject, index, mX, mY, UFO.UFOType.UFORoot);
                GameObjectNodeManager.add(ufo, cPCSTree);
                break;

            case UFO.UFOType.AlienUFO:
                ufo = new AlienUFO(gameName, Sprite.SpriteName.AlienUFO, index, mX, mY, UFO.UFOType.AlienUFO);
                break;

            case UFO.UFOType.Uninitilized:
                Debug.WriteLine("ufo Type is Uninitilized");
                break;
            }

            this.cPCSTree.Insert(ufo, this.cParent);
            ufo.addSpriteToBatch(this.cSpriteBatch);
            ufo.addCollisionToBatch(SpriteBatchManager.find(SpriteBatch.SpriteBatchName.Boxes));
            return(ufo);
        }
Ejemplo n.º 2
0
 public override void execute(float deltaTime)
 {
     if (ufo.type == UFO.UFOType.AlienUFO)
     {
         AlienUFO af = (AlienUFO)ufo;
         af.swapImage(Sprite.SpriteName.AlienUFO);
         af.reset();
     }
 }
Ejemplo n.º 3
0
        public override void visitAlienUFO(AlienUFO u)
        {
            Debug.WriteLine("StraightMissile AlienUFO");
            Debug.WriteLine("Both tress finished to roots");
            CollisionPair currColPair = CollisionPairManager.getCurrentColPair();

            Debug.Assert(currColPair != null);
            currColPair.setSubject(this, u);
            currColPair.notifyObserver();
        }
Ejemplo n.º 4
0
 public override void visitAlienUFO(AlienUFO u)
 {
     //Debug.WriteLine("WallRoot AlienUFO");
     CollisionPair.detectCollision(u, (GameObject)this.pChild);
 }
 //UFO
 public virtual void visitAlienUFO(AlienUFO u)
 {
 }