public void loadBombs() { BombFactory bombFactory = FactoryManager.getBombFactry(); Bomb bombRoot = bombFactory.createBomb(Bomb.BombType.BombRoot, GameObject.GameObjectName.BombRoot); bombFactory.setParent(bombRoot); Bomb ZigZag = null; ZigZag = bombFactory.createBomb(Bomb.BombType.ZigZag, GameObject.GameObjectName.Bomb, 0, 996, 1024); ActivateBombSprite abs = new ActivateBombSprite(ZigZag); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs, 1); Bomb FlippingBomb = null; FlippingBomb = bombFactory.createBomb(Bomb.BombType.Flipping, GameObject.GameObjectName.Bomb, 1, 996, 1024); ActivateBombSprite abs2 = new ActivateBombSprite(FlippingBomb); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs2, 3); Bomb plungerBomb = null; plungerBomb = bombFactory.createBomb(Bomb.BombType.Plunger, GameObject.GameObjectName.Bomb, 2, 996, 1024); ActivateBombSprite abs3 = new ActivateBombSprite(plungerBomb); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs3, 5); Bomb ZigZag1 = null; ZigZag1 = bombFactory.createBomb(Bomb.BombType.ZigZag, GameObject.GameObjectName.Bomb, 0, 996, 1024); ActivateBombSprite abs4 = new ActivateBombSprite(ZigZag1); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs4, 6); Bomb FlippingBomb1 = null; FlippingBomb1 = bombFactory.createBomb(Bomb.BombType.Flipping, GameObject.GameObjectName.Bomb, 1, 996, 1024); ActivateBombSprite abs5 = new ActivateBombSprite(FlippingBomb1); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs5, 7); Bomb plungerBomb1 = null; plungerBomb1 = bombFactory.createBomb(Bomb.BombType.Plunger, GameObject.GameObjectName.Bomb, 2, 996, 1024); ActivateBombSprite abs6 = new ActivateBombSprite(plungerBomb1); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs6, 8); }
public override void notify() { Debug.WriteLine("Inside BombCollideObserver"); int random = Utilty.getRandomNum(5, 10); Bomb bomb = (Bomb)this.colSubject.gameObjA; // bomb.reset(); // Debug.Assert(bomb != null); bomb.remove(); ActivateBombSprite abs = new ActivateBombSprite(); TimerManager.sortedAdd(TimerEvent.TimerEventName.ActivateGameEnd, abs, random); }