-
Notifications
You must be signed in to change notification settings - Fork 0
ctrl.py
This module takes player input, and send how many frame input is pressed to model.py
Keybinding information is on ctrl.keydict as key, and its value is list of info for processing input.
value of keydict is consist of two boolean variable, two int variable.
first boolean variable is "current" status of key.
when key is down, event handler makes it True. when key is up, event handler makes it False.
second boolean variable is "previous" status of key.
if it is not same as first boolean variable, status of key is just changed in this frame.
first int variable contains where this key mapped in input frame list, and second int variable contains which sign it should be.
(this variable is not well named, and will be changed after refactorized)
intup is list of four int variable, and every int variable contains how many frame certain key get pressed.
X/Y means if sign of variable is minus, X. if it is plus, Y.
- intup[0] : left/right
- intup[1] : up/down
- intup[2] : CCW/CW
- intup[3] : none/Hold