예제 #1
0
파일: ShieldBrick.cs 프로젝트: xfanw/Game
        // 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);
        }
예제 #2
0
파일: BombLeaf.cs 프로젝트: xfanw/Game
        public override void Visit(ShipBulletCol b)
        {
            //BulletGroup hit Bomb --> visit children of Bullet
            GameObject BulletChild = (GameObject)Iterator.GetChild(b);

            CollisionPair.Collide(BulletChild, this);
        }
예제 #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);
        }
예제 #4
0
        public override void Visit(ShipBulletCol a)
        {
            //Bullet Hit WallLeaf ---> Which Bullet
            GameObject BulletChild = (GameObject)Iterator.GetChild(a);

            CollisionPair.Collide(BulletChild, this);
        }
예제 #5
0
파일: UFOCol.cs 프로젝트: 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);
        }
예제 #6
0
파일: WallCol.cs 프로젝트: xfanw/Game
        public override void Visit(ShipBulletCol a)
        {
            //Bullet Hit WallGroup ---> detect wich wall
            GameObject WallChildren = (GameObject)GetFirstChild();

            CollisionPair.Collide(a, WallChildren);
        }
예제 #7
0
파일: ShipMan.cs 프로젝트: xfanw/Game
        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());
        }
예제 #8
0
파일: Visitor.cs 프로젝트: xfanw/Game
 public virtual void Visit(ShipBulletCol b)
 {
 }