Example #1
0
        // Bomb Hit Shield
        public override void Visit(BombCol b)
        {
            // Bomb Hit Shield Brick --> visit children of Bombs
            GameObject BombChild = (GameObject)Iterator.GetChild(b);

            CollisionPair.Collide(BombChild, this);
        }
Example #2
0
        public override void Visit(BombCol a)
        {
            //Bomb Hit WallLeaf ---> Which Bomb
            GameObject BombChild = (GameObject)Iterator.GetChild(a);

            CollisionPair.Collide(BombChild, this);
        }
Example #3
0
        public override void Visit(BombCol b)
        {
            // Bomb Hit Ship ->Which ship
            GameObject ShipChild = (GameObject)Iterator.GetChild(this);

            CollisionPair.Collide(b, ShipChild);
        }
Example #4
0
        public static void InitializeBomb(float x, float y)
        {
            // get Bomb Group
            BombCol BCol = (BombCol)GameObjectMan.Find(0, 10).GameObj;

            // if bullet is in the object pool
            if (BCol.Reservedchildren.GetHead() != null)
            {
                _BombMan.Bomb = (BombLeaf)BCol.Reservedchildren.GetHead();
                BCol.Reservedchildren.Remove(_BombMan.Bomb);
                UpdateBombPos(x, y);
                _BombMan.Bomb.ResetStrategy();
                // next line is necessary
                PlayBatchMan.Find(BatchName.Box).Add(GetBomb().CollisionObj.Box);
                PlayBatchMan.Find(BatchName.Box).Add(BCol.CollisionObj.Box);
            }
            else    // if bullet is not in the object pool. create new Bullet Obj
            {
                GetRandomBomb();
                UpdateBombPos(x, y);
            }


            BCol.Add(GetBomb());
        }
Example #5
0
        // Collision
        public override void Visit(BombCol b)
        {
            // Bomb Hit ShipLeaf ->Which Bomb
            GameObject BombChild = (GameObject)Iterator.GetChild(b);

            CollisionPair.Collide(BombChild, this);
        }
Example #6
0
        public override void Visit(BombCol a)
        {
            //Bomb Hit WallGroup ---> detect wich wall
            GameObject WallChildren = (GameObject)GetFirstChild();

            CollisionPair.Collide(a, WallChildren);
        }
Example #7
0
        public static void KillAll()
        {
            BombCol     BCol  = (BombCol)GameObjectMan.Find(0, 10).GameObj;
            DLinkedNode Child = BCol.GetFirstChild();

            while (Child != null)
            {
                // Kill all Child
                DLinkedNode NextChild = Child.Next;

                BCol.Remove((BombLeaf)Child);
                // Remove Box Obj
                PlayBatchMan.Find(BatchName.Box).Remove(((BombLeaf)Child).CollisionObj.Box);
                PlayBatchMan.Find(BatchName.Bombs).Remove(((BombLeaf)Child).GetProxy());
                Child = NextChild;
            }
        }
Example #8
0
 public virtual void Visit(BombCol bombCol)
 {
 }