Bugfixes / Better titan sprite

This commit is contained in:
Anuken
2020-04-30 18:21:50 -04:00
parent c5859eb03a
commit 626a06ca00
10 changed files with 456 additions and 449 deletions

View File

@@ -24,6 +24,12 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
@ReadOnly transient float range, aimX, aimY;
@ReadOnly transient boolean isRotate, isShooting;
void setWeaponRotation(float rotation){
for(WeaponMount mount : mounts){
mount.rotation = rotation;
}
}
boolean inRange(Position other){
return within(other, range);
}
@@ -83,7 +89,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{
mount.targetRotation = Angles.angle(axisX, axisY, mount.aimX, mount.aimY) - rotation();
mount.rotation = Angles.moveToward(mount.rotation, mount.targetRotation, weapon.rotateSpeed * Time.delta());
}else{
mount.rotation = this.rotation;
mount.rotation = 0;
mount.targetRotation = angleTo(mount.aimX, mount.aimY);
}

View File

@@ -93,7 +93,8 @@ public class Build{
return true;
}
if(!contactsGround(tile.x, tile.y, type)){
//TODO should water blocks be placeable here?
if(/*!type.requiresWater && */!contactsGround(tile.x, tile.y, type)){
return false;
}