public override void VisitWallRight(WallRight r) { ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(r, this); pColPair.NotifyListeners(); }
public override void Visit(BombLeaf b) { CollisionPair pair = ColPairMan.Find(CollisionPairName.Bomb_Shield); pair.SetCollision(b, this); pair.Notify(); }
static public ColPair GetActiveColPair() { // get the singleton ColPairMan pMan = ColPairMan.privGetInstance(); return(pMan.pActiveColPair); }
public override void VisitMissile(Missile m) { // Missile vs Column ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(m, this); }
public override void VisitGroup(AlienGrid a) { ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(a, this); pColPair.NotifyListeners(); }
public override void VisitBomb(Bomb b) { ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(b, this); pColPair.NotifyListeners(); }
public override void VisitShip(Ship s) { ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(s, this); pColPair.NotifyListeners(); }
override public void Execute(float deltaTime) { float value = pRandom.Next(10, 60); UFO pUFO = new UFO(GameObject.Name.UFO, GameSprite.Name.UFO, 100, 515); ColPair pColPair = ColPairMan.Add(ColPair.Name.UFO_WallLeft, pUFO, this.pWallLeft); pColPair.Attach(new UFOWallLeftObserver()); pColPair = ColPairMan.Add(ColPair.Name.UFO_WallRight, pUFO, this.pWallRight); pColPair.Attach(new UFOWallRightObserver()); MissileGroup pMissile = (MissileGroup)GameObjectMan.Find(GameObject.Name.MissileGroup); pColPair = ColPairMan.Add(ColPair.Name.UFOMissile, pUFO, pMissile); pColPair.Attach(new RemoveUFOObserver()); pUFO.ActivateCollisionSprite(this.pSB_Boxes); pUFO.ActivateGameSprite(this.pSB_Aliens); GameObjectMan.Attach(pUFO); Sound.Name pSoundName = Sound.Name.Uninitialized; switch (pRandom.Next(0, 1)) { case (0): pSoundName = Sound.Name.UFOLow; break; case (1): pSoundName = Sound.Name.UFOHigh; break; } SoundMan.PlaySound(pSoundName); TimerMan.Add(TimeEvent.Name.UFO, this, value); }
// public public static void Create(int init = 2, int delta = 2) { if (pMan == null) { pMan = new ColPairMan(init, delta); } }
public override void VisitOctopus(Octopus a) { ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(this, a); pColPair.NotifyListeners(); }
public override void Visit(UFOLeaf a) { CollisionPair pair = ColPairMan.Find(CollisionPairName.UFO_Wall); pair.SetCollision(this, a); pair.Notify(); }
public override void Visit(BombLeaf a) { CollisionPair pair = ColPairMan.Find(CollisionPairName.Bomb_Wall); pair.SetCollision(a, this); pair.Notify(); }
public override void VisitBomb(Bomb u) { ColPair cp = ColPairMan.GetActiveColPair(); cp.SetCollision(u, this); cp.NotifyListeners(); }
public override void VisitMissile(Missile m) { ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(m, this); pColPair.NotifyListeners(); }
override public void Update(float systemTime) { // Snd update - keeps everything moving and updating smoothly sndEngine.Update(); // Single Step, Free running... Simulation.Update(systemTime); // Input InputMan.Update(); // Run based on simulation stepping if (Simulation.GetTimeStep() > 0.0f) { // Fire off the timer events TimerMan.Update(Simulation.GetTotalTime()); // walk through all objects and push to flyweight GameObjectMan.Update(); // Do the collision checks ColPairMan.Process(); // Delete any objects here... DelayedObjectMan.Process(); } }
public override void VisitMissile(Missile m) { // Missile vs WallTop //Debug.WriteLine(" ---> Done"); ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(m, this); pColPair.NotifyListeners(); }
public override void VisitGroup(AlienGroup a) { //Aliens Got to the bottom Game Over ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(a, this); pColPair.NotifyListeners(); }
public static void Dump() { ColPairMan pMan = ColPairMan.privGetInstance(); Debug.Assert(pMan != null); pMan.baseDump(); }
public override void Visit(ShipBulletLeaf a) { //Bullet Hit WallLeaf ---> reset CollisionPair pair = ColPairMan.Find(CollisionPairName.Bullet_Wall); pair.SetCollision(a, this); pair.Notify(); }
// Collision public override void Visit(AliensCol a) { // Alien Col hit Wall -> change direction CollisionPair pair = ColPairMan.Find(CollisionPairName.Alien_Wall); pair.Notify(); Nums.AlienDeltaX *= -1; }
// Alien Hit Shield public override void Visit(AliensCol b) { // Alien Hit Shield Brick --> visit children of Aliens CollisionPair pair = ColPairMan.Find(CollisionPairName.Alien_Shield); pair.SetCollision(b, this); pair.Notify(); }
static public ColPair GetActiveColPair() { ColPairMan pMan = ColPairMan.PrivGetInstance(); Debug.Assert(pMan != null); return(pMan.pActiveColPair); }
public override void Visit(ShipBulletLeaf b) { //Bullet hit Bullet --> Do Something CollisionPair pair = ColPairMan.Find(CollisionPairName.Bullet_Bomb); pair.SetCollision(b, this); pair.Notify(); }
public override void Visit(BombLeaf b) { // Bombleaf Hit Shipleaf ->Do Something CollisionPair pair = ColPairMan.Find(CollisionPairName.Bomb_Ship); pair.SetCollision(b, this); pair.Notify(); }
public override void VisitBomb(Bomb b) { //Debug.WriteLine(" ---> Done"); ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(b, this); pColPair.NotifyListeners(); }
private void Hit(GameObject a, GameObject b) { Debug.WriteLine("Alien Hit by Missle"); ColPair pPair = ColPairMan.GetActivePair(); pPair.SetCollision(a, b); pPair.NotifyObservers(); }
private static ColPairMan GetInstance(int t = 4, int d = 1) { if (_ColMan == null) { _ColMan = new ColPairMan(t, d); } return(_ColMan); }
public override void VisitAlien(AlienCategory a) { //Alien v Shield Brick ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(a, this); pColPair.NotifyListeners(); }
public static void Remove(ColPair pNode) { ColPairMan pMan = ColPairMan.privGetInstance(); Debug.Assert(pMan != null); Debug.Assert(pNode != null); pMan.baseRemove(pNode); }
public override void VisitWallGroup(WallGroup w) { Debug.Assert(w != null); ColPair pColPair = ColPairMan.GetActiveColPair(); pColPair.SetCollision(w, this); pColPair.NotifyListeners(); }