public Bomb createBomb(Bomb.BombType mBombType, GameObject.GameObjectName gameName, int index = 0, float mX = 0.0f, float mY = 0.0f)
        {
            Bomb bomb = null;

            switch (mBombType)
            {
            case Bomb.BombType.Flipping:
                bomb = new FlippingBomb(gameName, Sprite.SpriteName.Flipping, index, mX, mY, mBombType);
                break;

            case Bomb.BombType.ZigZag:
                bomb = new ZigZagBomb(gameName, Sprite.SpriteName.ZigZag, index, mX, mY, mBombType);
                break;

            case Bomb.BombType.Plunger:
                bomb = new PlungerBomb(gameName, Sprite.SpriteName.Plunger, index, mX, mY, mBombType);
                break;

            case Bomb.BombType.BombRoot:
                bomb = new BombRoot(gameName, Sprite.SpriteName.NullObject, index, mX, mY, mBombType);
                GameObjectNodeManager.add(bomb, cPCSTree);
                break;

            case Bomb.BombType.Uninitilized:
                Debug.WriteLine("Bomb Type is Uninitilized");
                break;
            }

            activate(bomb);
            return(bomb);
        }
        public override void visitZigZagBomb(ZigZagBomb b)
        {
            Debug.WriteLine("ShieldBrick ZigZagBomb");
            Debug.WriteLine("Both tress finished to roots");

            CollisionPair currColPair = CollisionPairManager.getCurrentColPair();

            Debug.Assert(currColPair != null);
            currColPair.setSubject(b, this);
            currColPair.notifyObserver();
        }
Exemple #3
0
 public override void visitZigZagBomb(ZigZagBomb b)
 {
     //Debug.WriteLine("WallRoot ZigZagBomb");
     CollisionPair.detectCollision(b, (GameObject)this.pChild);
 }
 public virtual void visitZigZagBomb(ZigZagBomb b)
 {
 }