Пример #1
0
        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);
        }
Пример #2
0
        public override void visitPlungerBomb(PlungerBomb b)
        {
            Debug.WriteLine("CannonShip PlungerBomb");
            Debug.WriteLine("Both tress finished to roots");

            CollisionPair currColPair = CollisionPairManager.getCurrentColPair();

            Debug.Assert(currColPair != null);
            currColPair.setSubject(b, this);
            currColPair.notifyObserver();
        }
Пример #3
0
 public override void visitPlungerBomb(PlungerBomb b)
 {
     // Debug.WriteLine("WallRoot PlungerBomb");
     CollisionPair.detectCollision(b, (GameObject)this.pChild);
 }
 public virtual void visitPlungerBomb(PlungerBomb b)
 {
 }