Example #1
0
        // Collisions

        // Bullet Hit Shield
        public override void Visit(ShipBulletCol b)
        {
            // Bullet Hit Shield Brick --> visit children of Bullets
            GameObject BulletChild = (GameObject)Iterator.GetChild(b);

            CollisionPair.Collide(BulletChild, this);
        }
Example #2
0
        public override void Visit(ShipBulletCol b)
        {
            //BulletGroup hit Bomb --> visit children of Bullet
            GameObject BulletChild = (GameObject)Iterator.GetChild(b);

            CollisionPair.Collide(BulletChild, this);
        }
Example #3
0
        public override void Visit(ShipBulletCol b)
        {
            //BulletGroup hit AlienGrid Or Collum --> visit children of this
            GameObject AlienChildren = (GameObject)Iterator.GetChild(this);

            CollisionPair.Collide(b, AlienChildren);
        }
Example #4
0
        public override void Visit(ShipBulletCol a)
        {
            //Bullet Hit WallLeaf ---> Which Bullet
            GameObject BulletChild = (GameObject)Iterator.GetChild(a);

            CollisionPair.Collide(BulletChild, this);
        }
Example #5
0
File: UFOCol.cs Project: xfanw/Game
        public override void Visit(ShipBulletCol b)
        {
            //BulletGroup hit UFOGrid --> visit children of this
            GameObject UFO = (GameObject)Iterator.GetChild(this);

            CollisionPair.Collide(b, UFO);
        }
Example #6
0
        public override void Visit(ShipBulletCol a)
        {
            //Bullet Hit WallGroup ---> detect wich wall
            GameObject WallChildren = (GameObject)GetFirstChild();

            CollisionPair.Collide(a, WallChildren);
        }
Example #7
0
        public static void InitializeBullet()
        {
            // get Bullet Group
            ShipBulletCol BulletCol = (ShipBulletCol)GameObjectMan.Find(200, 100).GameObj;

            // if bullet is in the object pool
            if (BulletCol.Reservedchildren.GetHead() != null)
            {
                _ShipMan.BulletLeaf = (ShipBulletLeaf)BulletCol.Reservedchildren.GetHead();
                BulletCol.Reservedchildren.Remove(_ShipMan.BulletLeaf);
                UpdateBulletPos();
                // next line is necessary
                PlayBatchMan.Find(BatchName.Box).Add(GetShipBulletLeaf().CollisionObj.Box);
                PlayBatchMan.Find(BatchName.Box).Add(BulletCol.CollisionObj.Box);
            }
            else    // if bullet is not in the object pool. create new Bullet Obj
            {
                _ShipMan.BulletLeaf = new ShipBulletLeaf(GameSpriteName.ShipBullet, 400, 100, 200, 101);
                UpdateBulletPos();
            }

            BulletCol.Add(GetShipBulletLeaf());
        }
Example #8
0
 public virtual void Visit(ShipBulletCol b)
 {
 }