Game.h 2.0 KB

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