A Button is an input which can be either JustPressed, JustReleased or Down. Common uses would be for, a jump key or an action key.
| 2 | |
| 3 | // A Button is an input which can be either JustPressed, JustReleased or Down. Common uses would be for, a jump key or an action key. |
| 4 | type Button struct { |
| 5 | Triggers []Key |
| 6 | Name string |
| 7 | } |
| 8 | |
| 9 | // JustPressed checks whether an input was pressed in the previous frame. |
| 10 | func (b Button) JustPressed() bool { |
nothing calls this directly
no outgoing calls
no test coverage detected