PartProgress ContentParser support

This commit is contained in:
Anuken
2022-02-03 21:35:44 -05:00
parent f573e78f4b
commit 4c9761eae5
2 changed files with 39 additions and 4 deletions

View File

@@ -54,6 +54,10 @@ public abstract class WeaponPart{
return p -> 1f - get(p);
}
default PartProgress add(float amount){
return p -> Mathf.clamp(get(p) + amount);
}
default PartProgress delay(float amount){
return p -> Mathf.clamp((get(p) - amount) / (1f - amount));
}
@@ -86,10 +90,6 @@ public abstract class WeaponPart{
return p -> func.get(get(p), other.get(p));
}
default PartProgress add(float amount){
return p -> Mathf.clamp(get(p) + amount);
}
default PartProgress curve(Interp interp){
return p -> interp.apply(get(p));
}