123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #pragma once
- #ifndef _Game_H_
- #define _Game_H_
- #include "pub.h"
- #include "RunGame.h"
- #include "InertialTrajProcess.h"
- #include "DanceGame.h"
- #include "FootStep.h"
- #include "Interaction.h"
- #include "jumpH5.h"
- #include "OriginTraj.h"
- #include <fstream>
- #include <time.h>
- #include <sstream>
- class Game
- {
- public:
- Game(int gametype);
- void GameProcess(int timeStamp, int* right_pos, int* right_att, int right_zupt, int right_press,
- int* left_pos, int* left_att, int left_zupt, int left_press, int jump, int down, int rssi, int girl_shoes);
- void GameProcess(uint8_t* buf, int len);
- 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);
- void getGameResult(int* matrix);
- int getStepStatus(int left_or_right);
- int getStepFreq(int left_or_right);
- int getStepCount(int left_or_right);
- float getGamePos(int left_or_right, int index);
- string getVersion();
- void start(string path_root);
- void end();
- void isBingo();
- int getInteractionCMD();
- private:
- int GameType;
- RunGame rungame;
- DanceGame dancegame;
- InertialTrajProcess rotateTrajLeft;
- InertialTrajProcess rotateTrajRight;
- Interaction interaction;
- FootStep leftFootStep;
- FootStep rightFootStep;
- OriginTraj originTraj;
- jumpH5 jumpH5game;
- int leftStepRate;
- int rightStepRate;
-
- int leftRate;
- int rightRate;
- int resultMatrix[4];
- float rotateMatrix[4];
- float leftRotate[4];
-
- float rightRotate[4];
- fstream foot_data_file;
- int bingo = 0;
- int InteractionCMD;
- int right_pos_data[3];
- int right_att_data[3];
- int left_pos_data[3];
- int left_att_data[3];
- int left_acc_data[3];
- int right_acc_data[3];
- int girl_shoes;
- int s_zupt;
- int h_zupt;
- int down;
- int jump;
- int rssi;
- int posTimeStamp;
- int attTimeStamp;
- uint16_t right_press;
- uint16_t left_press;
- };
- #endif
|