private void MoveZombie() { if (zombie.PictureBox.Left + ZombieConstants.ZOMBIE_WIDTH >= secondPlatform.PictureBox.Left + PlatformConstants.PLATFORM_WIDTH) { zombieDirection = Direction.LEFT; } else if (zombie.PictureBox.Left - ZombieConstants.ZOMBIE_SPEED < secondPlatform.PictureBox.Left) { zombieDirection = Direction.RIGHT; } zombie.Move(zombieDirection, ZombieConstants.ZOMBIE_SPEED); }
private void UpdatePlayerPosition() { if (player.IntersectsWith(secondPlatform)) { player.Move(secondPlatformDirection, 1); } else { player.Move(firstPlatformDirection, 1); } }
private void MovePlatfroms() { UpdatePlatformsDirections(); firstPlatform.Move(firstPlatformDirection, 1); secondPlatform.Move(secondPlatformDirection, 1); }