Game.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #pragma once
  2. #ifndef _Game_H_
  3. #define _Game_H_
  4. #include "pub.h"
  5. #include "RunGame.h"
  6. #include "InertialTrajProcess.h"
  7. #include "DanceGame.h"
  8. #include "FootStep.h"
  9. #include "Interaction.h"
  10. #include "jumpH5.h"
  11. #include "OriginTraj.h"
  12. #include <fstream>
  13. #include <time.h>
  14. #include <sstream>
  15. class Game
  16. {
  17. public:
  18. Game(int gametype);
  19. void GameProcess(int timeStamp, int* right_pos, int* right_att, int right_zupt, int right_press,
  20. int* left_pos, int* left_att, int left_zupt, int left_press, int jump, int down, int rssi, int girl_shoes);
  21. void GameProcess(uint8_t* buf, int len);
  22. void RunGameProcess(int* right_pos, int* right_att, int right_zupt, int* left_pos, int* left_att, int left_zupt, int jump, int down, int girl_shoes);
  23. void getGameResult(int* matrix);
  24. int getStepStatus(int left_or_right);
  25. int getStepFreq(int left_or_right);
  26. int getStepCount(int left_or_right);
  27. float getGamePos(int left_or_right, int index);
  28. string getVersion();
  29. void start(string path_root);
  30. void end();
  31. void isBingo();
  32. int getInteractionCMD();
  33. private:
  34. int GameType;
  35. RunGame rungame;
  36. DanceGame dancegame;
  37. InertialTrajProcess rotateTrajLeft;
  38. InertialTrajProcess rotateTrajRight;
  39. Interaction interaction;
  40. FootStep leftFootStep;
  41. FootStep rightFootStep;
  42. OriginTraj originTraj;
  43. jumpH5 jumpH5game;
  44. int leftStepRate;
  45. int rightStepRate;
  46. int leftRate;
  47. int rightRate;
  48. int resultMatrix[4];
  49. float rotateMatrix[4];
  50. float leftRotate[4];
  51. float rightRotate[4];
  52. fstream foot_data_file;
  53. int bingo = 0;
  54. int InteractionCMD;
  55. int right_pos_data[3];
  56. int right_att_data[3];
  57. int left_pos_data[3];
  58. int left_att_data[3];
  59. int left_acc_data[3];
  60. int right_acc_data[3];
  61. int girl_shoes;
  62. int s_zupt;
  63. int h_zupt;
  64. int down;
  65. int jump;
  66. int rssi;
  67. int posTimeStamp;
  68. int attTimeStamp;
  69. uint16_t right_press;
  70. uint16_t left_press;
  71. };
  72. #endif