Exemple #1
0
        public override void VisitBumperRight(BumperRight wr)
        {
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(wr, this);
            pColPair.NotifyListeners();
        }
Exemple #2
0
        public override void VisitMissileGroup(MissileGroup mg)
        {
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(this, mg);
            pColPair.NotifyListeners();
        }
Exemple #3
0
        public override void VisitWallLeft(WallLeft wl)
        {
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(this, wl);
            pColPair.NotifyListeners();
        }
Exemple #4
0
        public override void VisitAlienGroup(AlienGroup ag)
        {
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            Debug.Assert(pColPair != null);
            pColPair.SetObserverSubject(ag, this);
            pColPair.NotifyListeners();
        }
Exemple #5
0
        public override void VisitMissile(Missile m)
        {
            ScoreManager.AddScoreToPlayer1(20);
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(m, this);
            pColPair.NotifyListeners();
        }
Exemple #6
0
        public override void VisitBomb(Bomb b)
        {
            Debug.Assert(b != null);
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(b, this);
            pColPair.NotifyListeners();
        }
Exemple #7
0
        public override void VisitShieldBrick(ShieldBrick sb)
        {
            Debug.Assert(sb != null);
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(sb, this);
            pColPair.NotifyListeners();
        }
Exemple #8
0
        public override void VisitShieldBrick(ShieldBrick sb)
        {
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();

            pColPair.SetObserverSubject(sb, this);
            pColPair.NotifyListeners();

            // Shield will be deactivated by removeObserver
        }
Exemple #9
0
        public override void VisitShieldBrick(ShieldBrick sb)
        {
            Debug.Assert(sb != null);
            CollisionPair pColPair = CollisionPairManager.GetCurrentCollisionPair();
            pColPair.SetObserverSubject(sb, this);
            pColPair.NotifyListeners();

            // The bomb and shield will be dealt with by RemoveObserver...
        }