This commit is contained in:
parent
98cd3b8287
commit
0bfc621ade
6 changed files with 32 additions and 20 deletions
|
|
@ -97,17 +97,13 @@ public abstract class Unit extends GameEntity{
|
|||
* Updating the unit
|
||||
*/
|
||||
public void update() {
|
||||
getSelection().setValue(getLife());
|
||||
|
||||
if(moveTo != null) {
|
||||
Vector2i moveVect = new Vector2i((int)moveTo.getX(),(int)moveTo.getY());
|
||||
//Vector2i currentVect = new Vector2i((int)unitNode.getLocation().getX(), (int)unitNode.getLocation().getY());
|
||||
|
||||
|
||||
int moveXminus = moveVect.getX()-oldVect.getX();
|
||||
int moveYminus = moveVect.getY()-oldVect.getY();
|
||||
System.out.println("moveVect: "+moveVect);
|
||||
//System.out.println("currentVect: "+currentVect);
|
||||
|
||||
float divideY = (moveVect.getY()+1)/(oldVect.getY()+1);
|
||||
float divideX = (moveVect.getX()+1)/(oldVect.getX()+1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue