New insectoid almost done + DestroyBlockObjective

This commit is contained in:
Anuken
2022-04-18 21:34:21 -04:00
parent 5721cc75b6
commit 5b4e424cda
21 changed files with 234 additions and 19 deletions

View File

@@ -12,6 +12,8 @@ public abstract class DrawPart{
public boolean turretShading;
/** If true, the layer is overridden to be under the weapon/turret itself. */
public boolean under = false;
/** For units, this is the index of the weapon this part gets its progress for. */
public int weaponIndex = 0;
public abstract void draw(PartParams params);
public abstract void load(String name);
@@ -81,6 +83,11 @@ public abstract class DrawPart{
return p -> 1f - get(p);
}
default PartProgress slope(){
return p -> Mathf.slope(get(p));
}
default PartProgress clamp(){
return p -> Mathf.clamp(get(p));
}