![]() |
||||
VCC BehaviourHere is the VCC behaviour for the input module. Clicking on a block will take you to the code documentation for that block. The datatypes of the messages that pass between blocks are shown in purple. Clicking on a datatype will take you to its definition. ![]() Block Listing
DescriptionWhen the VCC simulation first starts, a player number arrives at the player external port from the lobby module. This is stored by the output_move and output_button blocks. In addition, the output_button block outputs a button message to the game core so that it also knows the player number. Once the game has started, a mouse_click message arrives at the in external port each time the user presses or releases the mouse button. receive_input waits until it has received an up and down mouse_click message and then sends a mouse_drag message to process_input. process_input decides what the user was trying to do, and sends a message to output_move or output_button, as appropriate. Finally output_move or output_button constructs a move or button message and sends it to the core module. |
||||
![]() |
||||
|
||||
![]() |
![]() |
![]() |