recoil as part progress

This commit is contained in:
Anuken
2022-05-20 19:46:18 -04:00
parent 39f32af500
commit b010e9d720
7 changed files with 15 additions and 12 deletions

View File

@@ -22,14 +22,15 @@ public abstract class DrawPart{
/** Parameters for drawing a part in draw(). */
public static class PartParams{
//TODO document
public float warmup, reload, smoothReload, heat, life;
public float warmup, reload, smoothReload, heat, recoil, life;
public float x, y, rotation;
public int sideOverride = -1, sideMultiplier = 1;
public PartParams set(float warmup, float reload, float smoothReload, float heat, float x, float y, float rotation){
public PartParams set(float warmup, float reload, float smoothReload, float heat, float recoil, float x, float y, float rotation){
this.warmup = warmup;
this.reload = reload;
this.heat = heat;
this.recoil = recoil;
this.smoothReload = smoothReload;
this.x = x;
this.y = y;
@@ -64,6 +65,8 @@ public abstract class DrawPart{
smoothReload = p -> p.smoothReload,
/** Weapon warmup, 0 when not firing, 1 when actively shooting. Not equivalent to heat. */
warmup = p -> p.warmup,
/** Weapon recoil with no curve applied. */
recoil = p -> p.recoil,
/** Weapon heat, 1 when just fired, 0, when it has cooled down (duration depends on weapon) */
heat = p -> p.heat,
/** Lifetime fraction, 0 to 1. Only for missiles. */