Added so that the unit now follows the enamy unit and i added a reload timmer
This commit is contained in:
parent
6d06a75144
commit
b97df125dd
8 changed files with 83 additions and 24 deletions
|
|
@ -90,10 +90,12 @@ public class InGameMouseInput extends MouseInput{
|
|||
}
|
||||
|
||||
// Make unit mouseover select
|
||||
if(!map.isPosEmpty(pos.getX(), pos.getY())){
|
||||
if(oldMouseOver != null)oldMouseOver.setMouseOver(false);
|
||||
oldMouseOver = map.getPos(pos.getX(), pos.getY());
|
||||
oldMouseOver.setMouseOver(true);
|
||||
if(!map.isPosEmpty(pos.getX(), pos.getY())){
|
||||
if(oldMouseOver != map.getPos(pos.getX(), pos.getY())){
|
||||
if(oldMouseOver != null)oldMouseOver.setMouseOver(false);
|
||||
oldMouseOver = map.getPos(pos.getX(), pos.getY());
|
||||
oldMouseOver.setMouseOver(true);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(oldMouseOver != null)oldMouseOver.setMouseOver(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue