sticky null
This commit is contained in:
parent
901c86eddd
commit
3593d3ac0b
1 changed files with 3 additions and 3 deletions
|
@ -113,9 +113,9 @@ public class Con {
|
||||||
public struct Btn {
|
public struct Btn {
|
||||||
public bool frameDown, held, frameUp;
|
public bool frameDown, held, frameUp;
|
||||||
|
|
||||||
public void Step(bool down, bool sticky = false) {
|
public void Step(bool down, bool? sticky = null) {
|
||||||
if (held) {
|
if (sticky != null && held) {
|
||||||
down = sticky;
|
down = (bool)sticky;
|
||||||
}
|
}
|
||||||
|
|
||||||
frameDown = down && !held;
|
frameDown = down && !held;
|
||||||
|
|
Loading…
Add table
Reference in a new issue