示例#1
0
 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();
 }
示例#2
0
 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;
     }
 }
示例#3
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;
        }
示例#4
0
 public override void Collision(Direction dir, Player player)
 {
     player.Grow();
     isActive = false;
 }