More unit progress

This commit is contained in:
Anuken
2020-07-10 20:04:45 -04:00
parent d7e432f730
commit 9cb4645b11
30 changed files with 106 additions and 221 deletions

View File

@@ -69,11 +69,11 @@ public class PointDefenseTurret extends Block{
//retarget
if(timer(timerTarget, retargetTime)){
target = Groups.bullet.intersect(x - range, y - range, range*2, range*2).min(b -> b.team() == team || !b.type().hittable ? Float.MAX_VALUE : b.dst2(this));
target = Groups.bullet.intersect(x - range, y - range, range*2, range*2).min(b -> b.team == team || !b.type().hittable ? Float.MAX_VALUE : b.dst2(this));
}
//look at target
if(target != null && target.within(this, range) && target.team() != team && target.type().hittable){
if(target != null && target.within(this, range) && target.team != team && target.type().hittable){
float dest = angleTo(target);
rotation = Angles.moveToward(rotation, dest, rotateSpeed * edelta());
reload -= edelta();