Browse Source

Added Spawn Function to Player

remotes/origin/menu
Julian 1 year ago
parent
commit
be77bf984c
  1. 5
      src/main/java/pacmanGame/Player.java

5
src/main/java/pacmanGame/Player.java

@ -11,6 +11,11 @@ public class Player {
this.direction = new Vector2(0,-1);
}
public void Spawn() {
position = gameManager.map.playerSpawn;
direction = new Vector2(0, -1);
}
public void Move() {
Vector2 newPosition = position.Add(direction);

Loading…
Cancel
Save