示例#1
0
 public void CollisionWithMario(IWorld level, IPlayer mario, Direction direction)
 {
     if (direction == Direction.Bottom)
     {
         BecomeUsed();
         SoundFactory.Instance.PlayBumpBlockSound();
     }
     MarioBlockHandler.UpateLocation(mario, this, direction);
 }
 public void CollisionWithMario(IWorld level, IPlayer mario, Direction direction)
 {
     if (direction == Direction.Bottom)
     {
         BecomeUsed();
         if (!hasBeUsed)
         {
             SoundFactory.Instance.PlayBumpBlockSound();
             caseNumber = (Bonus)(new Random()).Next(Util.Instance.QBrandomLimitLow, Util.Instance.QBrandomLimitHigh);
             level.Items.Add(InitiateBonus(caseNumber));
             hasBeUsed = true;
             BlockPhysics.BlockJump();
         }
     }
     MarioBlockHandler.UpateLocation(mario, this, direction);
 }
示例#3
0
 public void CollisionWithMario(IWorld level, IPlayer mario, Direction direction)
 {
     if (direction == Direction.Bottom)
     {
         if (!(mario.CurrentPowerState is MarioSmallState) && !(mario.CurrentPowerState is MarioStarSmallState))
         {
             Disappear();
         }
         else
         {
             SoundFactory.Instance.PlayBumpBlockSound();
             BlockPhysics.BlockJump();
         }
     }
     if (!(State is BlockDisappearedState))
     {
         MarioBlockHandler.UpateLocation(mario, this, direction);
     }
 }
示例#4
0
 public void CollisionWithMario(IWorld level, IPlayer mario, Direction direction)
 {
     MarioBlockHandler.UpateLocation(mario, this, direction);
 }