Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. class PlayingField
  2. {
  3. public:
  4.     PlayingField(Ogre::SceneManager* mSceneMgr, Ogre::Vector3 startPos,
  5.             int width, int height);
  6.     ~PlayingField(void);
  7.  
  8.     void start();
  9.     void stop();
  10.     void pause();
  11.  
  12.     namespace Controls
  13.     {
  14.     //Move block 1 unit left or right
  15.     void right();
  16.     void left();
  17.     //Rotate block -90 degrees
  18.     void rotate();
  19.     //Make block fall faster (down key, usually)
  20.     void fallFaster(bool makeBlocksFallFaster);
  21.  
  22.     //Make the block fall down one unit
  23.     void tick();
  24.     }
  25.  
  26.     namespace Options
  27.     {
  28.     double getScore();
  29.     }
  30.  
  31. private:
  32.     //Update graphical representation
  33.     void update();
  34.     //Parent node of frame-, and game blocks
  35.     Ogre::SceneNode* fieldNode;
  36.     //Map of game blocks 0 = air, 1 = I, 2 = J, 3 = L, 4 = Cube, 5 = S, 6 = T, 7 = Z
  37.     int** blockMap;
  38.     //Player score
  39.     double score;
  40. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement