MCPcopy Create free account
hub / github.com/SolarLune/masterplan / SetState

Method SetState

events.go:38–58  ·  view source on GitHub ↗
(down bool)

Source from the content-addressed store, hash-verified

36}
37
38func (is *InputState) SetState(down bool) {
39
40 is.consumed = false
41 is.hidden = false
42 is.Down = down
43
44 if down {
45
46 if globals.Time-is.downTime < 0.25 {
47 is.triggerCount++
48 } else {
49 is.triggerCount = 1
50 }
51
52 is.downTime = globals.Time
53
54 } else {
55 is.upTime = globals.Time
56 }
57
58}
59
60func (is *InputState) Held() bool {
61 if is.consumed || is.hidden {

Callers 1

handleEventsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected