This commit is contained in:
ethan merchant 2024-02-04 01:23:13 -05:00
parent 162d4f8b98
commit b9e2f061b8

View file

@ -30,4 +30,18 @@ public class Rig {
perch_pos = palm_pos + Vec3.Up * 8 * U.cm;
}
public struct Btn {
public bool frameDown, held, frameUp;
public void Frame(bool down, bool? up = null) {
if (up != null && held) {
down = !(bool)up;
}
frameDown = down && !held;
frameUp = !down && held;
held = down;
}
}
}