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); }
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); } }
public void CollisionWithMario(IWorld level, IPlayer mario, Direction direction) { MarioBlockHandler.UpateLocation(mario, this, direction); }