Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Game/Game.h
- Revision:
- 26:8a85aede976d
- Parent:
- 25:3995271e411c
- Child:
- 27:e46af658c67a
--- a/Game/Game.h	Wed Apr 03 20:03:47 2019 +0000
+++ b/Game/Game.h	Thu Apr 04 19:03:06 2019 +0000
@@ -17,22 +17,39 @@
 *@date April, 2019
 */
 
+struct Input{
+    float x;
+    bool yButton;
+    bool aButton;
+    bool bButton;
+    bool yCooldown;
+    bool aCooldown;
+    bool bCooldown;
+};
+
 class Game {
   private:
+    Input input;
     bool backToMenu;
     int noOfCubes;
     int homeSelection;
     bool deathMenuSelection;
     bool playing;
     int score;
+    bool selectDisable;
     Vector2D coord;
     Cube cubeArray[25];
     Face faceArray[150];
 
-    Ticker ticker;
+    Ticker disableA;
+    Ticker disableB;
+    Ticker disableY;
     Gamepad gamepad;
     Rasturizer renderer;
     
+    void resetScene();
+    /** @brief generates initial positions for all cubes
+    */
     void addScore();
     /** @brief Increments the score by 1
     */
@@ -65,6 +82,15 @@
     void homeButtonSelections();
     /** @brief Determines the action to be taken depending on the button input at the home screen
     */
+    void disableAButton(bool a);
+    void disableYButton(bool y);
+    void disableBButton(bool b);
+    void enableA();
+    void enableY();
+    void enableB();
+    void processInput();
+    
+    void play();
   public:
    Game();
    void run();