Example #1
0
        public override void VisitBomb(Bomb b)
        {
            // Bomb vs Wall-Bottom
            CollPair pColPair = CollPairManager.GetActiveCollPair();

            pColPair.SetCollision(b, this);
            pColPair.NotifyListeners();
        }
Example #2
0
        public override void VisitAlien(AlienGO a)
        {
            // Alien vs Wall-Bottom
            CollPair pColPair = CollPairManager.GetActiveCollPair();

            pColPair.SetCollision(a, this);
            pColPair.NotifyListeners();
        }
Example #3
0
        public override void VisitBomb(Bomb b)
        {
            // Bomb vs Ship
            Debug.WriteLine(" ---> Bomb Hit Ship");
            CollPair pColPair = CollPairManager.GetActiveCollPair();

            pColPair.SetCollision(b, this);
            pColPair.NotifyListeners();
        }
Example #4
0
        public override void VisitBumperRight(BumperRight b)
        {
            // Bumper-Left vs ShieldBrick
            //Debug.WriteLine(" ---> Hit bumper Right!");
            CollPair pCollPair = CollPairManager.GetActiveCollPair();

            pCollPair.SetCollision(b, this);
            pCollPair.NotifyListeners();
        }
Example #5
0
        public override void VisitMissile(Missile m)
        {
            // Missile vs ShieldBrick
            //Debug.WriteLine(" ---> Shild Brick Destroyed!");
            CollPair pCollPair = CollPairManager.GetActiveCollPair();

            pCollPair.SetCollision(m, this);
            pCollPair.NotifyListeners();
        }
Example #6
0
        public override void VisitAlien(AlienGO a)
        {
            // Alien vs Shield-Brick
            Debug.WriteLine(" ---> GAAAAAHHHHHHHHH!!!!!!!!");
            CollPair pColPair = CollPairManager.GetActiveCollPair();

            pColPair.SetCollision(a, this);
            pColPair.NotifyListeners();
        }
Example #7
0
        public override void VisitMissile(Missile m)
        {
            // Missile vs Alien
            //Debug.WriteLine("         collide:  {0} <-> {1}", m.GetName(), this.GetName());

            //Alien vs Missile
            Debug.WriteLine("----> Hit an {0}! <-----", this.GetName());

            CollPair pCollPair = CollPairManager.GetActiveCollPair();

            pCollPair.SetCollision(m, this);
            pCollPair.NotifyListeners();
        }
Example #8
0
        public override void VisitMissile(Missile m)
        {
            // Missile vs Wall-Top
            CollPair pCollPair = CollPairManager.GetActiveCollPair();

            Debug.Assert(pCollPair != null);

            // Register collisiton and notify the observers
            pCollPair.SetCollision(m, this);
            pCollPair.NotifyListeners();

            // Who delete the bombs??
        }
Example #9
0
        public override void VisitAlienGrid(AlienGrid ag)
        {
            // AlienGrid vs Wall-Right
            //Debug.WriteLine("\ncollide: {0} with {1}", this, ag);
            //Debug.WriteLine("               --->DONE<----");

            // Set a new direction : Positive means go right -->
            ag.SetDelta(-1.0f);
            ag.SetIsOnWall(true);

            CollPair pCollPair = CollPairManager.GetActiveCollPair();

            Debug.Assert(pCollPair != null);

            // Register collisiton and notify the observers
            pCollPair.SetCollision(ag, this);
            pCollPair.NotifyListeners();
        }