void contactListener_FireballShotContact(object sender, BeginContactEventArgs e) { //sprite A fireball shot, sprite b object switch (e.spriteB.SpriteType) { case Sprite.Type.Star: { contactListener.CollectStar(e.spriteB); break; } case Sprite.Type.Terrain: case Sprite.Type.Fruit: case Sprite.Type.Veggie: case Sprite.Type.StaticBlock: case Sprite.Type.CannonBall: case Sprite.Type.Switch: case Sprite.Type.Explosive: case Sprite.Type.Fan: case Sprite.Type.Beehive: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: { e.spriteA.IsHit = true; break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB,1,Sprite.Type.FireballShot); break; } case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, int.MaxValue, Sprite.Type.FireballShot); break; } case Sprite.Type.Block: { //go through ice and kill it, other blocks explode the shot if (e.spriteB.TextureIndex == 3) contactListener.DamageToBlock(e.spriteB, int.MaxValue, e.spriteA.SpriteType); else e.spriteA.IsHit = true; break; } default: break; } return; }
void contactListener_ExplosionContact(object sender, BeginContactEventArgs e) { //the explosion object is the "Kill radius" explosion object // spriteA is explosion, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: case Sprite.Type.ExplosiveShot: { contactListener.DamageToShot(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Block: { contactListener.DamageToBlock(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Switch: { contactListener.DamageToSwitch(e.spriteB, 1, e.spriteA.SpriteType); break; } default: break; } return; }
void contactListener_FanWindContact(object sender, BeginContactEventArgs e) { //spriteA WInd, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: case Sprite.Type.ExplosiveShot: case Sprite.Type.CannonballShot: case Sprite.Type.Fruit: case Sprite.Type.Veggie: case Sprite.Type.Explosive: case Sprite.Type.Snowball: case Sprite.Type.Block: case Sprite.Type.CannonBall: { contactListener.ActivateWindDeflection(e.spriteA, e.spriteB); break; } default: break; } return; }
void contactListener_BeehiveContact(object sender, BeginContactEventArgs e) { // spriteA beehive, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: { contactListener.DamageToShot(e.spriteB, 1, e.spriteA.SpriteType); contactListener.ActivateBee(e.spriteA, e.spriteB); break; } case Sprite.Type.FireballShot: case Sprite.Type.IceShot: { e.spriteB.IsHit = true; break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, 1, e.spriteA.SpriteType); contactListener.ActivateBee(e.spriteA, e.spriteB); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, 1, e.spriteA.SpriteType); contactListener.ActivateBee(e.spriteA, e.spriteB); break; } case Sprite.Type.ExplosiveShot: case Sprite.Type.Explosive: case Sprite.Type.Snowball: { contactListener.ActivateBee(e.spriteA, e.spriteB); break; } case Sprite.Type.Saw: case Sprite.Type.SawShot: case Sprite.Type.CannonBall: case Sprite.Type.CannonballShot: case Sprite.Type.LightningShot: case Sprite.Type.Explosion: case Sprite.Type.FireballBlast: case Sprite.Type.LightningBlast: { contactListener.DamageToBee(e.spriteA, int.MaxValue, e.spriteB.SpriteType); break; } default: break; } return; }
void contactListener_BossContact(object sender, BeginContactEventArgs e) { if (e.spriteB.SpriteType == Sprite.Type.FruitShot) { contactListener.DamageToShot(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.DamageToBoss(e.spriteA, 1, e.spriteB.SpriteType); } }
void contactListener_IceBlastContact(object sender, BeginContactEventArgs e) { }
//for xxxContact Events, sprite A is xxx and sprite B is the object contacted void contactListener_StarContact(object sender, BeginContactEventArgs e) { // spriteA is Star, spriteB is Object switch (e.spriteB.SpriteType) { //if the object is the player shot, collect the star case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: case Sprite.Type.FireballShot: case Sprite.Type.IceShot: case Sprite.Type.LightningShot: case Sprite.Type.ExplosiveShot: case Sprite.Type.CannonballShot: case Sprite.Type.SawShot: { contactListener.CollectStar(e.spriteA); break; } default: break; } return; }
//setup done void contactListener_SmasherContact(object sender, BeginContactEventArgs e) { // spriteA smasher, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: case Sprite.Type.ExplosiveShot: { contactListener.DamageToShot(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.LightningShot: case Sprite.Type.LightningBlast: { contactListener.ExplodeLitShot(e.spriteB); break; } case Sprite.Type.Block: { contactListener.DamageToBlock(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } default: break; } return; }
void contactListener_SpikeContact(object sender, BeginContactEventArgs e) { // spriteA spike, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: { contactListener.DamageToShot(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } default: break; } return; }
void contactListener_PowerUpContact(object sender, BeginContactEventArgs e) { // spriteA powerup Barrel, spriteB object switch (e.spriteB.SpriteType) { //if the object is a shot, call next event case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: case Sprite.Type.ExplosiveShot: case Sprite.Type.CannonballShot: case Sprite.Type.SawShot: { contactListener.ActivatePowerUp(e.spriteB, e.spriteA); break; } default: break; } return; }
void contactListener_SawShotContact(object sender, BeginContactEventArgs e) { // spriteA sawshot, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.Block: { contactListener.DamageToBlock(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.SawIsCutting(e.spriteA, e.spriteB); break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.SawIsCutting(e.spriteA, e.spriteB); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.SawIsCutting(e.spriteA, e.spriteB); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.SawIsCutting(e.spriteA, e.spriteB); break; } case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.SawIsCutting(e.spriteA, e.spriteB); break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB, int.MaxValue, e.spriteA.SpriteType); contactListener.SawIsCutting(e.spriteA, e.spriteB); break; } case Sprite.Type.Switch: { contactListener.DamageToSwitch(e.spriteB, 1, e.spriteA.SpriteType); break; } default: break; } return; }
void contactListener_LightningShotContact(object sender, BeginContactEventArgs e) { int damage = 9; switch (e.spriteB.SpriteType) { case Sprite.Type.Star: { contactListener.CollectStar(e.spriteB); break; } case Sprite.Type.Terrain: { e.spriteA.IsHit = true; break; } case Sprite.Type.Block: { if (e.spriteA.TextureIndex == 2) //stone triggers blast { e.spriteA.IsHit = true; } else { contactListener.DamageToBlock(e.spriteB, damage, e.spriteA.SpriteType); } break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Saw: { contactListener.DamageToSaw(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Fan: { contactListener.DamageToFan(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Switch: { contactListener.DamageToSwitch(e.spriteB, 1, e.spriteA.SpriteType); break; } default: break; } return; }
void contactListener_LightningBlastContact(object sender, BeginContactEventArgs e) { int damage = 3; switch (e.spriteB.SpriteType) { case Sprite.Type.Block: { if (e.spriteA.TextureIndex != 2) //stone immune { contactListener.DamageToBlock(e.spriteB, damage, e.spriteA.SpriteType); } break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Saw: { contactListener.DamageToSaw(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Fan: { contactListener.DamageToFan(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Switch: { contactListener.DamageToSwitch(e.spriteB, 1, e.spriteA.SpriteType); break; } default: break; } }
//setup done void contactListener_IceShotContact(object sender, BeginContactEventArgs e) { //sprite A ice shot, sprite b object switch (e.spriteB.SpriteType) { case Sprite.Type.Star: { contactListener.CollectStar(e.spriteB); break; } case Sprite.Type.Terrain: case Sprite.Type.Fruit: case Sprite.Type.Veggie: case Sprite.Type.Block: case Sprite.Type.StaticBlock: case Sprite.Type.CannonBall: case Sprite.Type.Switch: case Sprite.Type.Explosive: case Sprite.Type.Fan: case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.FireballBlast: { e.spriteA.IsHit = true; break; } default: break; } return; }
void contactListener_FireBooContact(object sender, BeginContactEventArgs e) { switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: { contactListener.DamageToShot(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.IceShot: case Sprite.Type.ExplosiveShot: { e.spriteB.IsHit = true; break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Switch: { contactListener.DamageToSwitch(e.spriteB, 1, e.spriteA.SpriteType); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Snowball: { contactListener.DamageToSnowball(e.spriteB, 1, e.spriteA.SpriteType); break; } case Sprite.Type.Beehive: { contactListener.DamageToBee(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.Block: { if (e.spriteB.TextureIndex != 2) //stone is immume { contactListener.DamageToBlock(e.spriteB, int.MaxValue, e.spriteA.SpriteType); } break; } default: break; } }
//setup done void contactListener_SpringContact(object sender, BeginContactEventArgs e) { //spriteA spring, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: { contactListener.DamageToShot(e.spriteB, 1, e.spriteA.SpriteType); contactListener.ActivateSpring(e.spriteA, e.spriteB); break; } case Sprite.Type.FireballShot: { e.spriteB.IsHit = true; break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, 1, e.spriteA.SpriteType); contactListener.ActivateSpring(e.spriteA, e.spriteB); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, 1, e.spriteA.SpriteType); contactListener.ActivateSpring(e.spriteA, e.spriteB); break; } case Sprite.Type.ExplosiveShot: case Sprite.Type.CannonballShot: case Sprite.Type.Explosive: case Sprite.Type.Snowball: case Sprite.Type.Block: case Sprite.Type.CannonBall: { contactListener.ActivateSpring(e.spriteA, e.spriteB); break; } default: break; } return; }
void contactListener_AcidContact(object sender, BeginContactEventArgs e) { //acid hitpoints is set as time passed between frames in ms, scale damage for slower frames, x60 /1000ms should give value of 1 for 60fps and more for less fps int damage = (int)((((float)e.spriteB.HitPoints * 0.1f) + 3) * (float)e.spriteA.HitPoints * 0.06f); //e.damage % of object hit points (min 1) per tick (will leave all objects severely weakened) // spriteA acid, spriteB object switch (e.spriteB.SpriteType) { case Sprite.Type.FruitShot: case Sprite.Type.VeggieShot: { if (e.spriteB.spriteBody.IsSensor) break; //dont kill inside barrel for acid contactListener.DamageToShot(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.FireballShot: { e.spriteB.IsHit = true; break; } case Sprite.Type.Fruit: { contactListener.DamageToFruit(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Veggie: { contactListener.DamageToVeggie(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Beehive: case Sprite.Type.Gremlin: case Sprite.Type.Bird: case Sprite.Type.Bat: case Sprite.Type.Fish: case Sprite.Type.Spider: case Sprite.Type.Snowman: { contactListener.DamageToCreature(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Block: { //cheese, wood and stone are index 0,1,2 if (e.spriteB.TextureIndex < 3) contactListener.DamageToBlock(e.spriteB, damage, e.spriteA.SpriteType); break; } case Sprite.Type.Switch: { contactListener.DamageToSwitch(e.spriteB, 1, e.spriteA.SpriteType); break; } case Sprite.Type.Explosive: { contactListener.DamageToExplosive(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } case Sprite.Type.ExplosiveShot: { contactListener.DamageToShot(e.spriteB, int.MaxValue, e.spriteA.SpriteType); break; } default: break; } return; }
private bool BeginContact(Contact contact) { //return true to continue processing contact, false to cancel it spriteA = (Sprite)contact.FixtureA.UserData; spriteB = (Sprite)contact.FixtureB.UserData; if (spriteA != null) { //optimization code if (spriteA.SpriteType == Sprite.Type.Terrain || spriteA.SpriteType == Sprite.Type.Block) { if (spriteB.SpriteType == Sprite.Type.Terrain || spriteB.SpriteType == Sprite.Type.Block) { return true; } } switch (spriteA.SpriteType) { case Sprite.Type.Star: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); StarContact(this, beginContactArgs); return false; } case Sprite.Type.Saw: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); SawContact(this, beginContactArgs); return false; } case Sprite.Type.Smasher: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); SmasherContact(this, beginContactArgs); return false; } case Sprite.Type.Spike: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); SpikeContact(this, beginContactArgs); return false; } case Sprite.Type.Spring: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); SpringContact(this, beginContactArgs); return false; } case Sprite.Type.Acid: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); AcidContact(this, beginContactArgs); return false; } case Sprite.Type.Explosion: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); ExplosionContact(this, beginContactArgs); return false; } case Sprite.Type.PowerUp: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); PowerUpContact(this, beginContactArgs); return false; } case Sprite.Type.FanWind: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); FanWindContact(this, beginContactArgs); return false; } case Sprite.Type.Beehive: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); BeehiveContact(this, beginContactArgs); return false; } case Sprite.Type.FireBoo: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); FireBooContact(this, beginContactArgs); return false; } case Sprite.Type.SawShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); SawShotContact(this, beginContactArgs); return false; } case Sprite.Type.FireballShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); FireballShotContact(this, beginContactArgs); return false; } case Sprite.Type.IceShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); IceShotContact(this, beginContactArgs); return false; } case Sprite.Type.LightningShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); LightningShotContact(this, beginContactArgs); return false; } case Sprite.Type.FireballBlast: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); FireballBlastContact(this, beginContactArgs); return false; } case Sprite.Type.IceBlast: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); IceBlastContact(this, beginContactArgs); return false; } case Sprite.Type.LightningBlast: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); LightningBlastContact(this, beginContactArgs); return false; } case Sprite.Type.Boss: { if (contact.FixtureA.IsSensor) { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteA, spriteB, contact); BossContact(this, beginContactArgs); return false; } return true; } default: break; } if (spriteB != null) switch (spriteB.SpriteType) { case Sprite.Type.Star: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); StarContact(this, beginContactArgs); return false; } case Sprite.Type.Saw: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); SawContact(this, beginContactArgs); return false; } case Sprite.Type.Smasher: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); SmasherContact(this, beginContactArgs); return false; } case Sprite.Type.Spike: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); SpikeContact(this, beginContactArgs); return false; } case Sprite.Type.Spring: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); SpringContact(this, beginContactArgs); return false; } case Sprite.Type.Acid: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); AcidContact(this, beginContactArgs); return false; } case Sprite.Type.Explosion: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); ExplosionContact(this, beginContactArgs); return false; } case Sprite.Type.PowerUp: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); PowerUpContact(this, beginContactArgs); return false; } case Sprite.Type.FanWind: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); FanWindContact(this, beginContactArgs); return false; } case Sprite.Type.Beehive: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); BeehiveContact(this, beginContactArgs); return false; } case Sprite.Type.FireBoo: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); FireBooContact(this, beginContactArgs); return false; } case Sprite.Type.SawShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); SawShotContact(this, beginContactArgs); return false; } case Sprite.Type.FireballShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); FireballShotContact(this, beginContactArgs); return false; } case Sprite.Type.IceShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); IceShotContact(this, beginContactArgs); return false; } case Sprite.Type.LightningShot: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); LightningShotContact(this, beginContactArgs); return false; } case Sprite.Type.FireballBlast: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); FireballBlastContact(this, beginContactArgs); return false; } case Sprite.Type.IceBlast: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); IceBlastContact(this, beginContactArgs); return false; } case Sprite.Type.LightningBlast: { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); LightningBlastContact(this, beginContactArgs); return false; } case Sprite.Type.Boss: { if (contact.FixtureB.IsSensor) { BeginContactEventArgs beginContactArgs = new BeginContactEventArgs(spriteB, spriteA, contact); BossContact(this, beginContactArgs); return false; } return true; } default: break; } } return true; //return -- direct physics solver to continue processing as physical collision since the collision is not involving above sensors }