Added so that the unit now follows the enamy unit and i added a reload timmer

This commit is contained in:
Ziver Koc 2007-04-18 21:19:46 +00:00
parent 6d06a75144
commit b97df125dd
8 changed files with 83 additions and 24 deletions

View file

@ -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);