public void LevelFinished(Player player, GameWorld world) { MessageBox.Show("Gewonnen", "Super", MessageBoxButtons.OK); player.Position = new Point(300, 200); world.ScrollOffset = new Point(0, 0); world.Import(); }
public virtual void Collision(Direction dir, Player player) { // test if player hit a wall if (dir == Direction.left && player.MomentumX > 0) player.MomentumX = 0; if (dir == Direction.right && player.MomentumX < 0) player.MomentumX = 0; if (dir == Direction.up && player.MomentumY <= 0) player.MomentumY = 0; if (dir == Direction.down && player.MomentumY >= 0) { player.MomentumY = 0; } }
public override void Collision(Direction dir, Player player) { // test if player hit a wall if (dir == Direction.left && player.MomentumX > 0) player.MomentumX = 0; if (dir == Direction.right && player.MomentumX < 0) player.MomentumX = 0; if (dir == Direction.up && player.MomentumY <= 0) player.MomentumY = 0; if (dir == Direction.down && player.MomentumY >= 0) { player.MomentumY = 0; } if (dir == Direction.down && player.IsSuper) isActive = false; }
public override void Collision(Direction dir, Player player) { player.Grow(); isActive = false; }