예제 #1
0
        public override void VisitLeftUFO(LeftUFO m)
        {
            // MissileRoot vs WallRoot
            GameObject pGameObj = (GameObject)Iterator.GetChild(this);

            ColPair.Collide(m, pGameObj);
        }
예제 #2
0
        public override void Execute(float deltaTime, TimeEvent.Name name)
        {
            GameObject pUFO = null;

            switch (this.flag)
            {
            case false:
                pUFO      = new LeftUFO(gameObjectName, spriteName, 800, 600);
                this.flag = true;
                break;

            case true:
                pUFO      = new RightUFO(gameObjectName, spriteName, 100, 600);
                this.flag = false;
                break;

            default:
                // something is wrong
                Debug.Assert(false);
                break;
            }
            this.pTree.Add(pUFO);

            // Attached to Group
            pUFO.ActivateGameSprite(this.pSpriteBatch);
            pUFO.ActivateCollisionSprite(this.pCollisionSpriteBatch);

            Random rnd = new Random();
            int    num = rnd.Next(20, 50);

            TimerMan.Add(name, this, num);
        }
예제 #3
0
        public override void VisitLeftUFO(LeftUFO a)
        {
            Debug.WriteLine("   --->DONE<----");

            ColPair pColPair = ColPairMan.GetActiveColPair();

            Debug.Assert(pColPair != null);

            pColPair.SetCollision(a, this);
            pColPair.NotifyListeners();
        }
예제 #4
0
 public virtual void VisitLeftUFO(LeftUFO s)
 {
     Debug.WriteLine("Visit by Left Moving UFO not implemented");
     Debug.Assert(false);
 }