MCPcopy Index your code
hub / github.com/EngoEngine/engo / Set

Method Set

keys.go:34–43  ·  view source on GitHub ↗

Set is used for updating whether or not a key is held down, or not held down.

(k Key, state bool)

Source from the content-addressed store, hash-verified

32
33// Set is used for updating whether or not a key is held down, or not held down.
34func (km *KeyManager) Set(k Key, state bool) {
35 km.mutex.Lock()
36
37 ks := km.mapper[k]
38 ks.set(state)
39 km.mapper[k] = ks
40 km.dirtmap[k] = k
41
42 km.mutex.Unlock()
43}
44
45// Get retrieves a keys state.
46func (km *KeyManager) Get(k Key) KeyState {

Callers 1

TestKeyManagerFunction · 0.95

Calls 1

setMethod · 0.45

Tested by 1

TestKeyManagerFunction · 0.76