Beispiel #1
0
 public void Handle(ICollidable object1, ICollidable object2, CollisionDirection.DirectionTag direction)
 {
     if (typeof(IMario).IsInstanceOfType(object1) && typeof(SpeedBoostItem).IsInstanceOfType(object2))
     {
         mario     = (IMario)object1;
         boostItem = (SpeedBoostItem)object2;
         //Mario should boost//
         mario.Boost();
         //boostItem disappear//
         this.boostItem.Collect();
         SoundEffectManager.Instance.PlaySoundEffect(SoundEffectManager.SoundEffectTag.GainExtraLife);
     }
 }