|
|
@ -3,10 +3,19 @@ package pacmanGame; |
|
|
|
public class Ghost { |
|
|
|
public Vector2 position; |
|
|
|
public final GameManager gameManager; |
|
|
|
public final int ghostNumber; |
|
|
|
|
|
|
|
public Ghost(GameManager gameManager) { |
|
|
|
public Ghost(GameManager gameManager, int ghostNumber) { |
|
|
|
this.gameManager = gameManager; |
|
|
|
this.ghostNumber = ghostNumber; |
|
|
|
this.position = new Vector2(-1, -1); |
|
|
|
} |
|
|
|
|
|
|
|
public void setPosition(Vector2 newPosition) { |
|
|
|
this.position = newPosition; |
|
|
|
} |
|
|
|
|
|
|
|
public void move(Vector2 direction) { |
|
|
|
this.position = this.position.Add(direction); |
|
|
|
} |
|
|
|
} |