1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-10-31 03:39:16 +00:00

polish and bug fix

This commit is contained in:
2022-06-12 12:35:08 +02:00
parent 74956e5e0b
commit 5008b6e18a
7 changed files with 73 additions and 24 deletions

View File

@@ -22,10 +22,23 @@ public abstract class Entity implements DrawableObject {
protected boolean move = false;
/**
* Create an entity
* @param name The name of this new entity
* @param x The initial x position
* @param y The initial y position
* @param map The initial map
*/
public Entity(String name, int x, int y, String map){
this(name, new Vector2(SPRITE_WIDTH * x, SPRITE_HEIGHT * y), map);
}
/**
* Create an entity
* @param name The name of this new entity
* @param initialPosition The initial position by a Vector2
* @param map The initial map
*/
public Entity(String name, Vector2 initialPosition, String map){
this.name = name;
lastPosition = new Vector2(initialPosition);