isYPressed property

bool isYPressed
getter/setter pair

Tracks whether the Y button is pressed, so the action is only done once.

Implementation

bool isYPressed = false;