ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Input Struct Reference

Input Struct Reference

Input struct. More...

#include <Game.h>

Data Fields

float x
 The x axis of the joystick.
bool yButton
 Whether the y button is pressed.
bool aButton
 Whether the a button is pressed.
bool bButton
 Whether the b button is pressed.
bool yCooldown
 Whether 0.2 seconds has elapsed since the y button was pressed.
bool aCooldown
 Whether 0.2 seconds has elapsed since the a button was pressed.
bool bCooldown
 Whether 0.2 seconds has elapsed since the b button was pressed.

Detailed Description

Input struct.

A struct for holding the infomation regarding the joystick x axis position, a, b, and y buttons and whether the buttons have been pressed within the last 0.2 seconds

Definition at line 16 of file Game.h.


Field Documentation

bool aButton

Whether the a button is pressed.

Definition at line 19 of file Game.h.

bool aCooldown

Whether 0.2 seconds has elapsed since the a button was pressed.

Definition at line 22 of file Game.h.

bool bButton

Whether the b button is pressed.

Definition at line 20 of file Game.h.

bool bCooldown

Whether 0.2 seconds has elapsed since the b button was pressed.

Definition at line 23 of file Game.h.

float x

The x axis of the joystick.

Definition at line 17 of file Game.h.

bool yButton

Whether the y button is pressed.

Definition at line 18 of file Game.h.

bool yCooldown

Whether 0.2 seconds has elapsed since the y button was pressed.

Definition at line 21 of file Game.h.