// 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); }
public override void Visit(ShipBulletCol b) { //BulletGroup hit Bomb --> visit children of Bullet GameObject BulletChild = (GameObject)Iterator.GetChild(b); CollisionPair.Collide(BulletChild, this); }
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); }
public override void Visit(ShipBulletCol a) { //Bullet Hit WallLeaf ---> Which Bullet GameObject BulletChild = (GameObject)Iterator.GetChild(a); CollisionPair.Collide(BulletChild, this); }
public override void Visit(ShipBulletCol b) { //BulletGroup hit UFOGrid --> visit children of this GameObject UFO = (GameObject)Iterator.GetChild(this); CollisionPair.Collide(b, UFO); }
public override void Visit(ShipBulletCol a) { //Bullet Hit WallGroup ---> detect wich wall GameObject WallChildren = (GameObject)GetFirstChild(); CollisionPair.Collide(a, WallChildren); }
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()); }
public virtual void Visit(ShipBulletCol b) { }