Rewrite property panel to adapt to ruleset config.

This commit is contained in:
2023-07-27 22:07:20 +08:00
parent 9b091a0084
commit bc51a45df8
39 changed files with 825 additions and 298 deletions

View File

@@ -0,0 +1,14 @@
using System;
namespace Cryville.Crtr.Config {
public class PVPNumberStepped : PVPNumberBase {
protected override void OnIdle() {
SetRatio(0.5f);
}
protected override double GetValue(double ratio, float deltaTime, double min, double max) {
double delta = (ratio > 0.5 ? 1 : -1) * Math.Pow((ratio - 0.5f) * 2, 2) * deltaTime;
// if (LogarithmicMode) return Math.Pow(Math.E, Math.Log(m_value) + delta);
return Convert.ToDouble(RawValue) + delta;
}
}
}