ソースを参照

add三轮车调用接口

leon 2 年 前
コミット
d14b853b02
55 ファイル変更2412 行追加846 行削除
  1. BIN
      .DS_Store
  2. BIN
      DanceGame/.DS_Store
  3. BIN
      DanceGame/Classes/.DS_Store
  4. BIN
      DanceGame/Classes/FitfunTool/.DS_Store
  5. BIN
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/.DS_Store
  6. BIN
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/.DS_Store
  7. BIN
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/.DS_Store
  8. 10 3
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/BLE/BTDataProcess.mm
  9. 4 4
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/Tool/GameObjc.mm
  10. 14 11
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/DanceFoot.cpp
  11. 109 32
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Game.cpp
  12. 21 0
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Game.h
  13. 0 47
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/ReadMe.txt
  14. 394 42
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/RunGame.cpp
  15. 47 3
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/RunGame.h
  16. 51 89
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Tricycle.cpp
  17. 4 0
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Tricycle.h
  18. 6 1
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/pub.h
  19. 186 0
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/publicMotion.cpp
  20. 58 0
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/publicMotion.h
  21. 22 0
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/testGame.cpp
  22. 24 0
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/testGame.h
  23. 98 90
      DanceGame/Unity-iPhone.xcodeproj/project.pbxproj
  24. BIN
      DanceGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate
  25. BIN
      RunGame/.DS_Store
  26. 1 1
      RunGame/MainApp/main.mm
  27. BIN
      RunGame/SDK/.DS_Store
  28. 2 0
      RunGame/SDK/BLE/BTDataProcess.h
  29. 68 43
      RunGame/SDK/BLE/BTDataProcess.mm
  30. 1 1
      RunGame/SDK/BLE/DebugView.m
  31. 0 19
      RunGame/SDK/Entity /UserFriendsModel.h
  32. 29 33
      RunGame/SDK/HTTP/HTTPDataProcession.m
  33. 7 0
      RunGame/SDK/IOSPlatformSDK.h
  34. 27 37
      RunGame/SDK/IOSPlatformSDK.mm
  35. 10 2
      RunGame/SDK/Tool/MYFactoryManager.h
  36. 96 0
      RunGame/SDK/Tool/MYFactoryManager.m
  37. 0 1
      RunGame/SDK/UI/SearchDeviceViewController.m
  38. 14 11
      RunGame/SDK/shoes_sdk/DanceFoot.cpp
  39. 109 32
      RunGame/SDK/shoes_sdk/Game.cpp
  40. 21 0
      RunGame/SDK/shoes_sdk/Game.h
  41. 0 47
      RunGame/SDK/shoes_sdk/ReadMe.txt
  42. 1 3
      RunGame/SDK/shoes_sdk/RuinsExplore.cpp
  43. 394 42
      RunGame/SDK/shoes_sdk/RunGame.cpp
  44. 47 3
      RunGame/SDK/shoes_sdk/RunGame.h
  45. 3 1
      RunGame/SDK/shoes_sdk/SingleFootAction.h
  46. 51 89
      RunGame/SDK/shoes_sdk/Tricycle.cpp
  47. 4 0
      RunGame/SDK/shoes_sdk/Tricycle.h
  48. 6 1
      RunGame/SDK/shoes_sdk/pub.h
  49. 186 0
      RunGame/SDK/shoes_sdk/publicMotion.cpp
  50. 58 0
      RunGame/SDK/shoes_sdk/publicMotion.h
  51. 22 0
      RunGame/SDK/shoes_sdk/testGame.cpp
  52. 24 0
      RunGame/SDK/shoes_sdk/testGame.h
  53. 176 158
      RunGame/Unity-iPhone.xcodeproj/project.pbxproj
  54. 7 0
      RunGame/Unity-iPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  55. BIN
      RunGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate

BIN
.DS_Store


BIN
DanceGame/.DS_Store


BIN
DanceGame/Classes/.DS_Store


BIN
DanceGame/Classes/FitfunTool/.DS_Store


BIN
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/.DS_Store


BIN
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/.DS_Store


BIN
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/.DS_Store


+ 10 - 3
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/BLE/BTDataProcess.mm

@@ -754,6 +754,11 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
     
     /********************剑波 & 威严 要的图表数据 *****************/
     NSString * aString = [NSString stringWithUTF8String:game->getGameDataStr().c_str()];
+//    NSLog(@"aString === %@",aString);
+
+    if (aString.length <1){
+        return;
+    }
     //上传即使动作数据
     [[SocketRocketUtility sharedInstance] sendData:nil withRequestURI:aString];
     if (self.RSSI==nil){
@@ -767,14 +772,16 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
   
     /********************调试窗数据 *****************/
     NSArray *aArray = [self.tempStepString componentsSeparatedByString:@","];
+//    NSLog(@"aArray === %@",aArray);
 //    dispatch_async(dispatch_get_main_queue(), ^{
         if (self.testLabel!=nil){
-            self.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%d %@] ts:%d \n脚步: %@ %@\n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,rssi,self.RSSI,ts,aArray[aArray.count-2],aArray.lastObject,leftStepFreq,rightStepFreq];
+            self.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%@ %@] ts:%@ \n脚步: %@ %@\n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,self.RSSI,aArray[26],aArray[27],aArray[28],aArray[29],rightStepFreq,leftStepFreq];
         }
 //    });
     
     /********************颖嘉+的ts丢包数据 *****************/
-    NSString * tsString =  aArray[aArray.count-4];
+    NSString * tsString =  aArray[27];
+        NSLog(@"tsString == %@",tsString);
     int tsInt = [tsString  intValue];
     int total;
     if (self.currentTS != 1000){//颖嘉初始值未知 ios初始值==1000
@@ -1042,7 +1049,7 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
     self.testLabel.textColor = [UIColor redColor];
     self.testLabel.font = [UIFont boldSystemFontOfSize:SCALEoefficient(14)];
     self.testLabel.backgroundColor = [UIColor clearColor];
-    self.testLabel.textAlignment = NSTextAlignmentCenter;
+    self.testLabel.textAlignment = NSTextAlignmentLeft;
     self.testLabel.numberOfLines = 0;
 
     if ([UIApplication sharedApplication].keyWindow != nil){

+ 4 - 4
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/Tool/GameObjc.mm

@@ -154,11 +154,11 @@
 - (void)setResultConRight:(short)zupt{
      runGame->setResultConRight(zupt);
 }
-- (int)getResultLeft:(int *)pos girl_shoes:(int)girl_shoes{
-    return runGame->getResultLeft(pos,girl_shoes);
+- (int)getResultLeft:(int *)pos girl_shoes:(int)girl_shoes pitch:(float)pitch{
+    return runGame->getResultLeft(pos,girl_shoes,pitch);
 }
-- (int)getResultRight:(int *)pos girl_shoes:(int)girl_shoes{
-    return runGame->getResultRight(pos,girl_shoes);
+- (int)getResultRight:(int *)pos girl_shoes:(int)girl_shoes pitch:(float)pitch{
+    return runGame->getResultRight(pos,girl_shoes,pitch);
 }
 
 - (void)process:(int)timeStamp

+ 14 - 11
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/DanceFoot.cpp

@@ -161,8 +161,8 @@ int DanceFoot::getGameDiretion(float *pos)
 		std::cout << "right_foot ";
 	}
 
-	if((left_or_right == LEFT_FOOT&& sqrt((x+0.05) * (x+0.05) + y * y) < 0.1)
-		|| (left_or_right == RIGHT_FOOT && sqrt((x - 0.05) * (x - 0.05) + y * y) < 0.1))
+	if((left_or_right == LEFT_FOOT&& sqrt((x+0.15) * (x+0.15) + y * y) < 0.1)
+		|| (left_or_right == RIGHT_FOOT && sqrt((x - 0.15) * (x - 0.15) + y * y) < 0.1))
 	{
 		if (left_or_right == LEFT_FOOT)
 		{
@@ -349,9 +349,9 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 					break;
 				case 2://回到原点
 					if(left_or_right == LEFT_FOOT)
-						danceTraj[0] = -0.05; 
+						danceTraj[0] = -0.15; 
 					else
-						danceTraj[0] = 0.05;
+						danceTraj[0] = 0.15;
 
 					danceTraj[1] = 0.0;
 
@@ -394,7 +394,7 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 						pos_offset[1] = pos_offset[1] + special_offset[1];
 
 					}
-
+					/**/
 					//检测到横移的情况
 					else if (fabs(data[0].pos_x - data[len - 1].pos_x) > 0.3)
 					{
@@ -410,12 +410,12 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 						{
 							if (left_or_right == LEFT_FOOT)
 							{
-								special_offset[0] = -0.05 - mid_x;
+								special_offset[0] = -0.15 - mid_x;
 
 							}
 							else
 							{
-								special_offset[0] = 0.05 - mid_x;
+								special_offset[0] = 0.15 - mid_x;
 							}
 
 							if (data[0].pos_y > 0)
@@ -432,6 +432,7 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 
 							pos_offset[1] = pos_offset[1] + special_offset[1];
 						}
+						/*
 						else
 						{
 							special_offset[0] = -mid_x;
@@ -448,8 +449,10 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 							std::cout << "debug2 :" << special_offset[0] << " " << special_offset[1] << std::endl;
 
 						}
+						*/
+
+					}
 
-			}
 
 					break;
 				default:
@@ -505,7 +508,7 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 
 	if (zupt == 1)
 	{
-		zupt_count = 10;
+		zupt_count = 3;
 	}
 	else
 	{
@@ -602,9 +605,9 @@ void DanceFoot::setLastZupt(int lastZupt)
 void DanceFoot::setDanceTraj(float* traj)
 {
 	if(left_or_right == LEFT_FOOT)
-		danceTraj[0] = traj[0] - 0.05;
+		danceTraj[0] = traj[0] - 0.15;
 	else
-		danceTraj[0] = traj[0] + 0.05;
+		danceTraj[0] = traj[0] + 0.15;
 
 	danceTraj[1] = traj[1];
 }

+ 109 - 32
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Game.cpp

@@ -10,6 +10,8 @@ Game::Game(int gametype)
 	leftFootStep = FootStep();
 	rightFootStep = FootStep();
 
+	publicmotion = publicMotion();
+
 	rotateMatrix[0] = 1.0f;
 	rotateMatrix[1] = 0.0f;
 	rotateMatrix[2] = 0.0f;
@@ -27,6 +29,9 @@ Game::Game(int gametype)
 	down_count = 0;
 	jump_count = 0;
 
+	last_left_step = 0;
+	last_right_step = 0;
+
 	down_wait = 0;
 	avoid_down_between_jump = 0;
 
@@ -34,6 +39,8 @@ Game::Game(int gametype)
 
 	InteractionCMD = -1;
 
+	shoes_down = 0;
+
 	if (GameType == RUNGAME)
 	{
 		rungame = RunGame();
@@ -72,6 +79,11 @@ Game::Game(int gametype)
 		bigfoot = BigFoot();
 	}
 	
+	else if (GameType == TESTGAME)
+	{
+		testgame = testGame();
+	}
+	
 
 }
 
@@ -151,6 +163,16 @@ int Game::getGameJumpCount()
 	return jump_count;
 }
 
+int Game::onlineDownEstimate()
+{
+	if (posTimeStamp % 8 != 0)
+	{
+		return 0;
+	}
+
+
+}
+
 void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right_acc, int right_zupt, int right_press,
 	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press, 
 	int jump, int down, int rssi, int girl_shoes)
@@ -173,22 +195,10 @@ void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right
 	if (GameType == RUNGAME)
 	{
 		//跑酷游戏处理函数
-		if (left_zupt)
-		{
-			rotateTrajLeft.ResetHeading(left_att[0]);
-		}
-		rotateTrajLeft.TrajRotate(left_pos);
-	
-
-		if (right_zupt)
-		{
-			rotateTrajRight.ResetHeading(right_att[0]);
-		}
-		rotateTrajRight.TrajRotate(right_pos);
-		
 
+	
 		rungame.Process(right_pos, right_att, right_acc, right_zupt, right_press,
-			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, girl_shoes);
+			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, rssi);
 
 		//跑酷游戏处理结果获取
 		rungame.getResult(resultMatrix);
@@ -259,11 +269,15 @@ void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right
 		}
 		rotateTrajRight.TrajRotate(right_pos);
 
+
 		tricycle.Process(right_pos, right_att, right_acc, right_zupt, right_press,
 			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, girl_shoes);
 
 		tricycle.getResult(resultMatrix);
 
+		left_att[0] = resultMatrix[0];
+		resultMatrix[0] = -1;
+		resultMatrix[1] = -1;
 	}
 
 	else if (GameType == BIGFOOT)
@@ -275,6 +289,14 @@ void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right
 		//跑酷游戏处理结果获取
 		bigfoot.getResult(resultMatrix);
 	}
+
+	else if (GameType == TESTGAME)
+	{
+		testgame.Process(right_pos, right_att, right_acc, right_zupt, right_press,
+			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, girl_shoes);
+
+		testgame.getResult(resultMatrix);
+	}
 	
 	/*
 	if (foot_data_file.is_open()&& GameType == DANCEGAME)
@@ -347,7 +369,7 @@ float Game::getGamePos(int left_or_right, int index)
 
 	if (GameType == RUNGAME)
 	{
-		return -1;
+		return rungame.getGamePos(left_or_right, index);
 	}
 	else if(GameType == DANCEGAME)
 	{
@@ -370,10 +392,25 @@ string Game::getVersion()
 
 string Game::getGameDataStr()
 {
-	string data_str = "";
+	string data_str_temp = "";
 
 	//先记录右边
 
+	data_str_temp = data_str;
+
+	data_str = "";
+
+	return data_str_temp;
+
+}
+
+
+void Game::setGameDataStr()
+{
+	if (data_str.size() != 0)
+	{
+		data_str = "";
+	}
 	data_str += (to_string(right_pos_data[0]) + "," + to_string(right_pos_data[1]) + "," + to_string(right_pos_data[2]) + ",");
 	data_str += (to_string(right_att_data[0]) + "," + to_string(right_att_data[1]) + "," + to_string(right_att_data[2]) + ",");
 	data_str += (to_string(right_acc_data[0]) + "," + to_string(right_acc_data[1]) + "," + to_string(right_acc_data[2]) + ",");
@@ -388,11 +425,15 @@ string Game::getGameDataStr()
 
 	data_str += (to_string(down) + "," + to_string(jump) + "," + to_string(rssi) + "," + to_string(posTimeStamp) + ",");
 
-	data_str += (to_string(right_step) + "," + to_string(left_step));
-
-	return data_str;
+	data_str += (to_string(right_step) + "," + to_string(left_step) + "," + to_string(shoes_down) );
 
+}
 
+void Game::getFootAtt(int* left_att, int* right_att)
+{
+	memcpy(right_att, right_att_data, 3 * sizeof(int));
+	memcpy(left_att, left_att_data, 3 * sizeof(int));
+	
 }
 
 
@@ -431,33 +472,37 @@ void Game::GameProcessBuf(uint8_t* buf, int len) {
 
 	h_zupt = (buf[48] & 0x04) >> 2;
 
-	down = (buf[48] & 0x02) >> 1;
+	shoes_down = (buf[48] & 0x02) >> 1;
 
 	jump = (buf[48] & 0x01) >> 0;
 
-
-	rssi = (int)buf[49];
+	rssi = (int) buf[49];
 
 	posTimeStamp = buf[50];
 
 	if (lastTimeStamp == -1)
 	{
 		lastTimeStamp = posTimeStamp;
-	}
 
-	gameTime += (posTimeStamp - lastTimeStamp < 0 ? posTimeStamp - lastTimeStamp + 256 : posTimeStamp - lastTimeStamp);
+		return;
 
-	lastTimeStamp = posTimeStamp;
+	}
 
-	//std::cout << "gameTime : " << gameTime << std::endl;
-	
-	if (gameTime - last_game_time > 1)
+
+	if (posTimeStamp - lastTimeStamp > - 100 && posTimeStamp - lastTimeStamp <=0)
 	{
-		//std::cout << "loss package : " << gameTime - last_game_time -1 << std::endl;
-		last_game_time = gameTime;
+		std::cout << "receive old shoes package ( lastTimeStamp : " << lastTimeStamp << " posTimeStamp : " << posTimeStamp << " )" <<endl;
+
+		lastTimeStamp = posTimeStamp;
+
+		return;
 	}
 
-	last_game_time++;
+
+	gameTime += (posTimeStamp - lastTimeStamp < 0 ? posTimeStamp - lastTimeStamp + 256 : posTimeStamp - lastTimeStamp);
+
+	lastTimeStamp = posTimeStamp;
+
 
 	right_front_mag = uint16_t(buf[51] << 8 | buf[52] << 0);
 	right_back_mag = uint16_t(buf[53] << 8 | buf[54] << 0);
@@ -476,10 +521,42 @@ void Game::GameProcessBuf(uint8_t* buf, int len) {
 		left_step = 0;
 	}
 
+	/*
+	* 利用步数来弥补丢失的触地信号,(PU鞋垫真几把垃圾)
+	*/
+
+	if (last_left_step != left_step)
+	{
+		h_zupt = 1;
+	}
+
+	if (last_right_step != right_step)
+	{
+		s_zupt = 1;
+	}
+
+	last_left_step = left_step;
+
+	last_right_step = right_step;
+
+	//SDK来判断蹲
+	if (publicmotion.getDownData(left_front_mag, right_front_mag, left_back_mag, right_back_mag))
+	{
+		down = 1;
+		//std::cout << "SDK down valic" << endl;
+	}
+	else
+	{
+		down = 0;
+	}
+	
 	GameProcess(gameTime,
 		right_pos_data, right_att_data, right_acc_data, s_zupt, (int)right_front_mag,
 		left_pos_data, left_att_data, left_acc_data, h_zupt, (int)left_front_mag,
-		jump, down, rssi, girl_shoes);
+		jump, shoes_down, rssi, girl_shoes);
+	
+
+	setGameDataStr();
 
 }
 

+ 21 - 0
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Game.h

@@ -22,6 +22,10 @@
 
 #include "BigFoot.h"
 
+#include "publicMotion.h"
+
+#include "testGame.h"
+
 #include <fstream>
 #include <time.h>
 #include <sstream>
@@ -43,6 +47,8 @@ class Game
 
 			void getGameResult(int* matrix);
 
+			void getFootAtt(int* left_att, int* right_att);
+
 			string getGameDataStr();
 
 			int getStepStatus(int left_or_right);
@@ -65,6 +71,10 @@ class Game
 
 			int getGameJumpCount();
 
+			int onlineDownEstimate();
+
+			void setGameDataStr();
+
 		private:
 
 			int GameType;
@@ -91,6 +101,10 @@ class Game
 
 			BigFoot bigfoot;
 
+			publicMotion publicmotion;
+
+			testGame testgame;
+
 			int leftStepRate;
 			int rightStepRate;
 			
@@ -154,6 +168,13 @@ class Game
 			int down_wait;
 			int avoid_down_between_jump;
 
+			uint32_t last_left_step;
+			uint32_t last_right_step;
+
+			string data_str;
+
+			int shoes_down;
+
 };
 
 #endif

+ 0 - 47
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/ReadMe.txt

@@ -1,47 +0,0 @@
-
-
-1、sdk 简例:
-
-Game myGame = Game(RUNGAME);
-
-int result[4];
-
-myGame.GameProcess(right_pos_data, right_att_data, s_zupt, left_pos_data, left_att_data, h_zupt, jump, down, rssi);
-
-myGame.getGameResult(result);
-
-
-2,  结果解释
-
-result[0] 管左脚的方向,见pub.h 里面的定义_CMD_MOTION  MOTION_LEFT
-
-result[1] 管右脚的方向,见pub.h 里面的定义_CMD_MOTION  MOTION_RIGHT
-
-result[2]:跳  见pub.h 里面的定义_CMD_MOTION MOTION_JUMP
-
-result[3]: 蹲 见pub.h 里面的定义_CMD_MOTION MOTION_DOWN
-
-----------------------------------------------------------------------------------------------------------
-
-2021 /01 /13  新增步数 步频 步频快慢的接口
-
-获取方法:
-
-#define LEFT_FOOT 1
-#define RIGHT_FOOT 2
-
-int getStepStatus(int left_or_right); // 0 为停止 1为正常速度 2为快速
-
-int getStepFreq(int left_or_right);  //输出为步频
-
-int getStepCount(int left_or_right); //输出创建对象后的步数统计		
-
-接口输入异常参数,均输出-1	
-----------------------------------------------------------------------------------------------
-2021/02/08 优化跳舞毯的参数调整,包括跳舞毯的边界值,往后也需要迭代修改
-
-1、本次修改的参数包括 边界的大小,大范围移动的检测后的落地值优化
-
-2、将RSSI判断小范围移动的信号阈值改至5以内
-
-	

+ 394 - 42
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/RunGame.cpp

@@ -3,60 +3,332 @@
 
 #include "pub.h"
 
-void RunGame::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
-	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
-	int jump, int down, int girl_shoes)
+int rotateGamePos(int* pos, float heading, int left_or_right);
+
+void check_vector(vector<POS_X_CELL> &data_vector, int zupt)
 {
-	/*
-		跑酷游戏处理接口,
-		暂时在同一个函数里分开处理左右脚的数据,往后再优化
-	*/
+	//1、当 当前为触地时刻, 应保证 data_vector 仅有两个zupt
+	// vector 不可能为空,不作 空的判断
 
-	if (left_zupt)
+	if (zupt == 1)
 	{
-		memcpy(left_last_pos, left_pos, 3 * sizeof(int));
+		//如果输入为触地信号,那么应该先弹出头部zupt为0的数据
+		if (data_vector.size() == 1)
+		{
+			return;
+		}
+		while (data_vector.size() != 0)
+		{
+			if (data_vector[0].zupt == 0)
+			{
+				data_vector.erase(data_vector.begin());
+			}
+			else
+			{
+				break;
+			}
+		}
+
+		//再检测当前数组应该保持两个ZUPT就好
+		if (data_vector.size() == 1)
+		{
+			return;
+		}
+
+		//先统计当前有几个zupt吧
+		int zupt_count = 0;
+		for (int i = 0; i < data_vector.size(); i++)
+		{
+			if (data_vector[i].zupt == 1)
+			{
+				zupt_count++;
+			}
+		}
+
+		if (zupt_count <= 1)
+		{
+			std::cout << "rungame error 1 zupt_count : " << zupt_count <<endl;
+		}
+
+		//删除多余的触地数据
+		int delete_data_count = zupt_count - 2;
+
+		while (delete_data_count > 0)
+		{
+			if (data_vector[0].zupt == 1)
+			{
+				delete_data_count--;
+			}
+			data_vector.erase(data_vector.begin());
+		}
+
+		//判断额外的情况,如果数据长度就只有两个,而且都是zupt,那么就需要删除头部
+
+		if (data_vector.size() == 2 && data_vector[0].zupt == 1 && data_vector[1].zupt == 1)
+		{
+			data_vector.erase(data_vector.begin());
+		}
+
 	}
+	else
+	{
+		//当前信号为触地信号
+		//保证当前应该只有一个zupt信号
+		 
+		if (data_vector.size() == 1)
+		{
+			data_vector.clear();
+		}
 
-	if (right_zupt)
+		int zupt_count = 0;
+		for (int i = 0; i < data_vector.size(); i++)
+		{
+			if (data_vector[i].zupt == 1)
+			{
+				zupt_count++;
+			}
+		}
+
+		if (zupt_count == 0)
+		{
+			data_vector.clear();
+		}
+
+		//删除多余的触地数据
+		int delete_data_count = zupt_count - 1;
+
+		while (delete_data_count > 0)
+		{
+			if (data_vector[0].zupt == 1)
+			{
+				delete_data_count--;
+			}
+			data_vector.erase(data_vector.begin());
+		}
+
+	}
+}
+
+//计算结果的时候应该保持
+int calResult_LEFT(vector<POS_X_CELL>& data_vector)
+{
+	int motion = 0;
+	if (data_vector.size() <= 1)
 	{
-		memcpy(right_last_pos, right_pos, 3 * sizeof(int));
+		return motion;
 	}
 
-	int left_pos_tmp[3];
-	int right_pos_tmp[3];
+	//经过检查后,保证了头部只有一个触地信号, 
+	//那么应当将触地信号设置本数据段的初始方向,计算一系列旋转后的位置
 
-	for (int i = 0; i < 3; i++)
+	vector<int> pos_x_vector;
+	int pos_temp[3];
+	float heading_temp = data_vector[0].heading * 0.0001f;
+
+	for (int  i = 0; i < data_vector.size(); i++)
 	{
-		left_pos_tmp[i] = left_pos[i] - left_last_pos[i];
+		pos_temp[0] = data_vector[i].pos_x;
+		pos_temp[1] = data_vector[i].pos_y;
+		pos_temp[2] = data_vector[i].pos_z;
 
-		right_pos_tmp[i] = right_pos[i] - right_last_pos[i];
+		pos_x_vector.push_back(rotateGamePos(pos_temp, heading_temp, LEFT_FOOT));
 	}
 
-	
-	if (left_zupt == 0)
+	//左脚的话应该先找到最大值,及对应的位置
+	int max_val = pos_x_vector[0];
+	int max_val_index = 0;
+	for (int i = 0; i < pos_x_vector.size(); i++)
 	{
-		std::cout << "rungame leftpos: " << left_pos_tmp[0] << " " << left_pos_tmp[1] << " " << left_pos_tmp[2] << std::endl;
+		if (max_val < pos_x_vector[i])
+		{
+			max_val = pos_x_vector[i];
+
+			max_val_index = i;
+		}
 	}
-	
+	//再做判断
+	if (max_val - pos_x_vector[pos_x_vector.size() - 1] > 15 && data_vector[pos_x_vector.size() - 1].pitch * 0.0001f < 0.3f)
+	{
+		for (int i = 0; i < pos_x_vector.size(); i++)
+		{
+			std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , " ;
+		}
+		std::cout << endl;
 
 
+		if (data_vector[data_vector.size() - 1].zupt == 1)
+		{
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
 
-	left_acc_status =  getAccStatus(left_zupt, left_acc, left_acc_max, left_acc_min);
+			data_vector.push_back(temp);
+		}
+		else
+		{
+			data_vector.clear();
+		}
 
-	right_acc_status = getAccStatus(right_zupt, right_acc, right_acc_max, right_acc_min);
-	
-	setResultConLeft(left_zupt);
+		motion = 1;
+	}
+	else
+	{
+		if (data_vector[data_vector.size() - 1].zupt == 1 && data_vector[0].zupt == 1)
+		{
+			std::cout << "debug queue" << endl;
+			for (int i = 0; i < pos_x_vector.size(); i++)
+			{
+				std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , ";
+			}
+			std::cout << endl;
+
+			//在检测结果的时候,还能遇到两个触地信号,那么直接这段数据清空,留最新的触地信号
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
+
+			data_vector.push_back(temp);
+		}
+	}
+
+	return motion;
+}
+
+int calResult_RIGHT(vector<POS_X_CELL>& data_vector)
+{
+	int motion = 0;
+	if (data_vector.size() <= 1)
+	{
+		return motion;
+	}
+
+	//经过检查后,保证了头部只有一个触地信号, 
+	//那么应当将触地信号设置本数据段的初始方向,计算一系列旋转后的位置
+
+	vector<int> pos_x_vector;
+	int pos_temp[3];
+	float heading_temp = data_vector[0].heading * 0.0001f;
+
+	for (int i = 0; i < data_vector.size(); i++)
+	{
+		pos_temp[0] = data_vector[i].pos_x;
+		pos_temp[1] = data_vector[i].pos_y;
+		pos_temp[2] = data_vector[i].pos_z;
+
+		pos_x_vector.push_back(rotateGamePos(pos_temp, heading_temp, LEFT_FOOT));
+	}
+
+	//右脚的话应该先找到最小值,及对应的位置
+	int min_val = pos_x_vector[0];
+	int min_val_index = 0;
+	for (int i = 0; i < pos_x_vector.size(); i++)
+	{
+		if (min_val > pos_x_vector[i])
+		{
+			min_val = pos_x_vector[i];
+
+			min_val_index = i;
+		}
+	}
+	//再做判断
+	if (pos_x_vector[pos_x_vector.size() - 1] - min_val > 15 && data_vector[pos_x_vector.size() - 1].pitch * 0.0001f < 0.3f)
+	{
+		std::cout << "right_foot pos_offset : ";
+
+		for (int i = 0; i < pos_x_vector.size(); i++)
+		{
+			std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , ";
+		}
+		std::cout << endl;
+		
+
+		if (data_vector[data_vector.size() - 1].zupt == 1)
+		{
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
+
+			data_vector.push_back(temp);
+		}
+		else
+		{
+			data_vector.clear();
+		}
+
+		motion = 1;
+	}
+	else
+	{
+		if (data_vector[data_vector.size() - 1].zupt == 1 && data_vector[0].zupt == 1)
+		{
+			std::cout << "debug queue" << endl;
+			for (int i = 0; i < pos_x_vector.size(); i++)
+			{
+				std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , ";
+			}
+			std::cout << endl;
+
+			//在检测结果的时候,还能遇到两个触地信号,那么直接这段数据清空,留最新的触地信号
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
+
+			data_vector.push_back(temp);
+		}
+
+		
+	}
+
+	return motion;
+}
+
+void RunGame::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
+	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
+	int jump, int down, int rssi)
+{
+
+
+	POS_X_CELL left_pos_x_cell = { left_pos[0], left_pos[1], left_pos[2], left_att[0], left_att[1], left_zupt };
+
+	POS_X_CELL right_pos_x_cell = { right_pos[0], right_pos[1], right_pos[2], right_att[0], right_att[1],right_zupt };
+
+	left_q.push_back(left_pos_x_cell);
+	right_q.push_back(right_pos_x_cell);
+
+	check_vector(left_q, left_zupt);
+
+	check_vector(right_q, right_zupt);
+
+
+	if (calResult_LEFT(left_q))
+	{
+		result[0] = MOTION_LEFT;
+
+		std::cout << "appear LEFT_MOTION CMD" << endl;
+	}
+	else
+	{
+		result[0] = -1;
+	}
+
+	if (calResult_RIGHT(right_q))
+	{
+		result[1] = MOTION_RIGHT;
+
+		std::cout << "appear RIGHT_MOTION CMD" << endl;
+	}
+	else
+	{
+		result[1] = -1;
+	}
 
-	result[0] = getResultLeft(left_pos_tmp, girl_shoes);
 
-	setResultConRight(right_zupt);
-	
-	result[1] = getResultRight(right_pos_tmp, girl_shoes);
 
 	result[2] = getResultJump(jump);
 
 	result[3] = getResultDown(down);
 
+
+	last_left_zupt = left_zupt;
+	last_right_zupt = right_zupt;
+
+
 }
 
 void RunGame::getResult(int* dec)
@@ -122,14 +394,11 @@ int RunGame::getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc)
 }
 
 
-int RunGame::getResultLeft(int *pos, int girl_shoes)
+int RunGame::getResultLeft(int *pos, int girl_shoes, float pitch)
 {
 	int isLeft = -1;
 
-	int distance_threshold = 20;
-
-	if (girl_shoes)
-		distance_threshold = 15;
+	int distance_threshold = 15;
 
 	if (pos[0] > left_pos_offset_min)
 	{
@@ -137,7 +406,7 @@ int RunGame::getResultLeft(int *pos, int girl_shoes)
 
 	}
 
-	if (left_has_result == 1 && pos[0] - left_pos_offset_min < -distance_threshold)
+	if (left_has_result == 1 && pos[0] - left_pos_offset_min < -distance_threshold && pitch < 0.3f )
 	{
 		printf("this motion is Left\n");
 		isLeft = MOTION_LEFT;
@@ -152,26 +421,24 @@ int RunGame::getResultLeft(int *pos, int girl_shoes)
 	return isLeft;
 }
 
-int RunGame::getResultRight(int *pos, int girl_shoes)
+int RunGame::getResultRight(int *pos, int girl_shoes, float pitch)
 {
 	int isRight = -1;
 
-	int distance_threshold = 20;
+	int distance_threshold = 15;
+
 
-	if (girl_shoes)
-	{
-		distance_threshold = 15;
-	}
 	if (pos[0] < right_pos_offset_min)
 	{
 		right_pos_offset_min = pos[0];
 	}
 
-	if (right_has_result == 1 && pos[0] - right_pos_offset_min > distance_threshold)
+	if (right_has_result == 1 && pos[0] - right_pos_offset_min > distance_threshold && pitch < 0.3f )
 	{
 		printf("this motion is Right\n");
 
 		isRight = MOTION_RIGHT;
+
 		right_has_result = 0;
 	}
 	else if (right_has_result == 1 && pos[0] - right_pos_offset_min > distance_threshold && right_acc_status == 0)
@@ -204,7 +471,7 @@ int RunGame::getResultJump(int jump)
 
 	last_jump_time++;
 
-	if (last_jump == 0 && jump == 1 && left_acc_status == 1 && right_acc_status == 1)
+	if (last_jump == 0 && jump == 1)
 	{
 		static int jump_count = 0;
 
@@ -243,6 +510,21 @@ int RunGame::getResultDown(int down)
 
 }
 
+float RunGame::getGamePos(int left_or_right, int index)
+{
+	if (index < 0 || index > 2)
+		return -1;
+
+	if (left_or_right == LEFT_FOOT)
+	{
+		return left_game_pos[index] * 0.01f;
+	}
+	else
+	{
+		return right_game_pos[index] * 0.01f;
+	}
+}
+
 RunGame::RunGame()
 {
 	last_down = 0;
@@ -264,4 +546,74 @@ RunGame::RunGame()
 	memset(left_last_pos, 0, 3 * sizeof(int));
 	memset(right_last_pos, 0, 3 * sizeof(int));
 
+	left_reset_heading = 0.f;
+
+	right_reset_heading = 0.f;
+	
+	has_init_heading = 0;
+	
+	zupt_count = 0;
+
+	memset(left_game_pos, 0, 3 * sizeof(int));
+	memset(right_game_pos, 0, 3 * sizeof(int));
+
+	last_left_zupt = 1;
+	last_right_zupt = 1;
+}
+
+void RunGame::setGameheading(int left_zupt, int right_zupt, float left_heading, float right_heading , int rssi)
+{
+
+	if (left_zupt)
+	{
+		left_reset_heading = left_heading;
+	}
+
+	if (right_zupt)
+	{
+		right_reset_heading = right_heading;
+	}
+	
+
+}
+
+int rotateGamePos(int* pos, float heading,int left_or_right)
+{
+	float pos_f[3];
+
+	pos_f[2] = float(pos[2]) * 0.01f;
+	pos_f[1] = float(pos[1]) * 0.01f;
+	pos_f[0] = float(pos[0]) * 0.01f;
+
+	float posTemp[3];
+
+	posTemp[2] = pos_f[2];
+
+	
+	if (left_or_right == LEFT_FOOT)
+	{
+		posTemp[0] =  cos(heading) * float(pos_f[0]) + sin(heading) * float(pos_f[1]);
+		posTemp[1] = -sin(heading) * float(pos_f[0]) + cos(heading) * float(pos_f[1]);
+
+		/*
+		*  因为女生跑的时候,左鞋鞋子朝向是往左的,导致不在人体的主方向,会使估计的X方向轨迹会变长
+		*/
+		pos_f[0] = 0.9848 * posTemp[0] - 0.1736 * posTemp[1];
+		pos_f[1] = 0.1736 * posTemp[0] + 0.9848 * posTemp[1];
+	}
+	else
+	{
+		posTemp[0] = cos(heading) * float(pos_f[0]) + sin(heading) * float(pos_f[1]);
+		posTemp[1] = -sin(heading) * float(pos_f[0]) + cos(heading) * float(pos_f[1]);
+
+		pos_f[0] = 0.9848 * posTemp[0] + 0.1736 * posTemp[1];
+		pos_f[1] = - 0.1736 * posTemp[0] + 0.9848 * posTemp[1];
+	}
+	/*
+	pos[0] = (int)(pos_f[0] * 100.0f);
+	pos[1] = (int)(pos_f[1] * 100.0f);
+	pos[2] = (int)(pos_f[2] * 100.0f);
+	*/
+
+	return (int)(pos_f[0] * 100.0f);
 }

+ 47 - 3
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/RunGame.h

@@ -2,6 +2,24 @@
 #ifndef _RunGame_H_
 #define _RunGame_H_
 
+#include <vector>
+
+using namespace std;
+
+struct POS_X_CELL
+{
+	//位置
+	int pos_x;
+	int pos_y;
+	int pos_z;
+
+	//角度
+	int heading;
+	int pitch;
+
+	int zupt;
+};
+
 class RunGame
 {
 	public:
@@ -12,21 +30,27 @@ class RunGame
 		void setResultConLeft(int zupt);
 		void setResultConRight(int zupt);
 
-		int getResultLeft(int *pos, int girl_shoes);
-		int getResultRight(int *pos, int girl_shoes);
+		int getResultLeft(int *pos, int girl_shoes, float pitch);
+		int getResultRight(int* pos, int girl_shoes, float pitch);
 
 		//void Process(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 Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
 			int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
-			int jump, int down, int girl_shoes);
+			int jump, int down, int rssi);
 
 		void getResult(int *dec);
 
 		int getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc);
 
+		void setGameheading(int left_zupt, int right_zupt, float left_heading, float right_heading, int rssi);
+
+		void rotateGamePos(int* pos, int left_or_right);
+
+		float getGamePos(int left_or_right, int index);
 
+		int  calResult(vector<POS_X_CELL> &q, int last_zupt , int zupt, int left_or_right);
 
 	private:
 
@@ -61,6 +85,26 @@ class RunGame
 
 		int left_acc_min[3];
 
+		//开局重置方向
+
+		float left_reset_heading;
+		
+		float right_reset_heading;
+		
+		int has_init_heading;
+
+		int zupt_count;
+
+		//测试用的pos
+		int left_game_pos[3];
+
+		int right_game_pos[3];
+
+		int last_left_zupt;
+		int last_right_zupt;
+
+		vector<POS_X_CELL> left_q;
+		vector<POS_X_CELL> right_q;
 
 };
 

+ 51 - 89
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Tricycle.cpp

@@ -29,6 +29,10 @@ Tricycle::Tricycle()
 
 	has_init = 0;
 
+	last_jump = 0;
+
+	prop_status = 0;
+
 }
 
 void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
@@ -55,16 +59,24 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 		right_zupt_count = 0;
 	}
 
+
 	float cur_left_heading = left_att[0] * 0.0001f;
 	float cur_right_heading = right_att[0] * 0.0001f;
 
+
 	//计算初始方向
 	if (left_zupt_count > 100 && right_zupt_count > 100 && rssi < 32)
 	{
 		left_foot_init_heading  = cur_left_heading;
 		right_foot_init_heading = cur_right_heading;
 
+		if (has_init == 0)
+		{
+			std::cout << "Cycle has inited !!!" << endl;
+		}
+
 		has_init = 1;
+
 	}
 
 
@@ -72,10 +84,11 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 
 	float right_heading_offset = calHeadingOffset(right_foot_init_heading, cur_right_heading);
 
+	//std::cout << "left_heading_offset : " << left_heading_offset << " right_heading_offset : " << right_heading_offset << endl;
 
 	if (fabsf(calHeadingOffset(left_heading_offset, right_heading_offset)) > PI/3.0f)
 	{
-		std::cout<< "dual_foot_heading appear max angle" <<endl;
+		//std::cout<< "dual_foot_heading appear max angle" <<endl;
 	}
 
 
@@ -90,7 +103,7 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 
 	int up_prop = -1;
 
-	if (jump && left_trigger_time == 0 && right_trigger_time == 0)
+	if (last_jump == 0 && jump)
 	{
 		left_jump_status = 1;
 		right_jump_status = 1;
@@ -98,101 +111,49 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 		std::cout << "过程中出现跳" << endl;
 	}
 
-	if (left_zupt && last_left_zupt == 0 && left_trigger_time == 0 && left_jump_status == 1)
-	{
-		left_trigger_time = 50;
-
-		if (left_pos_offset < -10)
-		{
-			left_jump_status = 2;
-		}
-		else if (left_pos_offset > 10)
-		{
-			left_trigger_time = 0;
-			left_jump_status = 0;
-
-			std::cout << "左脚将状态全设置为0" << endl;
-		}
-
-	}
-
-
-	if (left_zupt && last_left_zupt == 0)
-	{
-		std::cout << "left_zupt && last_left_zupt == 0" << endl;
-
-		std::cout << "left_jump_status : " << left_jump_status << endl;
-
-		std::cout << "left_trigger_time : " << left_trigger_time << endl;
-	}
-
-
-
-	if (right_zupt && last_right_zupt == 0 && right_trigger_time == 0 && right_jump_status == 1)
-	{
-		right_trigger_time = 50;
-
-		if (right_pos_offset > 10)
-		{
-			right_jump_status = 2;
-		}
-		else if (right_pos_offset < -10)
-		{
-			right_jump_status = 0;
-
-			right_trigger_time = 0;
-
-			std::cout << "右脚将状态全设置为0" << endl;
-		}
-	}
-
-	if (right_zupt && last_right_zupt == 0)
-	{
-		std::cout << "right_zupt && last_right_zupt == 0" << endl;
-
-		std::cout << "right_jump_status : " << right_jump_status <<endl;
-
-		std::cout << "right_trigger_time : " << right_trigger_time << endl;
-	}
-
 
-
-	if( right_trigger_time > 0 && left_trigger_time > 0)
+	if ((left_zupt && last_left_zupt == 0) || (right_zupt && last_right_zupt == 0))
 	{
-		//触发触发释放物品
-
-		std::cout << "debug : if( right_trigger_time > 0 && left_trigger_time > 0)" << endl;
-
-		if (right_jump_status == 1 && left_jump_status == 1)
+		if (left_pos_offset < -15 && right_pos_offset > 15)
 		{
 			up_prop = 1;
 
+			prop_status = up_prop;
+
 			std::cout << "上层 发放物品" << endl;
 		}
-		else if (right_jump_status == 2 && left_jump_status == 2)
-		{
-			down_prop = 1;
-
-			std::cout << "下层 发放物品" << endl;
+		else if (left_jump_status == 1 && right_jump_status == 1)
+		{	
+			if (abs(left_pos_offset) < 10 && abs(right_pos_offset) < 10 && prop_status == 1)
+			{
+				up_prop = 1;
+				std::cout << "因为上个状态是 上层发放物品,所以 这次也是 上层发放物品"  << endl;
+			}
+			else if (abs(left_pos_offset) < 8 && abs(right_pos_offset) < 8)
+			{
+				down_prop = 1;
+
+				prop_status = 0;
+
+				std::cout << "下层 发放物品" << endl;
+			}
+			else
+			{
+				prop_status = 0;
+			}
+			std::cout << "left_pos_offset : " << left_pos_offset << "  right_pos_offset : " << right_pos_offset << endl;
 		}
-		else
+
+		if (left_pos_offset > 8 && right_pos_offset < -8)
 		{
-			std::cout << "debug : right_jump_status : " << right_jump_status << "left_jump_status :" << left_jump_status << endl;
+			prop_status = 0;
 		}
 
-		right_trigger_time = 0;
-		left_trigger_time = 0;
+		left_jump_status = 0;
+		right_jump_status = 0;
 	}
 
-	if (left_trigger_time > 0)
-	{
-		left_trigger_time --;
-	}
 
-	if (right_trigger_time > 0)
-	{
-		right_trigger_time--;
-	}
 
 
 	if (left_zupt)
@@ -203,8 +164,6 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 			last_left_pos[i] = left_pos[i];
 		}
 
-		if(left_trigger_time == 0)
-			left_jump_status = 0;
 	}
 
 	left_pos_offset = left_pos[0] - last_left_pos[0];
@@ -215,8 +174,6 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 		{
 			last_right_pos[i] = right_pos[i];
 		}
-		if(right_trigger_time == 0)
-			right_jump_status = 0;
 	}
 
 	right_pos_offset = right_pos[0] - last_right_pos[0];
@@ -224,15 +181,20 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 	last_left_zupt = left_zupt;
 	last_right_zupt = right_zupt;
 
+	last_jump = jump;
+
 
 	result[0] = (int)(game_heading_offset * 10000.0f);
 
-	result[1] = up_prop;
-	result[2] = down_prop;
+	result[1] = result[0];
+
+	result[2] = (down_prop == 1 ? MOTION_JUMP_OC : -1);
+	result[3] = (up_prop == 1 ? MOTION_JUMP_VERTICAL : -1);
 
 	if (has_init == 0)
 	{
 		result[0] = 0;
+		result[1] = 0;
 	}
 
 }

+ 4 - 0
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/Tricycle.h

@@ -51,6 +51,10 @@ private:
 	int left_pos_offset;
 	int right_pos_offset;
 
+	int last_jump;
+
+	int prop_status;
+
 };
 
 #endif

+ 6 - 1
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/pub.h

@@ -26,6 +26,8 @@ using namespace std;
 #define CYCLE 6
 #define BIGFOOT 7
 
+#define TESTGAME 100
+
 #define RSSI_LIMIT
 
 #define PI 3.141592653
@@ -34,7 +36,7 @@ using namespace std;
 
 #define PRESS_MIN 41000
 
-#define GAME_VERSION "0.3.30"
+#define GAME_VERSION "0.3.52"
 
 enum CMD_MOTION
 {
@@ -51,6 +53,9 @@ enum CMD_MOTION
     MOTION_RIGHT_UP, // 点击-右上
     MOTION_RIGHT_DOWN, // 点击-右下
     MOTION_STEP, // 点击-原地踩
+    MOTION_JUMP_OC, // 开合跳
+    MOTION_JUMP_VERTICAL, // 垂直跳
+
 
     NUMBERS_OF_MOTION,
 

+ 186 - 0
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/publicMotion.cpp

@@ -0,0 +1,186 @@
+#include "publicMotion.h"
+
+publicMotion::publicMotion()
+{
+	motion_time = 0;
+
+	memset(left_front_mag_window, 0, 5 * sizeof(int));
+
+	memset(right_front_mag_window, 0, 5 * sizeof(int));
+
+	memset(left_back_mag_window, 0, 5 * sizeof(int));
+
+	memset(right_back_mag_window, 0, 5 * sizeof(int));
+
+	memset(left_front_mag_mean_window, 0, 15 * sizeof(int));
+
+	memset(right_front_mag_mean_window, 0, 15 * sizeof(int));
+
+	memset(left_back_mag_mean_window, 0, 15 * sizeof(int));
+
+	memset(right_back_mag_mean_window, 0, 15 * sizeof(int));
+
+	left_front_up_time = 0;
+	right_front_up_time = 0;
+
+	left_back_up_time = 0;
+	right_back_up_time = 0;
+
+}
+
+void publicMotion::meanFiltData(int time_count, int mag_data, int* mag_data_window, int* mean_mag_data)
+{
+	if (time_count < 7)
+	{
+		mean_mag_data[time_count % 5] = mag_data;
+
+	}
+	else
+	{
+		float sum = 0;
+		for (int i = 0; i < 5; i++)
+		{
+			sum += mag_data_window[i];
+		}
+
+		mean_mag_data[time_count % 15] = sum / 5.;
+	}
+}
+
+/*
+* 均值滤波的窗口大小为10, 当检测到前三个的和 < 后三个数据的和,则视为上升的趋势
+* 上升的时候,还要检测上升趋势的最大值,防止两个凸曲线有重叠误判为蹲
+*/
+void  publicMotion::setSpecialPoint_part(int mag_data, int* mean_data, int* max_val, int* down_point, int* up_time)
+{
+	int prev_sum = (mean_data[(motion_time - 8) % 15] + mean_data[(motion_time - 7) % 15] + mean_data[(motion_time - 6) % 15]);
+
+	int prev_sum1 = (mean_data[(motion_time - 11) % 15] + mean_data[(motion_time - 10) % 15] + mean_data[(motion_time - 9) % 15]);
+	int prev_sum2 = (mean_data[(motion_time - 14) % 15] + mean_data[(motion_time - 13) % 15] + mean_data[(motion_time - 12) % 15]);
+
+	int back_sum = (mean_data[(motion_time - 2) % 15] + mean_data[(motion_time - 1) % 15] + mean_data[(motion_time) % 15]);
+
+	if (prev_sum < back_sum - 100 || prev_sum1 < back_sum - 10 || prev_sum2 < back_sum - 10)
+	{
+		if (*max_val < mean_data[motion_time % 15])
+		{
+			*max_val = mean_data[motion_time % 15];
+		}
+
+		(*up_time)++;
+	}
+	else
+	{
+		*max_val = mean_data[motion_time % 15];
+
+		*down_point = mean_data[motion_time % 15];
+
+		*up_time = 0;
+	}
+}
+
+void publicMotion::setSpecialPoint(int left_front_data, int right_front_data, int left_back_data, int right_back_data)
+{
+	if (motion_time < 10)
+	{
+		left_back_mag_point_val = left_back_data;
+		right_back_mag_point_val = right_back_data;
+
+		left_front_mag_point_val = left_front_data;
+		right_front_mag_point_val = right_front_data;
+
+		left_back_mag_up_max = left_back_data;
+		right_back_mag_up_max = right_back_data;
+
+		left_front_mag_up_max = left_front_data;
+		right_front_mag_up_max = right_front_data;
+	}
+	else
+	{
+
+		setSpecialPoint_part(left_front_data, left_front_mag_mean_window, &left_front_mag_up_max, &left_front_mag_point_val, &left_front_up_time);
+
+		setSpecialPoint_part(right_front_data, right_front_mag_mean_window, &right_front_mag_up_max, &right_front_mag_point_val, &right_front_up_time);
+
+		setSpecialPoint_part(left_back_data, left_back_mag_mean_window, &left_back_mag_up_max, &left_back_mag_point_val, &left_back_up_time);
+
+		setSpecialPoint_part(right_back_data, right_back_mag_mean_window, &right_back_mag_up_max, &right_back_mag_point_val, &right_back_up_time);
+	}
+}
+
+void publicMotion::setMagData(int left_front_data, int right_front_data, int left_back_data, int right_back_data)
+{
+
+	left_front_mag_window[motion_time % 5] = left_front_data;
+
+	right_front_mag_window[motion_time % 5] = right_front_data;
+
+	left_back_mag_window[motion_time % 5] = left_back_data;
+
+	right_back_mag_window[motion_time % 5] = right_back_data;
+
+	//均值滤波
+	meanFiltData(motion_time, left_front_data, left_front_mag_window, left_front_mag_mean_window);
+	meanFiltData(motion_time, right_front_data, right_front_mag_window, right_front_mag_mean_window);
+
+	meanFiltData(motion_time, left_back_data, left_back_mag_window, left_back_mag_mean_window);
+	meanFiltData(motion_time, right_back_data, right_back_mag_window, right_back_mag_mean_window);
+
+	setSpecialPoint(left_front_data, right_front_data, left_back_data, right_back_data);
+
+
+	motion_time++;
+
+}
+
+int publicMotion::getDownData(int left_front_data, int right_front_data, int left_back_data, int right_back_data)
+{
+	setMagData(left_front_data, right_front_data, left_back_data, right_back_data);
+
+	int  left_front_down_tag = 0;
+	int  right_front_down_tag = 0;
+
+	int  left_back_down_tag = 0;
+	int  right_back_down_tag = 0;
+
+	if (left_back_data - left_back_mag_point_val > 2000 || (left_back_data - left_back_mag_point_val > 1000 && left_back_mag_point_val > 15000))
+	{
+		left_back_down_tag = 1;
+	}
+
+	if (right_back_data - right_back_mag_point_val > 2000 || (right_back_data - right_back_mag_point_val > 1000 && right_back_mag_point_val > 15000))
+	{
+		right_back_down_tag = 1;
+	}
+
+
+	if (left_back_down_tag && right_back_down_tag
+		&& left_back_data - left_back_mag_up_max > -500 && right_back_data - right_back_mag_up_max > -500 &&
+		abs(left_back_up_time - right_back_up_time) < 10 && left_back_up_time > 3 && right_back_up_time > 3)
+	{
+
+		return 1;
+	}
+
+
+	if (left_front_data - left_front_mag_point_val > 2000 || (left_front_data - left_front_mag_point_val > 1000 && left_front_mag_point_val > 15000))
+	{
+		left_front_down_tag = 1;
+	}
+
+	if (right_front_data - right_front_mag_point_val > 2000 || (right_front_data - right_front_mag_point_val > 1000 && right_front_mag_point_val > 15000))
+	{
+		right_front_down_tag = 1;
+	}
+
+	if (left_front_down_tag && right_front_down_tag
+		&& left_front_data - left_front_mag_up_max > -500 && right_front_data - right_front_mag_up_max > -500
+		&& abs(left_front_up_time - right_front_up_time) < 10 && left_front_up_time > 3 && right_front_up_time > 3)
+	{
+
+		return 1;
+	}
+
+
+	return 0;
+}

+ 58 - 0
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/publicMotion.h

@@ -0,0 +1,58 @@
+#pragma once
+#ifndef _PUBLIC_MOTION_H
+#define _PUBLIC_MOTION_H
+
+#include <iostream>
+
+class publicMotion {
+
+public:
+	publicMotion();
+
+	void setMagData(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
+	
+	void meanFiltData(int time_count, int mag_data, int* mag_data_window, int* mean_mag_data);
+
+	void setSpecialPoint(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
+
+	int getDownData(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
+
+	void setSpecialPoint_part(int mag_data, int* mean_data, int *max_val, int *down_point, int *up_time);
+
+private:
+	int left_front_mag_window[5];
+	int right_front_mag_window[5];
+
+	int left_back_mag_window[5];
+	int right_back_mag_window[5];
+
+	int left_front_mag_mean_window[15];
+	int right_front_mag_mean_window[15];
+
+	int left_back_mag_mean_window[15];
+	int right_back_mag_mean_window[15];
+
+	int motion_time;
+
+	int left_back_mag_point_val;
+	int right_back_mag_point_val;
+
+	int left_front_mag_point_val;
+	int right_front_mag_point_val;
+
+	int left_back_mag_up_max;
+	int right_back_mag_up_max;
+
+	int left_front_mag_up_max;
+	int right_front_mag_up_max;
+
+	int left_front_up_time;
+	int right_front_up_time;
+	
+	int left_back_up_time;
+	int right_back_up_time;
+
+};
+
+
+#endif

+ 22 - 0
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/testGame.cpp

@@ -0,0 +1,22 @@
+
+#include "testGame.h"
+
+testGame::testGame()
+{
+	for (int i = 0; i < 4; i++)
+	{
+		result[i] = 0;
+	}
+}
+
+void testGame::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
+	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
+	int jump, int down, int rssi)
+{
+	
+}
+
+void testGame::getResult(int* matrix)
+{
+	memcpy(matrix, result, 4 * sizeof(int));
+}

+ 24 - 0
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/shoes_sdk/testGame.h

@@ -0,0 +1,24 @@
+#pragma once
+#ifndef __test_game_h__
+#define __test_game_h__
+
+#include <iostream>
+
+class testGame {
+
+public:
+	testGame();
+
+	//void Process(int* right_pos, int* right_att, int right_zupt, int* left_pos, int* left_att, int left_zupt, int jump, int down, int rssi);
+	void Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
+		int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
+		int jump, int down, int rssi);
+
+	void getResult(int* matrix);
+
+private:
+
+	int result[4];
+};
+
+#endif

+ 98 - 90
DanceGame/Unity-iPhone.xcodeproj/project.pbxproj

@@ -217,21 +217,6 @@
 		93E62D52276C86EA006975D1 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CDA276C86E9006975D1 /* AFURLRequestSerialization.m */; };
 		93E62D53276C86EA006975D1 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CDC276C86E9006975D1 /* AFNetworkReachabilityManager.m */; };
 		93E62D54276C86EA006975D1 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CDD276C86E9006975D1 /* AFSecurityPolicy.m */; };
-		93E62D55276C86EA006975D1 /* DanceFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CE2276C86E9006975D1 /* DanceFoot.cpp */; };
-		93E62D56276C86EA006975D1 /* FootStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CE4276C86E9006975D1 /* FootStep.cpp */; };
-		93E62D57276C86EA006975D1 /* MonsterH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CE9276C86E9006975D1 /* MonsterH5.cpp */; };
-		93E62D58276C86EA006975D1 /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CEA276C86E9006975D1 /* BigFoot.cpp */; };
-		93E62D59276C86EA006975D1 /* Interaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CEB276C86E9006975D1 /* Interaction.cpp */; };
-		93E62D5A276C86EA006975D1 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CF0276C86E9006975D1 /* Tricycle.cpp */; };
-		93E62D5B276C86EA006975D1 /* SingleFootAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CF2276C86E9006975D1 /* SingleFootAction.cpp */; };
-		93E62D5C276C86EA006975D1 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CF4276C86E9006975D1 /* RuinsExplore.cpp */; };
-		93E62D5D276C86EA006975D1 /* DanceGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CF7276C86E9006975D1 /* DanceGame.cpp */; };
-		93E62D5E276C86EA006975D1 /* jumpH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CF8276C86E9006975D1 /* jumpH5.cpp */; };
-		93E62D5F276C86EA006975D1 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 93E62CF9276C86E9006975D1 /* ReadMe.txt */; };
-		93E62D60276C86EA006975D1 /* OriginTraj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CFA276C86E9006975D1 /* OriginTraj.cpp */; };
-		93E62D61276C86EA006975D1 /* RunGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CFB276C86E9006975D1 /* RunGame.cpp */; };
-		93E62D62276C86EA006975D1 /* InertialTrajProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CFC276C86E9006975D1 /* InertialTrajProcess.cpp */; };
-		93E62D63276C86EA006975D1 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E62CFE276C86E9006975D1 /* Game.cpp */; };
 		93E62D64276C86EA006975D1 /* 组24@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93E62D01276C86E9006975D1 /* 组24@3x.png */; };
 		93E62D65276C86EA006975D1 /* pop_image_circle@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93E62D02276C86E9006975D1 /* pop_image_circle@3x.png */; };
 		93E62D66276C86EA006975D1 /* pop_image_shoes@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93E62D03276C86E9006975D1 /* pop_image_shoes@3x.png */; };
@@ -284,6 +269,22 @@
 		93E62D95276C86EA006975D1 /* GameObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93E62D39276C86EA006975D1 /* GameObjc.mm */; };
 		93E62D96276C86EA006975D1 /* MYFactoryManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 93E62D3A276C86EA006975D1 /* MYFactoryManager.m */; };
 		93E62D97276C86EA006975D1 /* UIView+ST.m in Sources */ = {isa = PBXBuildFile; fileRef = 93E62D3B276C86EA006975D1 /* UIView+ST.m */; };
+		93E73833278BD7550017A553 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73813278BD7520017A553 /* Tricycle.cpp */; };
+		93E73834278BD7550017A553 /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73816278BD7520017A553 /* BigFoot.cpp */; };
+		93E73835278BD7550017A553 /* OriginTraj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73817278BD7530017A553 /* OriginTraj.cpp */; };
+		93E73836278BD7550017A553 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73818278BD7530017A553 /* RuinsExplore.cpp */; };
+		93E73837278BD7550017A553 /* RunGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7381B278BD7530017A553 /* RunGame.cpp */; };
+		93E73838278BD7550017A553 /* DanceFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7381C278BD7530017A553 /* DanceFoot.cpp */; };
+		93E73839278BD7550017A553 /* MonsterH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7381E278BD7530017A553 /* MonsterH5.cpp */; };
+		93E7383A278BD7550017A553 /* jumpH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73820278BD7530017A553 /* jumpH5.cpp */; };
+		93E7383B278BD7550017A553 /* SingleFootAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73824278BD7540017A553 /* SingleFootAction.cpp */; };
+		93E7383C278BD7550017A553 /* Interaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E73826278BD7540017A553 /* Interaction.cpp */; };
+		93E7383D278BD7550017A553 /* testGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7382A278BD7540017A553 /* testGame.cpp */; };
+		93E7383E278BD7550017A553 /* InertialTrajProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7382B278BD7540017A553 /* InertialTrajProcess.cpp */; };
+		93E7383F278BD7550017A553 /* DanceGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7382C278BD7540017A553 /* DanceGame.cpp */; };
+		93E73840278BD7550017A553 /* publicMotion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7382D278BD7540017A553 /* publicMotion.cpp */; };
+		93E73841278BD7550017A553 /* FootStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7382E278BD7540017A553 /* FootStep.cpp */; };
+		93E73842278BD7550017A553 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E7382F278BD7540017A553 /* Game.cpp */; };
 		95C14FE9BED3975E713BA10E /* Il2CppGenericMethodDefinitions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F9B4A2295D8624A07C3365B /* Il2CppGenericMethodDefinitions.cpp */; };
 		960391221D6CE46E003BF157 /* MediaToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 960391211D6CE46E003BF157 /* MediaToolbox.framework */; };
 		964C4A8287776D92342413A7 /* Bulk_UnityEngine.ParticleSystemModule_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDCF425D8FFA89C9BA1A04FA /* Bulk_UnityEngine.ParticleSystemModule_0.cpp */; };
@@ -690,36 +691,6 @@
 		93E62CDD276C86E9006975D1 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicy.m; sourceTree = "<group>"; };
 		93E62CDE276C86E9006975D1 /* AFCompatibilityMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFCompatibilityMacros.h; sourceTree = "<group>"; };
 		93E62CDF276C86E9006975D1 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPSessionManager.h; sourceTree = "<group>"; };
-		93E62CE1276C86E9006975D1 /* MonsterH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MonsterH5.h; sourceTree = "<group>"; };
-		93E62CE2276C86E9006975D1 /* DanceFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceFoot.cpp; sourceTree = "<group>"; };
-		93E62CE3276C86E9006975D1 /* RunGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunGame.h; sourceTree = "<group>"; };
-		93E62CE4276C86E9006975D1 /* FootStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FootStep.cpp; sourceTree = "<group>"; };
-		93E62CE5276C86E9006975D1 /* Tricycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tricycle.h; sourceTree = "<group>"; };
-		93E62CE6276C86E9006975D1 /* RuinsExplore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuinsExplore.h; sourceTree = "<group>"; };
-		93E62CE7276C86E9006975D1 /* DanceGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceGame.h; sourceTree = "<group>"; };
-		93E62CE8276C86E9006975D1 /* OriginTraj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OriginTraj.h; sourceTree = "<group>"; };
-		93E62CE9276C86E9006975D1 /* MonsterH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MonsterH5.cpp; sourceTree = "<group>"; };
-		93E62CEA276C86E9006975D1 /* BigFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BigFoot.cpp; sourceTree = "<group>"; };
-		93E62CEB276C86E9006975D1 /* Interaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Interaction.cpp; sourceTree = "<group>"; };
-		93E62CEC276C86E9006975D1 /* SingleFootAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleFootAction.h; sourceTree = "<group>"; };
-		93E62CED276C86E9006975D1 /* Interaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interaction.h; sourceTree = "<group>"; };
-		93E62CEE276C86E9006975D1 /* pub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pub.h; sourceTree = "<group>"; };
-		93E62CEF276C86E9006975D1 /* DanceFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceFoot.h; sourceTree = "<group>"; };
-		93E62CF0276C86E9006975D1 /* Tricycle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Tricycle.cpp; sourceTree = "<group>"; };
-		93E62CF1276C86E9006975D1 /* FootStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootStep.h; sourceTree = "<group>"; };
-		93E62CF2276C86E9006975D1 /* SingleFootAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleFootAction.cpp; sourceTree = "<group>"; };
-		93E62CF3276C86E9006975D1 /* BigFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigFoot.h; sourceTree = "<group>"; };
-		93E62CF4276C86E9006975D1 /* RuinsExplore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuinsExplore.cpp; sourceTree = "<group>"; };
-		93E62CF5276C86E9006975D1 /* InertialTrajProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InertialTrajProcess.h; sourceTree = "<group>"; };
-		93E62CF6276C86E9006975D1 /* Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Game.h; sourceTree = "<group>"; };
-		93E62CF7276C86E9006975D1 /* DanceGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceGame.cpp; sourceTree = "<group>"; };
-		93E62CF8276C86E9006975D1 /* jumpH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jumpH5.cpp; sourceTree = "<group>"; };
-		93E62CF9276C86E9006975D1 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
-		93E62CFA276C86E9006975D1 /* OriginTraj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OriginTraj.cpp; sourceTree = "<group>"; };
-		93E62CFB276C86E9006975D1 /* RunGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunGame.cpp; sourceTree = "<group>"; };
-		93E62CFC276C86E9006975D1 /* InertialTrajProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InertialTrajProcess.cpp; sourceTree = "<group>"; };
-		93E62CFD276C86E9006975D1 /* jumpH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jumpH5.h; sourceTree = "<group>"; };
-		93E62CFE276C86E9006975D1 /* Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Game.cpp; sourceTree = "<group>"; };
 		93E62CFF276C86E9006975D1 /* IOSPlatformSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSPlatformSDK.h; sourceTree = "<group>"; };
 		93E62D01276C86E9006975D1 /* 组24@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "组24@3x.png"; sourceTree = "<group>"; };
 		93E62D02276C86E9006975D1 /* pop_image_circle@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pop_image_circle@3x.png"; sourceTree = "<group>"; };
@@ -779,6 +750,39 @@
 		93E62D3A276C86EA006975D1 /* MYFactoryManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MYFactoryManager.m; sourceTree = "<group>"; };
 		93E62D3B276C86EA006975D1 /* UIView+ST.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+ST.m"; sourceTree = "<group>"; };
 		93E62D98276C87D3006975D1 /* cn.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = cn.entitlements; path = "Unity-iPhone/cn.entitlements"; sourceTree = "<group>"; };
+		93E73812278BD7520017A553 /* jumpH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jumpH5.h; sourceTree = "<group>"; };
+		93E73813278BD7520017A553 /* Tricycle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Tricycle.cpp; sourceTree = "<group>"; };
+		93E73814278BD7520017A553 /* Tricycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tricycle.h; sourceTree = "<group>"; };
+		93E73815278BD7520017A553 /* InertialTrajProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InertialTrajProcess.h; sourceTree = "<group>"; };
+		93E73816278BD7520017A553 /* BigFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BigFoot.cpp; sourceTree = "<group>"; };
+		93E73817278BD7530017A553 /* OriginTraj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OriginTraj.cpp; sourceTree = "<group>"; };
+		93E73818278BD7530017A553 /* RuinsExplore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuinsExplore.cpp; sourceTree = "<group>"; };
+		93E73819278BD7530017A553 /* testGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testGame.h; sourceTree = "<group>"; };
+		93E7381A278BD7530017A553 /* Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Game.h; sourceTree = "<group>"; };
+		93E7381B278BD7530017A553 /* RunGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunGame.cpp; sourceTree = "<group>"; };
+		93E7381C278BD7530017A553 /* DanceFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceFoot.cpp; sourceTree = "<group>"; };
+		93E7381D278BD7530017A553 /* OriginTraj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OriginTraj.h; sourceTree = "<group>"; };
+		93E7381E278BD7530017A553 /* MonsterH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MonsterH5.cpp; sourceTree = "<group>"; };
+		93E7381F278BD7530017A553 /* FootStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootStep.h; sourceTree = "<group>"; };
+		93E73820278BD7530017A553 /* jumpH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jumpH5.cpp; sourceTree = "<group>"; };
+		93E73821278BD7530017A553 /* RuinsExplore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuinsExplore.h; sourceTree = "<group>"; };
+		93E73822278BD7530017A553 /* pub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pub.h; sourceTree = "<group>"; };
+		93E73823278BD7540017A553 /* SingleFootAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleFootAction.h; sourceTree = "<group>"; };
+		93E73824278BD7540017A553 /* SingleFootAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleFootAction.cpp; sourceTree = "<group>"; };
+		93E73825278BD7540017A553 /* DanceFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceFoot.h; sourceTree = "<group>"; };
+		93E73826278BD7540017A553 /* Interaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Interaction.cpp; sourceTree = "<group>"; };
+		93E73827278BD7540017A553 /* BigFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigFoot.h; sourceTree = "<group>"; };
+		93E73828278BD7540017A553 /* MonsterH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MonsterH5.h; sourceTree = "<group>"; };
+		93E73829278BD7540017A553 /* Interaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interaction.h; sourceTree = "<group>"; };
+		93E7382A278BD7540017A553 /* testGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testGame.cpp; sourceTree = "<group>"; };
+		93E7382B278BD7540017A553 /* InertialTrajProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InertialTrajProcess.cpp; sourceTree = "<group>"; };
+		93E7382C278BD7540017A553 /* DanceGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceGame.cpp; sourceTree = "<group>"; };
+		93E7382D278BD7540017A553 /* publicMotion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = publicMotion.cpp; sourceTree = "<group>"; };
+		93E7382E278BD7540017A553 /* FootStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FootStep.cpp; sourceTree = "<group>"; };
+		93E7382F278BD7540017A553 /* Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Game.cpp; sourceTree = "<group>"; };
+		93E73830278BD7540017A553 /* DanceGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceGame.h; sourceTree = "<group>"; };
+		93E73831278BD7550017A553 /* publicMotion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = publicMotion.h; sourceTree = "<group>"; };
+		93E73832278BD7550017A553 /* RunGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunGame.h; sourceTree = "<group>"; };
 		95B64AB492CDBEAF031F8A66 /* Bulk_System.Configuration_0.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Bulk_System.Configuration_0.cpp; path = Classes/Native/Bulk_System.Configuration_0.cpp; sourceTree = SOURCE_ROOT; };
 		960391211D6CE46E003BF157 /* MediaToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaToolbox.framework; path = System/Library/Frameworks/MediaToolbox.framework; sourceTree = SDKROOT; };
 		960B4109946F46C61115CA8B /* Bulk_Assembly-CSharp_26.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "Bulk_Assembly-CSharp_26.cpp"; path = "Classes/Native/Bulk_Assembly-CSharp_26.cpp"; sourceTree = SOURCE_ROOT; };
@@ -1317,36 +1321,39 @@
 		93E62CE0276C86E9006975D1 /* shoes_sdk */ = {
 			isa = PBXGroup;
 			children = (
-				93E62CEA276C86E9006975D1 /* BigFoot.cpp */,
-				93E62CF3276C86E9006975D1 /* BigFoot.h */,
-				93E62CE2276C86E9006975D1 /* DanceFoot.cpp */,
-				93E62CEF276C86E9006975D1 /* DanceFoot.h */,
-				93E62CF7276C86E9006975D1 /* DanceGame.cpp */,
-				93E62CE7276C86E9006975D1 /* DanceGame.h */,
-				93E62CE4276C86E9006975D1 /* FootStep.cpp */,
-				93E62CF1276C86E9006975D1 /* FootStep.h */,
-				93E62CFE276C86E9006975D1 /* Game.cpp */,
-				93E62CF6276C86E9006975D1 /* Game.h */,
-				93E62CFC276C86E9006975D1 /* InertialTrajProcess.cpp */,
-				93E62CF5276C86E9006975D1 /* InertialTrajProcess.h */,
-				93E62CEB276C86E9006975D1 /* Interaction.cpp */,
-				93E62CED276C86E9006975D1 /* Interaction.h */,
-				93E62CF8276C86E9006975D1 /* jumpH5.cpp */,
-				93E62CFD276C86E9006975D1 /* jumpH5.h */,
-				93E62CE9276C86E9006975D1 /* MonsterH5.cpp */,
-				93E62CE1276C86E9006975D1 /* MonsterH5.h */,
-				93E62CFA276C86E9006975D1 /* OriginTraj.cpp */,
-				93E62CE8276C86E9006975D1 /* OriginTraj.h */,
-				93E62CEE276C86E9006975D1 /* pub.h */,
-				93E62CF9276C86E9006975D1 /* ReadMe.txt */,
-				93E62CF4276C86E9006975D1 /* RuinsExplore.cpp */,
-				93E62CE6276C86E9006975D1 /* RuinsExplore.h */,
-				93E62CFB276C86E9006975D1 /* RunGame.cpp */,
-				93E62CE3276C86E9006975D1 /* RunGame.h */,
-				93E62CF2276C86E9006975D1 /* SingleFootAction.cpp */,
-				93E62CEC276C86E9006975D1 /* SingleFootAction.h */,
-				93E62CF0276C86E9006975D1 /* Tricycle.cpp */,
-				93E62CE5276C86E9006975D1 /* Tricycle.h */,
+				93E73816278BD7520017A553 /* BigFoot.cpp */,
+				93E73827278BD7540017A553 /* BigFoot.h */,
+				93E7381C278BD7530017A553 /* DanceFoot.cpp */,
+				93E73825278BD7540017A553 /* DanceFoot.h */,
+				93E7382C278BD7540017A553 /* DanceGame.cpp */,
+				93E73830278BD7540017A553 /* DanceGame.h */,
+				93E7382E278BD7540017A553 /* FootStep.cpp */,
+				93E7381F278BD7530017A553 /* FootStep.h */,
+				93E7382F278BD7540017A553 /* Game.cpp */,
+				93E7381A278BD7530017A553 /* Game.h */,
+				93E7382B278BD7540017A553 /* InertialTrajProcess.cpp */,
+				93E73815278BD7520017A553 /* InertialTrajProcess.h */,
+				93E73826278BD7540017A553 /* Interaction.cpp */,
+				93E73829278BD7540017A553 /* Interaction.h */,
+				93E73820278BD7530017A553 /* jumpH5.cpp */,
+				93E73812278BD7520017A553 /* jumpH5.h */,
+				93E7381E278BD7530017A553 /* MonsterH5.cpp */,
+				93E73828278BD7540017A553 /* MonsterH5.h */,
+				93E73817278BD7530017A553 /* OriginTraj.cpp */,
+				93E7381D278BD7530017A553 /* OriginTraj.h */,
+				93E73822278BD7530017A553 /* pub.h */,
+				93E7382D278BD7540017A553 /* publicMotion.cpp */,
+				93E73831278BD7550017A553 /* publicMotion.h */,
+				93E73818278BD7530017A553 /* RuinsExplore.cpp */,
+				93E73821278BD7530017A553 /* RuinsExplore.h */,
+				93E7381B278BD7530017A553 /* RunGame.cpp */,
+				93E73832278BD7550017A553 /* RunGame.h */,
+				93E73824278BD7540017A553 /* SingleFootAction.cpp */,
+				93E73823278BD7540017A553 /* SingleFootAction.h */,
+				93E7382A278BD7540017A553 /* testGame.cpp */,
+				93E73819278BD7530017A553 /* testGame.h */,
+				93E73813278BD7520017A553 /* Tricycle.cpp */,
+				93E73814278BD7520017A553 /* Tricycle.h */,
 			);
 			path = shoes_sdk;
 			sourceTree = "<group>";
@@ -1822,7 +1829,6 @@
 				93E62D7F276C86EA006975D1 /* gamepop_close_notes.png in Resources */,
 				93E62D71276C86EA006975D1 /* gamepop_rihtarrow@3x.png in Resources */,
 				93E62D7A276C86EA006975D1 /* gamepop_close.png in Resources */,
-				93E62D5F276C86EA006975D1 /* ReadMe.txt in Resources */,
 				93E62D78276C86EA006975D1 /* gamepop_determine_notes@3x.png in Resources */,
 				93E62D77276C86EA006975D1 /* gamepop_close_notes@2x.png in Resources */,
 				93E62D6D276C86EA006975D1 /* gamepop_rihgtarrow_notes.png in Resources */,
@@ -1863,13 +1869,13 @@
 			files = (
 				D82DCFC30E8000A5005D6AD8 /* main.mm in Sources */,
 				93BB27B32785A1820019B85C /* SocketRocketUtility.m in Sources */,
-				93E62D58276C86EA006975D1 /* BigFoot.cpp in Sources */,
 				8A793A081ED43EE100B44EF1 /* UnityViewControllerBase+iOS.mm in Sources */,
-				93E62D5C276C86EA006975D1 /* RuinsExplore.cpp in Sources */,
+				93E73842278BD7550017A553 /* Game.cpp in Sources */,
 				93E62D46276C86EA006975D1 /* NoDeviceTip.m in Sources */,
 				D8A1C7280E80637F000160D3 /* RegisterMonoModules.cpp in Sources */,
 				8AA568AE1827DD79004969C7 /* WWWConnection.mm in Sources */,
 				56DBF99D15E3CDC9007A4A8D /* iPhone_Sensors.mm in Sources */,
+				93E73839278BD7550017A553 /* MonsterH5.cpp in Sources */,
 				8A3EDDC81615B7C1001839E9 /* SplashScreen.mm in Sources */,
 				8AC71EC419E7FBA90027502F /* OrientationSupport.mm in Sources */,
 				8A7939FD1ED2F53200B44EF1 /* UnityViewControllerBase.mm in Sources */,
@@ -1894,7 +1900,6 @@
 				8A851BA716FB2F6D00E911DB /* UnityView.mm in Sources */,
 				8A851BAA16FB3AD000E911DB /* UnityAppController.mm in Sources */,
 				4E090A341F27885B0077B28D /* StoreReview.m in Sources */,
-				93E62D62276C86EA006975D1 /* InertialTrajProcess.cpp in Sources */,
 				8AC74A9519B47FEF00019D38 /* AVCapture.mm in Sources */,
 				8A793A091ED43EE100B44EF1 /* UnityViewControllerBase+tvOS.mm in Sources */,
 				8A6720A519EEB905006C92E0 /* InternalProfiler.cpp in Sources */,
@@ -1909,6 +1914,7 @@
 				FC0B20A21B7A4F0B00FDFC55 /* OnDemandResources.mm in Sources */,
 				AAC3E38D1A68945900F6174A /* RegisterFeatures.cpp in Sources */,
 				84DC28F61C5137FE00BC67D7 /* UnityReplayKit.mm in Sources */,
+				93E73840278BD7550017A553 /* publicMotion.cpp in Sources */,
 				8ACB801C177081D4005D0019 /* DeviceSettings.mm in Sources */,
 				03F528631B447098000F4FB8 /* Il2CppOptions.cpp in Sources */,
 				169C410B819896B35706FD80 /* Bulk_Assembly-CSharp_0.cpp in Sources */,
@@ -1920,7 +1926,6 @@
 				6DFD4700A579076D5CB6022C /* Bulk_Assembly-CSharp_14.cpp in Sources */,
 				178C4596978EE888292D24D1 /* Bulk_Assembly-CSharp_15.cpp in Sources */,
 				246546E39D1D2072A6FB18DF /* Bulk_Assembly-CSharp_16.cpp in Sources */,
-				93E62D59276C86EA006975D1 /* Interaction.cpp in Sources */,
 				540F46438D46FE7EBEE4E7FE /* Bulk_Assembly-CSharp_17.cpp in Sources */,
 				E6774B9F81AF8AD2F0596F13 /* Bulk_Assembly-CSharp_18.cpp in Sources */,
 				93E62D47276C86EA006975D1 /* AnimationView.m in Sources */,
@@ -1937,10 +1942,9 @@
 				F15F48EF858EB1475CABEF98 /* Bulk_Assembly-CSharp_27.cpp in Sources */,
 				2E364CEA8B2AC9B3591A2611 /* Bulk_Assembly-CSharp_28.cpp in Sources */,
 				AD4D455099260BDF99C8CC64 /* Bulk_Assembly-CSharp_29.cpp in Sources */,
-				93E62D61276C86EA006975D1 /* RunGame.cpp in Sources */,
-				93E62D5B276C86EA006975D1 /* SingleFootAction.cpp in Sources */,
 				3CF14C29850A3CADEA797798 /* Bulk_Assembly-CSharp_3.cpp in Sources */,
 				A8DB4058BE9E9866E2EDE434 /* Bulk_Assembly-CSharp_30.cpp in Sources */,
+				93E73837278BD7550017A553 /* RunGame.cpp in Sources */,
 				E8514F76B39185056DFB8CED /* Bulk_Assembly-CSharp_31.cpp in Sources */,
 				35A6444A86ED9647935C23E7 /* Bulk_Assembly-CSharp_32.cpp in Sources */,
 				770B453D969823D47BB15C81 /* Bulk_Assembly-CSharp_33.cpp in Sources */,
@@ -1969,23 +1973,26 @@
 				B3CD4F94BF4442AD074ECE9F /* Bulk_Generics_4.cpp in Sources */,
 				495748EC983281593F517794 /* Bulk_Generics_5.cpp in Sources */,
 				F72B4B10A6578992F78BA72E /* Bulk_Generics_6.cpp in Sources */,
+				93E7383D278BD7550017A553 /* testGame.cpp in Sources */,
 				EF584120851EDABACAF8D9E8 /* Bulk_Generics_7.cpp in Sources */,
 				9A1E470CACE03E0FA9B45072 /* Bulk_Generics_8.cpp in Sources */,
 				380D459AACB96E761B2AEDFA /* Bulk_Generics_9.cpp in Sources */,
 				14A94AB68B0FEEE0EFA6580E /* Bulk_ICSharpCode.SharpZipLib_0.cpp in Sources */,
 				F78E4329A5C74ADC5B6971E9 /* Bulk_Mono.Security_0.cpp in Sources */,
-				93E62D63276C86EA006975D1 /* Game.cpp in Sources */,
+				93E7383F278BD7550017A553 /* DanceGame.cpp in Sources */,
 				27614425928C859433F29E60 /* Bulk_Mono.Security_1.cpp in Sources */,
 				93E62D4C276C86EA006975D1 /* MBProgressHUD.m in Sources */,
 				66FB4080A01F5F7296EC11B7 /* Bulk_System.Configuration_0.cpp in Sources */,
 				7D6942E587F2C255A47BE0A1 /* Bulk_System.Core_0.cpp in Sources */,
 				E3EF4D2B9B00DD652E93835A /* Bulk_System.Xml_0.cpp in Sources */,
+				93E73838278BD7550017A553 /* DanceFoot.cpp in Sources */,
 				E9D9473697BC1686F2B90939 /* Bulk_System.Xml_1.cpp in Sources */,
 				6EED446484F9D65060508AFD /* Bulk_System.Xml_2.cpp in Sources */,
 				2B4347589D611F4E1C536704 /* Bulk_System.Xml_3.cpp in Sources */,
 				195A4D34A02272D271A01FDD /* Bulk_System.Xml_4.cpp in Sources */,
 				E5F447B2A14FBF5A80441044 /* Bulk_System.Xml_5.cpp in Sources */,
 				BF9E45B98E13B472FBE8F29B /* Bulk_System.Xml_6.cpp in Sources */,
+				93E73834278BD7550017A553 /* BigFoot.cpp in Sources */,
 				13ED4282B2B2FE71284E8906 /* Bulk_System_0.cpp in Sources */,
 				93E62D50276C86EA006975D1 /* AFHTTPSessionManager.m in Sources */,
 				BA1D43F3930E8B6B3CCE9E89 /* Bulk_System_1.cpp in Sources */,
@@ -2016,6 +2023,7 @@
 				8B42419BB7F487494E366C64 /* Bulk_UnityEngine.ScreenCaptureModule_0.cpp in Sources */,
 				827E4A5492F67BC5EFAA0F81 /* Bulk_UnityEngine.SharedInternalsModule_0.cpp in Sources */,
 				93E62D4B276C86EA006975D1 /* UserFriendsModel.m in Sources */,
+				93E7383C278BD7550017A553 /* Interaction.cpp in Sources */,
 				30294FE0B90F66FB77A550D8 /* Bulk_UnityEngine.TerrainModule_0.cpp in Sources */,
 				E26F4903AF7E80A14835352C /* Bulk_UnityEngine.TextRenderingModule_0.cpp in Sources */,
 				E0984461AEE955AD1EC4A06A /* Bulk_UnityEngine.TilemapModule_0.cpp in Sources */,
@@ -2026,6 +2034,7 @@
 				0C72474F817EA3F2211EA45E /* Bulk_UnityEngine.UnityWebRequestWWWModule_0.cpp in Sources */,
 				07FE445DB074A34243450DBF /* Bulk_UnityEngine.VRModule_0.cpp in Sources */,
 				93E62D45276C86EA006975D1 /* SearchDeviceViewController.m in Sources */,
+				93E73836278BD7550017A553 /* RuinsExplore.cpp in Sources */,
 				11C44273A281EF373A8C21D3 /* Bulk_UnityEngine.VideoModule_0.cpp in Sources */,
 				F4704B3CB17E8AF955F09FD9 /* Bulk_UnityEngine_0.cpp in Sources */,
 				04B24C4CA345E2E1A149BEAA /* Bulk_UnityScript.Lang_0.cpp in Sources */,
@@ -2037,18 +2046,18 @@
 				93E62D4F276C86EA006975D1 /* AFURLResponseSerialization.m in Sources */,
 				3724408CAF1DFFED8AE6D2AC /* Bulk_mscorlib_12.cpp in Sources */,
 				6CA14F0783BC9B9A938CD8E7 /* Bulk_mscorlib_2.cpp in Sources */,
-				93E62D55276C86EA006975D1 /* DanceFoot.cpp in Sources */,
 				B99045998C728022F3DC6224 /* Bulk_mscorlib_3.cpp in Sources */,
 				25DE4B40997AB1A380D883C8 /* Bulk_mscorlib_4.cpp in Sources */,
+				93E7383E278BD7550017A553 /* InertialTrajProcess.cpp in Sources */,
 				C3B3441AA2C159513394E23C /* Bulk_mscorlib_5.cpp in Sources */,
 				A9584B99BE22FFFCB8EAA952 /* Bulk_mscorlib_6.cpp in Sources */,
+				93E73833278BD7550017A553 /* Tricycle.cpp in Sources */,
 				93E62D40276C86EA006975D1 /* ShoesCarouselView.m in Sources */,
-				93E62D5A276C86EA006975D1 /* Tricycle.cpp in Sources */,
 				A41F4792B0DCF15A985E1D7D /* Bulk_mscorlib_7.cpp in Sources */,
 				11824BF290A3C07A47C935D0 /* Bulk_mscorlib_8.cpp in Sources */,
 				769F4648B1838D4083F4F8F3 /* Bulk_mscorlib_9.cpp in Sources */,
+				93E7383B278BD7550017A553 /* SingleFootAction.cpp in Sources */,
 				138B4D25AECD91543A86C013 /* GenericMethods0.cpp in Sources */,
-				93E62D57276C86EA006975D1 /* MonsterH5.cpp in Sources */,
 				545449EC93130AD51C57AEAF /* GenericMethods1.cpp in Sources */,
 				02E843FFBD60651D81A74E31 /* GenericMethods2.cpp in Sources */,
 				FC2C471595DDBE44A49D11FE /* GenericMethods3.cpp in Sources */,
@@ -2064,6 +2073,7 @@
 				93E62D53276C86EA006975D1 /* AFNetworkReachabilityManager.m in Sources */,
 				9F1F4359AA28FABBFC51B415 /* Il2CppCompilerCalculateTypeValues_13Table.cpp in Sources */,
 				275C4051BEF6CE0362A310B7 /* Il2CppCompilerCalculateTypeValues_14Table.cpp in Sources */,
+				93E73841278BD7550017A553 /* FootStep.cpp in Sources */,
 				AD9D46C9B285A5ABC3708AC3 /* Il2CppCompilerCalculateTypeValues_15Table.cpp in Sources */,
 				FA8D41FCBBB52B8D5540BDB7 /* Il2CppCompilerCalculateTypeValues_16Table.cpp in Sources */,
 				1BA2482D908726733F0A3042 /* Il2CppCompilerCalculateTypeValues_17Table.cpp in Sources */,
@@ -2071,7 +2081,6 @@
 				E9F2496795478643FA78487E /* Il2CppCompilerCalculateTypeValues_19Table.cpp in Sources */,
 				F88040AE9876841FC2092B16 /* Il2CppCompilerCalculateTypeValues_1Table.cpp in Sources */,
 				0AC44F1A85A70D754260E1B4 /* Il2CppCompilerCalculateTypeValues_20Table.cpp in Sources */,
-				93E62D60276C86EA006975D1 /* OriginTraj.cpp in Sources */,
 				0B024BA38B424C79B2CF8728 /* Il2CppCompilerCalculateTypeValues_21Table.cpp in Sources */,
 				B8EC4C57909185238EE8C6A1 /* Il2CppCompilerCalculateTypeValues_22Table.cpp in Sources */,
 				0D6A4CDEA4CDDAD7E91CC81B /* Il2CppCompilerCalculateTypeValues_23Table.cpp in Sources */,
@@ -2090,7 +2099,6 @@
 				BEAC42DFADA22C77344715C7 /* Il2CppCompilerCalculateTypeValues_32Table.cpp in Sources */,
 				E8D84F78AB0675CB1927C4DD /* Il2CppCompilerCalculateTypeValues_33Table.cpp in Sources */,
 				98E94869AB5DC14917A25D25 /* Il2CppCompilerCalculateTypeValues_34Table.cpp in Sources */,
-				93E62D5D276C86EA006975D1 /* DanceGame.cpp in Sources */,
 				E5F94B028659A4C3E6FD321E /* Il2CppCompilerCalculateTypeValues_35Table.cpp in Sources */,
 				69B24D84AC2C84FC87364B04 /* Il2CppCompilerCalculateTypeValues_36Table.cpp in Sources */,
 				B2FB4AC0804761BA32297F42 /* Il2CppCompilerCalculateTypeValues_37Table.cpp in Sources */,
@@ -2119,9 +2127,9 @@
 				BB0543AAB7F743460A340525 /* Il2CppCompilerCalculateTypeValues_7Table.cpp in Sources */,
 				3B6A42728BBA820CA7662220 /* Il2CppCompilerCalculateTypeValues_8Table.cpp in Sources */,
 				1181422791D23E5B1A13298A /* Il2CppCompilerCalculateTypeValues_9Table.cpp in Sources */,
+				93E7383A278BD7550017A553 /* jumpH5.cpp in Sources */,
 				6A394CCBA3BD2AAE54EE16A5 /* Il2CppGenericClassTable.cpp in Sources */,
 				194B4FD28A0F1AE3078322FE /* Il2CppGenericComDefinitions0.cpp in Sources */,
-				93E62D56276C86EA006975D1 /* FootStep.cpp in Sources */,
 				C13C4803975A58AFCAAB4B05 /* Il2CppGenericInstDefinitions.cpp in Sources */,
 				95C14FE9BED3975E713BA10E /* Il2CppGenericMethodDefinitions.cpp in Sources */,
 				A2724B60B98781511E2CE5B8 /* Il2CppGenericMethodPointerTable.cpp in Sources */,
@@ -2133,7 +2141,7 @@
 				EB244CC8A5A14504533B8B8D /* Il2CppMetadataRegistration.cpp in Sources */,
 				8CBD47E49638FD0CF890B3BC /* Il2CppMetadataUsage.cpp in Sources */,
 				EA3A4B1F90828D7E1D058556 /* Il2CppMethodPointerTable.cpp in Sources */,
-				93E62D5E276C86EA006975D1 /* jumpH5.cpp in Sources */,
+				93E73835278BD7550017A553 /* OriginTraj.cpp in Sources */,
 				E18A461783D85B8951E85F9F /* Il2CppReversePInvokeWrapperTable.cpp in Sources */,
 				8B534B3E836CF26E0EE4099D /* Il2CppTypeDefinitions.cpp in Sources */,
 				93E62D95276C86EA006975D1 /* GameObjc.mm in Sources */,

BIN
DanceGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate


BIN
RunGame/.DS_Store


+ 1 - 1
RunGame/MainApp/main.mm

@@ -5,7 +5,7 @@ UnityFramework* UnityFrameworkLoad()
     NSString* bundlePath = nil;
     bundlePath = [[NSBundle mainBundle] bundlePath];
     bundlePath = [bundlePath stringByAppendingString: @"/Frameworks/UnityFramework.framework"];
-
+    NSLog(@"bundlePath = %@",bundlePath);
     NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
     if ([bundle isLoaded] == false) [bundle load];
 

BIN
RunGame/SDK/.DS_Store


+ 2 - 0
RunGame/SDK/BLE/BTDataProcess.h

@@ -28,6 +28,8 @@ typedef NS_ENUM(NSInteger, BLETOOTH_STUTAS){
 };
 
 @interface BTDataProcess : UIViewController
+
+@property(assign,nonatomic)int nativeAttX;
     
 //单例->初始化蓝牙
 +(instancetype)sharedInstance;

+ 68 - 43
RunGame/SDK/BLE/BTDataProcess.mm

@@ -77,6 +77,9 @@ static BTDataProcess* instance = nil;
     }
     NSString * urlString = [url absoluteString];
     NSArray * stringArr = [urlString componentsSeparatedByString:@"//"];
+    if (stringArr == nil || stringArr.count<2){
+        return;
+    }
     NSString * arr2 = stringArr[1];
     NSString* finsalString = [arr2 stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
     NSDictionary * urlDict = [AlgorithmTool dictionaryWithJsonString:finsalString];
@@ -85,19 +88,17 @@ static BTDataProcess* instance = nil;
     [IOS_NSUSERDEFAULT setObject:urlDict forKey:IOSSDK_USERINFO];
     [IOS_NSUSERDEFAULT synchronize];
   
-    if (urlDict!=nil){
-        //主副设备:deviceType  游戏种类:game_type  mac地址:macAddress
-        self.deviceType = DEVICETYPE_MAIN;
-        if ([urlDict objectForKey:@"game_type"]!=nil){
-            NSString * game_type = urlDict[@"game_type"];
-            self.game_type = (GAME_TYPE)[game_type intValue];
-        }
-        if ([urlDict objectForKey:@"mac"]!=nil){
-            self.macAddress = [urlDict objectForKey:@"mac"];
-        }
-        //链接蓝牙
-        [self initCBCentralManager];
+    if ([urlDict isKindOfClass:[NSNull class]] || urlDict == nil || [urlDict isEqual:[NSNull null]]){
+        [PopupView showCusHUDA:@"获取用户信息失败,请从趣动启动"];
+        return;
     }
+    //主副设备:deviceType  游戏种类:game_type  mac地址:macAddress
+    self.deviceType = DEVICETYPE_MAIN;
+    NSString * game_type = [MYFactoryManager getGameType];
+    self.game_type = (GAME_TYPE)[game_type intValue];
+    self.macAddress = [MYFactoryManager getGameMac];
+    //链接蓝牙
+    [self initCBCentralManager];
     
 }
 
@@ -107,8 +108,7 @@ static BTDataProcess* instance = nil;
     /***************************初始化蓝牙数据处理工具***************************/
     //主副设备:deviceType  游戏种类:game_type  mac地址:macAddress
     self.deviceType = (DEVICE_TYPE)type;
-    NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
-    NSString * game_type = jsonDict[@"game_type"];
+    NSString * game_type = [MYFactoryManager getGameType];
     self.game_type = (GAME_TYPE)[game_type intValue];
     self.macAddress = @"";
     //初始化蓝牙CBCentralManager
@@ -221,6 +221,10 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     NSUserDefaults* userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.Oujia.AppAndGame"];
     //趣动传过来的 invite json字符串转字典
     NSString * string = [userDefault objectForKey:@"invite"];
+    if (string == nil) {
+        [PopupView showCusHUDA:@"邀请参数为空"];
+        return;
+    }
     NSData * data = [string dataUsingEncoding:NSUTF8StringEncoding];
     NSDictionary * inviteDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
     if (inviteDict!=nil){
@@ -363,7 +367,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     
 }
 
-#pragma mark ===============================================>> 链接蓝牙设备公用方法  可外部操作
+#pragma mark ===============================================>> public 链接蓝牙
 //app跳转或选中tableview 链接蓝牙
 -(void)connectPeripheral:(CBPeripheral*)peripheral{
     
@@ -545,7 +549,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
 
 -(void)analysisCharacteristic:(NSData*)characteristic deviceType:(DEVICE_TYPE)deviceType{
         
-//        NSLog(@"接收到的数据data = %@",characteristic);
+//    NSLog(@"接收到的数据data = %@",characteristic);
     int frameHead = [AlgorithmTool dataToChar:[characteristic subdataWithRange:NSMakeRange(0, 1)]];//帧头数据aa
     int messageLength = [AlgorithmTool dataToChar:[characteristic subdataWithRange:NSMakeRange(1, 1)]];//报文长度
     int messageLengthNegation = ~messageLength;//报文长度取反
@@ -628,7 +632,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
                    
                }else if (deviceType==DEVICETYPE_VICE){//副设备动作数据
                    //调取鞋子SDK
-                   [self viceShoseSDKRight_pos:right_pos Right_att:right_att Right_acc:righr_acc LeftPos:left_pos Left_att:left_att Left_acc:left_acc ts:ts rightZupt:rightZupt leftZupt:leftZupt jump:jump down:down rssi:rssi girlShoes:girlShoes right_press:right_press left_press:left_press characteristic:characteristic];
+//                   [self viceShoseSDKRight_pos:right_pos Right_att:right_att Right_acc:righr_acc LeftPos:left_pos Left_att:left_att Left_acc:left_acc ts:ts rightZupt:rightZupt leftZupt:leftZupt jump:jump down:down rssi:rssi girlShoes:girlShoes right_press:right_press left_press:left_press characteristic:characteristic];
                }
               
         }else if (dataType == -95 && characteristic.length == 26){//获取的是查询的数据 char-->int a1 = -95
@@ -678,22 +682,16 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     
     /********************初始化 运动轨迹算法 SDK *****************/
     //游戏数据
+//    NSLog(@"characteristic = %@",characteristic);
     NSData * validData= [characteristic subdataWithRange:NSMakeRange(4, characteristic.length-4)];
+//    NSLog(@"validData = %@",validData);
     Byte * buff = (Byte*)[validData bytes];
     game->GameProcessBuf(buff, (int)validData.length);
     
     int length = 4;
     int result[length];
     game->getGameResult(result);
-    //   NSLog(@"result == %d %d %d %d \n",result[0],result[1],result[2],result[3]);
-
-    /******************步频数据处理 + 回调*****************/
-    int leftStepStatus =  game->getStepStatus(LEFT_FOOT);
-    int leftStepFreq =  game->getStepFreq(LEFT_FOOT);
-    int leftStepCount =  game->getStepCount(LEFT_FOOT);
-    int rightStepStatus =  game->getStepStatus(RIGHT_FOOT);
-    int rightStepFreq =  game->getStepFreq(RIGHT_FOOT);
-    int rightStepCount =  game->getStepCount(RIGHT_FOOT);
+//   NSLog(@"result == %d %d %d %d \n",result[0],result[1],result[2],result[3]);
         
     /******************左右脚动作数据处理 + 回调*****************/
     int motionLeft = result[0];//左脚的动作
@@ -717,9 +715,24 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
         }
 //    }
     
+    /******************步频数据处理 + 回调*****************/
+    int leftStepStatus =  game->getStepStatus(LEFT_FOOT);
+    int leftStepFreq =  game->getStepFreq(LEFT_FOOT);
+    int leftStepCount =  game->getStepCount(LEFT_FOOT);
+    int rightStepStatus =  game->getStepStatus(RIGHT_FOOT);
+    int rightStepFreq =  game->getStepFreq(RIGHT_FOOT);
+    int rightStepCount =  game->getStepCount(RIGHT_FOOT);
+    
+    /******************玩家当前朝向*****************/
+    int attLength = 3;
+    int left[attLength];
+    int right[attLength];
+     game->getFootAtt(left, right);
+    self.nativeAttX = left[0];
+    NSLog(@"self.nativeAttX = %d",self.nativeAttX);
+    
     /****************** ios call unity*****************/
         if (self.gameModel==YES){//当前是游戏模式
-
             //跑酷需要回调步频
             if (self.game_type == GAME_TYPE_RUN){
                 [self.sdk bridgingStepAction:DEVICETYPE_MAIN leftStatus:leftStepStatus rightStatus:rightStepStatus leftFrag:leftStepFreq rightFrag:rightStepFreq];
@@ -729,17 +742,17 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
 
         }else{//当前是交互模式
 
-            int interaction = game->getInteractionCMD();
-//            NSLog(@"主设备 当前的脚步交互动作 ===== >> %d",interaction);
-            //游戏交互
-            [self.sdk bridgingInteraction:DEVICETYPE_MAIN code:interaction];
-            //自定义弹窗界面交互
-            if (interaction!=-1){
-                NSLog(@"BTDataProcess 有效交互动作 ===>> %d",interaction);
-//                [self.searchDeviceVC getInteraction:interaction];
-            }else{
-    //            NSLog(@"BTDataProcess 无效交互动作 ===>> %@",@"原地");
-            }
+//            int interaction = game->getInteractionCMD();
+////            NSLog(@"主设备 当前的脚步交互动作 ===== >> %d",interaction);
+//            //游戏交互
+//            [self.sdk bridgingInteraction:DEVICETYPE_MAIN code:interaction];
+//            //自定义弹窗界面交互
+//            if (interaction!=-1){
+//                NSLog(@"BTDataProcess 有效交互动作 ===>> %d",interaction);
+////                [self.searchDeviceVC getInteraction:interaction];
+//            }else{
+//    //            NSLog(@"BTDataProcess 无效交互动作 ===>> %@",@"原地");
+//            }
         }
     
     /******************数据回调缓存*****************/
@@ -761,6 +774,11 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     
     /********************剑波 & 威严 要的图表数据 *****************/
     NSString * aString = [NSString stringWithUTF8String:game->getGameDataStr().c_str()];
+    if (aString.length <1){
+        return;
+    }
+//    NSLog(@"aString == %@",aString);
+
     //上传即使动作数据
     [[SocketRocketUtility sharedInstance] sendData:nil withRequestURI:aString];
     if (DebugViewInstance.RSSI==nil){
@@ -773,15 +791,21 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     }
     
     /********************调试窗数据 *****************/
-    NSArray *aArray = [DebugViewInstance.tempStepString componentsSeparatedByString:@","];
+    NSArray *aArray = [aString componentsSeparatedByString:@","];
+    if (aArray == nil || [aArray isKindOfClass:[NSNull class]] || aArray.count<30){
+        return;
+    }
+//    NSLog(@"aArray == %@",aArray);
 //    dispatch_async(dispatch_get_main_queue(), ^{
         if (DebugViewInstance.testLabel!=nil){
-            DebugViewInstance.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%d %@] ts:%d \n脚步: %@ %@\n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,rssi,DebugViewInstance.RSSI,ts,aArray[aArray.count-2],aArray.lastObject,leftStepFreq,rightStepFreq];
+            DebugViewInstance.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%@ %@] ts:%@ \n脚步: %@ %@\n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,DebugViewInstance.RSSI,aArray[26],aArray[27],aArray[28],aArray[29],rightStepFreq,leftStepFreq];
         }
 //    });
     
     /********************颖嘉+的ts丢包数据 *****************/
-    NSString * tsString =  aArray[aArray.count-4];
+    NSString * tsString =  aArray[27];
+//    NSLog(@"tsString == %@",tsString);
+
     int tsInt = [tsString  intValue];
     int total;
     if (DebugViewInstance.currentTS != 1000){//颖嘉初始值未知 ios初始值==1000
@@ -791,7 +815,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
         }
         //255...1
         if (tsInt < DebugViewInstance.currentTS){
-            if (tsInt ==0) {
+            if (tsInt ==0){
                 total = (255-DebugViewInstance.currentTS) + tsInt + 1 - 1;
             }else{
                 total = (255-DebugViewInstance.currentTS) + tsInt - 1;
@@ -874,7 +898,6 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
         //ios call unity
         [self.sdk bridgingMotionAction:DEVICETYPE_VICE left:motionLeft right:motionRight];//副设备左右脚动作
 
-
 }
 
 #pragma mark ===============================================>> 懒加载 -- 蓝牙设备数据源
@@ -902,6 +925,8 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     [IOS_NSUSERDEFAULT setObject:dict forKey:IOSSDK_BLESDKDATA];
     [IOS_NSUSERDEFAULT synchronize];
     
+   
+    
 }
 
 @end

+ 1 - 1
RunGame/SDK/BLE/DebugView.m

@@ -72,7 +72,7 @@ static DebugView* instance = nil;
     self.testLabel.textColor = [UIColor redColor];
     self.testLabel.font = [UIFont boldSystemFontOfSize:SCALEoefficient(14)];
     self.testLabel.backgroundColor = [UIColor clearColor];
-    self.testLabel.textAlignment = NSTextAlignmentCenter;
+    self.testLabel.textAlignment = NSTextAlignmentLeft;
     self.testLabel.numberOfLines = 0;
 
     if ([UIApplication sharedApplication].keyWindow != nil){

+ 0 - 19
RunGame/SDK/Entity /UserFriendsModel.h

@@ -25,25 +25,6 @@
 
 @interface RankModel : NSObject
 
-//               "id":70,
-//               "rank_id":5,
-//               "game_id":3,
-//               "user_id":144,
-//               "score":8924,
-//               "duration":349,
-//               "consume":0,
-//               "finish_at":"2021-09-06 09:54:09",
-//               "rate_begin":"2021-09-01",
-//               "rate_end":"2021-09-30",
-//               "user_name":"用户不存在",
-//               "user_avatar":"http://static.ouj.com/shoes/test/avatar/avatar_144_791469ce78a423b24a65e06921a1777a.jpg",
-//               "user_level":3,
-//               "user_gender":1,
-//               "user_age":null,
-//               "achievements":Array[13],
-//               "achievements_show":Array[4],
-//               "position":1
-
 @property (nonatomic, assign) int trans_id;
 @property (nonatomic, assign) int rank_id;
 @property (nonatomic, assign) int game_id;

+ 29 - 33
RunGame/SDK/HTTP/HTTPDataProcession.m

@@ -143,12 +143,10 @@
 
 #pragma mark --------- request
 +(void)getFriendsList:(UserFriendsDataBlock)userFriendsDataBlock{
-
-    NSLog(@"gameFriends token ===>> %@ ",IOSSDK_TOKEN);
     
     NSString *urlString =  [NSString stringWithFormat:@"%@&limit=%@&v=%@&os=%@",GAME_FRIENDS,@"1000",CFBundleVersion,OS];
 
-    [HTTPDataProcession getHTTPDataProcession:urlString token:IOSSDK_TOKEN  success:^(id data){
+    [HTTPDataProcession getHTTPDataProcession:urlString token:[MYFactoryManager getToken]  success:^(id data){
             // 网络访问成功
 //            NSLog(@"data=%@",[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
             NSError * error;
@@ -156,7 +154,7 @@
         
 //                NSLog(@"gameFriends dictionary === %@ ",dictionary);
 
-            if (!error){
+            if (!error && dictionary!=nil &&![dictionary isKindOfClass:[NSNull class]]){
                 
                 int code = [dictionary[@"code"] intValue];
 
@@ -164,6 +162,9 @@
                     
                     NSDictionary * dict = dictionary[@"data"];
                     NSArray * arr = dict[@"list"];
+                    if (arr == nil || [arr isKindOfClass:[NSNull class]]) {
+                        return;
+                    }
                     
                     NSMutableArray * userArr = [NSMutableArray new];//存储数据
 
@@ -212,27 +213,21 @@
     
 }
 
-
 + (void)inviteFriends:(int)friendid info:(char*)info inviteDataBlock:(InviteDataBlock)inviteDataBlock{
     
-    NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
-
-    NSString * token = [jsonDict objectForKey:@"token"];
     NSString * invite_user_id = [NSString stringWithFormat:@"%d",friendid];
     NSString * invite = [NSString stringWithFormat:@"%s",info];
-    NSString * game_id = jsonDict[@"game_id"];
-    NSLog(@"InviteFriend ===>> token:%@  friendid:%d  info:%s",token,friendid,info);
-    
-    NSString *urlString = [NSString stringWithFormat:@"%@&invite_user_id=%@&invite=%@&game_id=%@",GAME_INVITE,invite_user_id,invite,game_id];
+    NSString *urlString = [NSString stringWithFormat:@"%@&invite_user_id=%@&invite=%@&game_id=%@",GAME_INVITE,invite_user_id,invite,[MYFactoryManager getGameId]];
+    //    NSLog(@"InviteFriend ===>> token:%@  friendid:%d  info:%s",token,friendid,info);
     NSLog(@"InviteFriend urlString ===>> %@",urlString);
 
-    [HTTPDataProcession getHTTPDataProcession:urlString token:token  success:^(id data){
+    [HTTPDataProcession getHTTPDataProcession:urlString token:[MYFactoryManager getToken]  success:^(id data){
         
             NSError * error;
             NSDictionary *dictionary =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
 //                NSLog(@"gameFriends dictionary === %@ ",dictionary);
 
-            if (!error){
+        if (!error && dictionary!=nil &&![dictionary isKindOfClass:[NSNull class]]){
                 
                 int code = [dictionary[@"code"] intValue];
 
@@ -259,18 +254,18 @@
         scoreType = @"friend";
     }
     
-    NSString *urlString = [NSString stringWithFormat:@"%@&game_id=%@&scope=%@",GAME_RANK,IOSSDK_GAMEID,scoreType];
+    NSString *urlString = [NSString stringWithFormat:@"%@&game_id=%@&scope=%@",GAME_RANK,[MYFactoryManager getGameId],scoreType];
 
     NSLog(@"urlString == %@",urlString);
     
-    [HTTPDataProcession getHTTPDataProcession:urlString token:IOSSDK_TOKEN  success:^(id data){
+    [HTTPDataProcession getHTTPDataProcession:urlString token:[MYFactoryManager getToken]  success:^(id data){
 
             NSError * error;
             NSDictionary *dictionary =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
         
 //            NSLog(@"GetRank dictionary === %@ ",dictionary);
         
-            if (!error){
+        if (!error && dictionary!=nil &&![dictionary isKindOfClass:[NSNull class]]){
 
                 int code = [dictionary[@"code"] intValue];
 
@@ -286,7 +281,9 @@
                             
                             NSDictionary * dict = dictionary[@"data"];
                             NSArray * arr = dict[@"records"];
-                            
+                            if (arr == nil || [arr isKindOfClass:[NSNull class]]) {
+                                return;
+                            }
                             NSMutableArray * userArr = [NSMutableArray new];//存储数据
                             
                             NSMutableDictionary * list = [NSMutableDictionary new];
@@ -353,14 +350,14 @@
 */
 +(void)gameStart{
 
-    NSString *urlString = [NSString stringWithFormat:@"%@&id=%@",GAME_START,IOSSDK_GAMEID];
-    [HTTPDataProcession getHTTPDataProcession:urlString token:IOSSDK_TOKEN  success:^(id data){
+    NSString *urlString = [NSString stringWithFormat:@"%@&id=%@",GAME_START,[MYFactoryManager getGameId]];
+    [HTTPDataProcession getHTTPDataProcession:urlString token:[MYFactoryManager getToken]  success:^(id data){
         
             NSError * error;
             NSDictionary *dictionary =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
 //                NSLog(@"gameFriends dictionary === %@ ",dictionary);
 
-            if (!error){
+        if (!error && dictionary!=nil && ![dictionary isKindOfClass:[NSNull class]]){
                 
                 int code = [dictionary[@"code"] intValue];
 
@@ -387,14 +384,14 @@
 */
 +(void)gameEnd{
     
-    NSString *urlString = [NSString stringWithFormat:@"%@&id=%@",GAME_END,IOSSDK_GAMEID];
-    [HTTPDataProcession getHTTPDataProcession:urlString token:IOSSDK_TOKEN  success:^(id data){
+    NSString *urlString = [NSString stringWithFormat:@"%@&id=%@",GAME_END,[MYFactoryManager getGameId]];
+    [HTTPDataProcession getHTTPDataProcession:urlString token:[MYFactoryManager getToken]  success:^(id data){
         
             NSError * error;
             NSDictionary *dictionary =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
 //                NSLog(@"gameFriends dictionary === %@ ",dictionary);
 
-            if (!error){
+        if (!error && dictionary!=nil &&![dictionary isKindOfClass:[NSNull class]]){
                 
                 int code = [dictionary[@"code"] intValue];
 
@@ -423,8 +420,7 @@
     
     NSMutableDictionary * sportRecord = [NSMutableDictionary new];
     //缓存的token、game_id
-    NSString * token = IOSSDK_TOKEN;
-    NSString * game_id = IOSSDK_GAMEID;
+    NSString * game_id = [MYFactoryManager getGameId];
     [sportRecord setObject:game_id forKey:@"game_id"];//游戏类型
     //预留字段:默认
     [sportRecord setObject:@0 forKey:@"consume"];//卡路里默认0
@@ -459,21 +455,21 @@
     
     NSLog(@"%@",sportRecord);
 
-    [HTTPDataProcession postHTTPDataProcession:GAME_RECORD withParams:sportRecord  token:token success:^(id data){
-           
-        NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
+    [HTTPDataProcession postHTTPDataProcession:GAME_RECORD withParams:sportRecord  token:[MYFactoryManager getToken] success:^(id data){
+        NSError * error;
+        NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
 
-        if (dic!=nil){
+        if (!error && dictionary!=nil &&![dictionary isKindOfClass:[NSNull class]]){
 
-            int code = [dic[@"code"] intValue];
+            int code = [dictionary[@"code"] intValue];
 
             if (code==0){
                 
-                NSLog(@"GameEnd 上传成功 %@",dic);
+                NSLog(@"GameEnd 上传成功 %@",dictionary);
                 gameEndDataBlock(@"上传成功");
                 
         }else{
-                NSLog(@"请求错误 =========== >>> %@",dic[@"msg"]);
+                NSLog(@"请求错误 =========== >>> %@",dictionary[@"msg"]);
              }
             
         }

+ 7 - 0
RunGame/SDK/IOSPlatformSDK.h

@@ -179,3 +179,10 @@ void ShowInviteFriend(int code, char * info);
 extern "C" {
 void GetRank(int type);
 }
+
+/**
+* Unity call ios 获取鞋子角度
+*/
+extern "C" {
+int NativeGetAttX(int cusId);
+}

+ 27 - 37
RunGame/SDK/IOSPlatformSDK.mm

@@ -69,7 +69,7 @@ typedef void (* GetRankHandler)(int conde,const char * userJson);
 */
 typedef void (* RotateHandler)(int cusid,int right_pos[3],int left_pos[3],int right_att[3],int left_att[3],int righrAcc[3],int leftAcc[3]);
 
-//声明 静态指针变量的实例 在unity call ios时候将该指针存储在内存中,在需要ios call unity时,用该指针调用unity的函数接口
+#pragma mark ============================>> 声明 静态指针变量的实例 在unity call ios时候将该指针存储在内存中,在需要ios call unity时,用该指针调用unity的函数接口
 static ActionHandler actionHandler;
 static MotionHandler motionHandler;
 static StepHandler stepHandler;
@@ -79,11 +79,6 @@ static InviteFriendHandler inviteFriendHandler;
 static GetRankHandler getRankHandler;
 static RotateHandler rotateHandler;
 
-//
-#pragma mark ============================>> ios call unity C语言指针声明 结束
-
-@interface IOSPlatformSDK ()
-@end
 
 @implementation IOSPlatformSDK
 
@@ -120,8 +115,8 @@ static IOSPlatformSDK * instance;
 -(BOOL)existUserInfo{
     
     NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
-     if (jsonDict==nil){
-//         [PopupView showCusHUDA:@"请从趣动App启动"];
+     if ([jsonDict isKindOfClass:[NSNull class]] || jsonDict == nil || [jsonDict isEqual:[NSNull null]]){
+         [PopupView showCusHUDA:@"获取用户信息失败,请从趣动启动"];
          return NO;
      }else{
          return YES;
@@ -129,6 +124,7 @@ static IOSPlatformSDK * instance;
     
 }
 
+//
 #pragma mark ============================>> ios call unity (数据处理后的回调)
 -(void)bridgingMotionAction:(int)cusid
                        left:(int)left
@@ -156,7 +152,7 @@ static IOSPlatformSDK * instance;
 //        NSLog(@"deviceHandler ===>> %d %@ %@ %d %d",cusid,name,address,status,electricity);
     const char * charName =[name UTF8String];
     const char * charAddress =[address UTF8String];
-    if (deviceHandler != nil) {
+    if (deviceHandler != nil){
         deviceHandler(cusid,charName,charAddress,status,electricity);
     }
     
@@ -165,15 +161,17 @@ static IOSPlatformSDK * instance;
 -(void)bridgingInteraction:(int)cusid
                       code:(int)code{
     //传给unity ---> 旧版游戏未用到
-    if (actionHandler != nil) {
+    if (actionHandler != nil){
 //            actionHandler(cusid,code);
     }
 }
+
 -(void)bridgingInvite:(int)code
              userChar:(const char *)userChar
              infoChar:(const char *)infoChar{
         inviteFriendHandler(0,userChar,infoChar);
 }
+
 @end
 
 #pragma mark ============================>> unity call ios (声明unity call ios的托管函数 & 接收unity传过来的指针)
@@ -353,23 +351,15 @@ void GetUserFriends(){
 * unity获取用户信息 -->> 解析从Spotr App的传过来的RL_Seme  ios返回json数据给游戏
 */
  char *  GetUserInfoJson(){
+     
 //     NSLog(@"Unity 请求用户信息 GetUserInfoJson ===>>");
      if ([instance existUserInfo]==NO){
          return MakeStringCopy("");
      }else{
-         NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
-         NSDictionary * user = jsonDict[@"user"];
-         if (user!=nil){
-             NSData *jsonData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
-             NSString * userJsonString =  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-             const char * cuschart =[userJsonString UTF8String];
-             NSLog(@"IOS_SKD 回调用户信息 GetUserInfoJson ===> %@",userJsonString);
-             //要先copy 不然c#调用free的时候回闪退
-             return MakeStringCopy(cuschart);
-         }else{
-             return MakeStringCopy("");
-         }
-         
+         const char * cuschart = [[MYFactoryManager getUserInfo] UTF8String];
+         NSLog(@"IOS_SKD 回调用户信息 GetUserInfoJson ===> %@",[MYFactoryManager getUserInfo]);
+         //要先copy 不然c#调用free的时候回闪退
+         return MakeStringCopy(cuschart);
      }
      
 }
@@ -413,20 +403,12 @@ void GetInviteInfo(){
     if ([instance existUserInfo]==NO){
         return;
     }
-    NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
-    NSDictionary * invite = jsonDict[@"invite"];
-    if (invite!=nil){
-        //user字典 -> 字符串 -> Char
-        NSDictionary * user =  [invite objectForKey:@"user"];
-        NSData * userData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
-        NSString * userString =  [[NSString alloc] initWithData:userData encoding:NSUTF8StringEncoding];
-        const char * userChar =[userString UTF8String];
-        //info字符串 -> Char
-        NSString * info = invite[@"info"];
-        const char * infoChar =[info UTF8String];
-        NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %s , %s",userChar,infoChar);
-        inviteFriendHandler(0,userChar,infoChar);
-    }
+    //user字典 -> 字符串 -> Char
+    const char * userChar = [[MYFactoryManager getInviteUser] UTF8String];
+    //info字符串 -> Char
+    const char * infoChar =[[MYFactoryManager getInviteInfo] UTF8String];
+    NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %s , %s",userChar,infoChar);
+    inviteFriendHandler(0,userChar,infoChar);
     
 }
 
@@ -467,3 +449,11 @@ void GetRank(int type){
     }];
 
 }
+
+
+/**
+ * Unity call ios 获取鞋子角度
+*/
+int NativeGetAttX(int cusId){
+  return BTDataInstance.nativeAttX;
+}

+ 10 - 2
RunGame/SDK/Tool/MYFactoryManager.h

@@ -67,8 +67,7 @@
 //custom System UserDefaults
 #define IOS_NSUSERDEFAULT [NSUserDefaults standardUserDefaults]
 #define CUS_NOTIFICATIONCENTER [NSNotificationCenter defaultCenter]
-#define IOSSDK_TOKEN [[IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO] objectForKey:@"token"]
-#define IOSSDK_GAMEID [[IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO] objectForKey:@"game_type"]
+
 //#define IOSSDK_GAMEID @"3"
 //#define IOSSDK_TOKEN @"shoes:61652aa99523f9.65681365I94"
 
@@ -93,6 +92,15 @@
 +(void)postGroupCFNotificaiton:(NSString*)string;
 //开启后台任务保活
 -(void)comeToBackgroundMode;
+
++(NSString*)getUserInfo;
++(NSString*)getToken;
++(NSString*)getGameId;
++(NSString*)getGameType;
++(NSString*)getGameMac;
++(NSString*)getInviteUser;
++(NSString*)getInviteInfo;
+
 //#pragma mark -- 参数判断
 //+(BOOL)ifLoogIn:(BOOL)tip;
 //+(bool)internetStatus;

+ 96 - 0
RunGame/SDK/Tool/MYFactoryManager.m

@@ -130,6 +130,7 @@ static MYFactoryManager * instance;
 }
 
 -(void)applyForMoreTime{
+    
     //如果系统给的剩余时间小于60秒 就终止当前的后台任务,再重新初始化一个后台任务,重新让系统分配时间,这样一直循环下去,保持APP在后台一直处于active状态。
     if ([UIApplication sharedApplication].backgroundTimeRemaining < 30){
     [[UIApplication sharedApplication] endBackgroundTask:self.bgTask];
@@ -140,6 +141,101 @@ static MYFactoryManager * instance;
     }
 }
 
+//获取getUserInfo
++(NSString*)getUserInfo{
+    NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSDictionary * user = jsonDict[@"user"];
+    if ([user isKindOfClass:[NSNull class]] || user == nil || [user isEqual:[NSNull null]]){
+        return @"";
+    }else{
+        NSData *jsonData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
+        NSString * userJsonString =  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+        return userJsonString;
+    }
+    
+}
+
+//获取token
++(NSString*)getToken{
+    NSDictionary * urlDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSString * token =  [urlDict objectForKey:@"token"];
+    if ([token isKindOfClass:[NSNull class]] || token == nil || [token isEqual:[NSNull null]]){
+        [PopupView showCusHUDA:@"获取token失败,请从趣动启动"];
+        return @"";
+    }else{
+        return token;
+    }
+    
+}
+
+//获取缓存game_id
++(NSString*)getGameId{
+    NSDictionary * urlDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSString * game_id =  [urlDict objectForKey:@"game_id"];
+    if ([game_id isKindOfClass:[NSNull class]] || game_id == nil || [game_id isEqual:[NSNull null]]){
+         [PopupView showCusHUDA:@"获取id失败,请从趣动启动"];
+        return @"";
+    }else{
+        return game_id;
+    }
+}
+
+//获取缓存game_type
++(NSString*)getGameType{
+    NSDictionary * urlDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSString * game_type =  [urlDict objectForKey:@"game_type"];
+    if ([game_type isKindOfClass:[NSNull class]] || game_type == nil || [game_type isEqual:[NSNull null]]){
+         [PopupView showCusHUDA:@"获取type失败,请从趣动启动"];
+        return @"";
+    }else{
+        return game_type;
+    }
+}
+
+//获取缓存mac
++(NSString*)getGameMac{
+    NSDictionary * urlDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSString * mac =  [urlDict objectForKey:@"mac"];
+    if ([mac isKindOfClass:[NSNull class]] || mac == nil || [mac isEqual:[NSNull null]]){
+         [PopupView showCusHUDA:@"获取mac失败,请从趣动启动"];
+        return @"";
+    }else{
+        return mac;
+    }
+}
+    
+//获取缓存邀请信息
++(NSString*)getInviteUser{
+    NSDictionary * urlDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSDictionary * invite = urlDict[@"invite"];
+    if ([invite isKindOfClass:[NSNull class]] || invite == nil || [invite isEqual:[NSNull null]]){
+         [PopupView showCusHUDA:@"获取user失败,请从趣动启动"];
+        return @"";
+    }else{
+        //user字典 -> 字符串 -> Char
+        NSDictionary * user =  [invite objectForKey:@"user"];
+        NSData * userData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
+        NSString * userString =  [[NSString alloc] initWithData:userData encoding:NSUTF8StringEncoding];
+        return userString;
+    }
+        
+}
+
++(NSString*)getInviteInfo{
+    
+    NSDictionary * urlDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
+    NSDictionary * invite = urlDict[@"invite"];
+    if ([invite isKindOfClass:[NSNull class]] || invite == nil || [invite isEqual:[NSNull null]]){
+         [PopupView showCusHUDA:@"获取mac失败,请从趣动启动"];
+        return @"";
+    }else{
+        NSString * info = [invite objectForKey:@"info"];
+        return info;
+    }
+ 
+}
+
+
 //加载xib
 - (void)tableViewRegisterNib{
     

+ 0 - 1
RunGame/SDK/UI/SearchDeviceViewController.m

@@ -13,7 +13,6 @@
 @interface SearchDeviceViewController ()<ConnectDeviceDelegate>
 //
 @property (strong, nonatomic)ShoesCarouselView * shoesCarouselView;
-@property (nonatomic, strong) NSMutableArray *array;
 
 //button
 @property(nonatomic,strong)UIButton * nextButton;//

+ 14 - 11
RunGame/SDK/shoes_sdk/DanceFoot.cpp

@@ -161,8 +161,8 @@ int DanceFoot::getGameDiretion(float *pos)
 		std::cout << "right_foot ";
 	}
 
-	if((left_or_right == LEFT_FOOT&& sqrt((x+0.05) * (x+0.05) + y * y) < 0.1)
-		|| (left_or_right == RIGHT_FOOT && sqrt((x - 0.05) * (x - 0.05) + y * y) < 0.1))
+	if((left_or_right == LEFT_FOOT&& sqrt((x+0.15) * (x+0.15) + y * y) < 0.1)
+		|| (left_or_right == RIGHT_FOOT && sqrt((x - 0.15) * (x - 0.15) + y * y) < 0.1))
 	{
 		if (left_or_right == LEFT_FOOT)
 		{
@@ -349,9 +349,9 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 					break;
 				case 2://回到原点
 					if(left_or_right == LEFT_FOOT)
-						danceTraj[0] = -0.05; 
+						danceTraj[0] = -0.15; 
 					else
-						danceTraj[0] = 0.05;
+						danceTraj[0] = 0.15;
 
 					danceTraj[1] = 0.0;
 
@@ -394,7 +394,7 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 						pos_offset[1] = pos_offset[1] + special_offset[1];
 
 					}
-
+					/**/
 					//检测到横移的情况
 					else if (fabs(data[0].pos_x - data[len - 1].pos_x) > 0.3)
 					{
@@ -410,12 +410,12 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 						{
 							if (left_or_right == LEFT_FOOT)
 							{
-								special_offset[0] = -0.05 - mid_x;
+								special_offset[0] = -0.15 - mid_x;
 
 							}
 							else
 							{
-								special_offset[0] = 0.05 - mid_x;
+								special_offset[0] = 0.15 - mid_x;
 							}
 
 							if (data[0].pos_y > 0)
@@ -432,6 +432,7 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 
 							pos_offset[1] = pos_offset[1] + special_offset[1];
 						}
+						/*
 						else
 						{
 							special_offset[0] = -mid_x;
@@ -448,8 +449,10 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 							std::cout << "debug2 :" << special_offset[0] << " " << special_offset[1] << std::endl;
 
 						}
+						*/
+
+					}
 
-			}
 
 					break;
 				default:
@@ -505,7 +508,7 @@ int DanceFoot::calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int*
 
 	if (zupt == 1)
 	{
-		zupt_count = 10;
+		zupt_count = 3;
 	}
 	else
 	{
@@ -602,9 +605,9 @@ void DanceFoot::setLastZupt(int lastZupt)
 void DanceFoot::setDanceTraj(float* traj)
 {
 	if(left_or_right == LEFT_FOOT)
-		danceTraj[0] = traj[0] - 0.05;
+		danceTraj[0] = traj[0] - 0.15;
 	else
-		danceTraj[0] = traj[0] + 0.05;
+		danceTraj[0] = traj[0] + 0.15;
 
 	danceTraj[1] = traj[1];
 }

+ 109 - 32
RunGame/SDK/shoes_sdk/Game.cpp

@@ -10,6 +10,8 @@ Game::Game(int gametype)
 	leftFootStep = FootStep();
 	rightFootStep = FootStep();
 
+	publicmotion = publicMotion();
+
 	rotateMatrix[0] = 1.0f;
 	rotateMatrix[1] = 0.0f;
 	rotateMatrix[2] = 0.0f;
@@ -27,6 +29,9 @@ Game::Game(int gametype)
 	down_count = 0;
 	jump_count = 0;
 
+	last_left_step = 0;
+	last_right_step = 0;
+
 	down_wait = 0;
 	avoid_down_between_jump = 0;
 
@@ -34,6 +39,8 @@ Game::Game(int gametype)
 
 	InteractionCMD = -1;
 
+	shoes_down = 0;
+
 	if (GameType == RUNGAME)
 	{
 		rungame = RunGame();
@@ -72,6 +79,11 @@ Game::Game(int gametype)
 		bigfoot = BigFoot();
 	}
 	
+	else if (GameType == TESTGAME)
+	{
+		testgame = testGame();
+	}
+	
 
 }
 
@@ -151,6 +163,16 @@ int Game::getGameJumpCount()
 	return jump_count;
 }
 
+int Game::onlineDownEstimate()
+{
+	if (posTimeStamp % 8 != 0)
+	{
+		return 0;
+	}
+
+
+}
+
 void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right_acc, int right_zupt, int right_press,
 	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press, 
 	int jump, int down, int rssi, int girl_shoes)
@@ -173,22 +195,10 @@ void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right
 	if (GameType == RUNGAME)
 	{
 		//跑酷游戏处理函数
-		if (left_zupt)
-		{
-			rotateTrajLeft.ResetHeading(left_att[0]);
-		}
-		rotateTrajLeft.TrajRotate(left_pos);
-	
-
-		if (right_zupt)
-		{
-			rotateTrajRight.ResetHeading(right_att[0]);
-		}
-		rotateTrajRight.TrajRotate(right_pos);
-		
 
+	
 		rungame.Process(right_pos, right_att, right_acc, right_zupt, right_press,
-			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, girl_shoes);
+			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, rssi);
 
 		//跑酷游戏处理结果获取
 		rungame.getResult(resultMatrix);
@@ -259,11 +269,15 @@ void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right
 		}
 		rotateTrajRight.TrajRotate(right_pos);
 
+
 		tricycle.Process(right_pos, right_att, right_acc, right_zupt, right_press,
 			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, girl_shoes);
 
 		tricycle.getResult(resultMatrix);
 
+		left_att[0] = resultMatrix[0];
+		resultMatrix[0] = -1;
+		resultMatrix[1] = -1;
 	}
 
 	else if (GameType == BIGFOOT)
@@ -275,6 +289,14 @@ void Game::GameProcess(int timeStamp, int* right_pos, int* right_att, int *right
 		//跑酷游戏处理结果获取
 		bigfoot.getResult(resultMatrix);
 	}
+
+	else if (GameType == TESTGAME)
+	{
+		testgame.Process(right_pos, right_att, right_acc, right_zupt, right_press,
+			left_pos, left_att, left_acc, left_zupt, left_press, jump, down, girl_shoes);
+
+		testgame.getResult(resultMatrix);
+	}
 	
 	/*
 	if (foot_data_file.is_open()&& GameType == DANCEGAME)
@@ -347,7 +369,7 @@ float Game::getGamePos(int left_or_right, int index)
 
 	if (GameType == RUNGAME)
 	{
-		return -1;
+		return rungame.getGamePos(left_or_right, index);
 	}
 	else if(GameType == DANCEGAME)
 	{
@@ -370,10 +392,25 @@ string Game::getVersion()
 
 string Game::getGameDataStr()
 {
-	string data_str = "";
+	string data_str_temp = "";
 
 	//先记录右边
 
+	data_str_temp = data_str;
+
+	data_str = "";
+
+	return data_str_temp;
+
+}
+
+
+void Game::setGameDataStr()
+{
+	if (data_str.size() != 0)
+	{
+		data_str = "";
+	}
 	data_str += (to_string(right_pos_data[0]) + "," + to_string(right_pos_data[1]) + "," + to_string(right_pos_data[2]) + ",");
 	data_str += (to_string(right_att_data[0]) + "," + to_string(right_att_data[1]) + "," + to_string(right_att_data[2]) + ",");
 	data_str += (to_string(right_acc_data[0]) + "," + to_string(right_acc_data[1]) + "," + to_string(right_acc_data[2]) + ",");
@@ -388,11 +425,15 @@ string Game::getGameDataStr()
 
 	data_str += (to_string(down) + "," + to_string(jump) + "," + to_string(rssi) + "," + to_string(posTimeStamp) + ",");
 
-	data_str += (to_string(right_step) + "," + to_string(left_step));
-
-	return data_str;
+	data_str += (to_string(right_step) + "," + to_string(left_step) + "," + to_string(shoes_down) );
 
+}
 
+void Game::getFootAtt(int* left_att, int* right_att)
+{
+	memcpy(right_att, right_att_data, 3 * sizeof(int));
+	memcpy(left_att, left_att_data, 3 * sizeof(int));
+	
 }
 
 
@@ -431,33 +472,37 @@ void Game::GameProcessBuf(uint8_t* buf, int len) {
 
 	h_zupt = (buf[48] & 0x04) >> 2;
 
-	down = (buf[48] & 0x02) >> 1;
+	shoes_down = (buf[48] & 0x02) >> 1;
 
 	jump = (buf[48] & 0x01) >> 0;
 
-
-	rssi = (int)buf[49];
+	rssi = (int) buf[49];
 
 	posTimeStamp = buf[50];
 
 	if (lastTimeStamp == -1)
 	{
 		lastTimeStamp = posTimeStamp;
-	}
 
-	gameTime += (posTimeStamp - lastTimeStamp < 0 ? posTimeStamp - lastTimeStamp + 256 : posTimeStamp - lastTimeStamp);
+		return;
 
-	lastTimeStamp = posTimeStamp;
+	}
 
-	//std::cout << "gameTime : " << gameTime << std::endl;
-	
-	if (gameTime - last_game_time > 1)
+
+	if (posTimeStamp - lastTimeStamp > - 100 && posTimeStamp - lastTimeStamp <=0)
 	{
-		//std::cout << "loss package : " << gameTime - last_game_time -1 << std::endl;
-		last_game_time = gameTime;
+		std::cout << "receive old shoes package ( lastTimeStamp : " << lastTimeStamp << " posTimeStamp : " << posTimeStamp << " )" <<endl;
+
+		lastTimeStamp = posTimeStamp;
+
+		return;
 	}
 
-	last_game_time++;
+
+	gameTime += (posTimeStamp - lastTimeStamp < 0 ? posTimeStamp - lastTimeStamp + 256 : posTimeStamp - lastTimeStamp);
+
+	lastTimeStamp = posTimeStamp;
+
 
 	right_front_mag = uint16_t(buf[51] << 8 | buf[52] << 0);
 	right_back_mag = uint16_t(buf[53] << 8 | buf[54] << 0);
@@ -476,10 +521,42 @@ void Game::GameProcessBuf(uint8_t* buf, int len) {
 		left_step = 0;
 	}
 
+	/*
+	* 利用步数来弥补丢失的触地信号,(PU鞋垫真几把垃圾)
+	*/
+
+	if (last_left_step != left_step)
+	{
+		h_zupt = 1;
+	}
+
+	if (last_right_step != right_step)
+	{
+		s_zupt = 1;
+	}
+
+	last_left_step = left_step;
+
+	last_right_step = right_step;
+
+	//SDK来判断蹲
+	if (publicmotion.getDownData(left_front_mag, right_front_mag, left_back_mag, right_back_mag))
+	{
+		down = 1;
+		//std::cout << "SDK down valic" << endl;
+	}
+	else
+	{
+		down = 0;
+	}
+	
 	GameProcess(gameTime,
 		right_pos_data, right_att_data, right_acc_data, s_zupt, (int)right_front_mag,
 		left_pos_data, left_att_data, left_acc_data, h_zupt, (int)left_front_mag,
-		jump, down, rssi, girl_shoes);
+		jump, shoes_down, rssi, girl_shoes);
+	
+
+	setGameDataStr();
 
 }
 

+ 21 - 0
RunGame/SDK/shoes_sdk/Game.h

@@ -22,6 +22,10 @@
 
 #include "BigFoot.h"
 
+#include "publicMotion.h"
+
+#include "testGame.h"
+
 #include <fstream>
 #include <time.h>
 #include <sstream>
@@ -43,6 +47,8 @@ class Game
 
 			void getGameResult(int* matrix);
 
+			void getFootAtt(int* left_att, int* right_att);
+
 			string getGameDataStr();
 
 			int getStepStatus(int left_or_right);
@@ -65,6 +71,10 @@ class Game
 
 			int getGameJumpCount();
 
+			int onlineDownEstimate();
+
+			void setGameDataStr();
+
 		private:
 
 			int GameType;
@@ -91,6 +101,10 @@ class Game
 
 			BigFoot bigfoot;
 
+			publicMotion publicmotion;
+
+			testGame testgame;
+
 			int leftStepRate;
 			int rightStepRate;
 			
@@ -154,6 +168,13 @@ class Game
 			int down_wait;
 			int avoid_down_between_jump;
 
+			uint32_t last_left_step;
+			uint32_t last_right_step;
+
+			string data_str;
+
+			int shoes_down;
+
 };
 
 #endif

+ 0 - 47
RunGame/SDK/shoes_sdk/ReadMe.txt

@@ -1,47 +0,0 @@
-
-
-1、sdk 简例:
-
-Game myGame = Game(RUNGAME);
-
-int result[4];
-
-myGame.GameProcess(right_pos_data, right_att_data, s_zupt, left_pos_data, left_att_data, h_zupt, jump, down, rssi);
-
-myGame.getGameResult(result);
-
-
-2,  结果解释
-
-result[0] 管左脚的方向,见pub.h 里面的定义_CMD_MOTION  MOTION_LEFT
-
-result[1] 管右脚的方向,见pub.h 里面的定义_CMD_MOTION  MOTION_RIGHT
-
-result[2]:跳  见pub.h 里面的定义_CMD_MOTION MOTION_JUMP
-
-result[3]: 蹲 见pub.h 里面的定义_CMD_MOTION MOTION_DOWN
-
-----------------------------------------------------------------------------------------------------------
-
-2021 /01 /13  新增步数 步频 步频快慢的接口
-
-获取方法:
-
-#define LEFT_FOOT 1
-#define RIGHT_FOOT 2
-
-int getStepStatus(int left_or_right); // 0 为停止 1为正常速度 2为快速
-
-int getStepFreq(int left_or_right);  //输出为步频
-
-int getStepCount(int left_or_right); //输出创建对象后的步数统计		
-
-接口输入异常参数,均输出-1	
-----------------------------------------------------------------------------------------------
-2021/02/08 优化跳舞毯的参数调整,包括跳舞毯的边界值,往后也需要迭代修改
-
-1、本次修改的参数包括 边界的大小,大范围移动的检测后的落地值优化
-
-2、将RSSI判断小范围移动的信号阈值改至5以内
-
-	

+ 1 - 3
RunGame/SDK/shoes_sdk/RuinsExplore.cpp

@@ -24,12 +24,10 @@ void RuinsExplore::Process(int* right_pos, int* right_att, int* right_acc, int r
 		暂时在同一个函数里分开处理左右脚的数据,往后再优化
 	*/
 
-
 	int left_pos_tmp[3];
 	int right_pos_tmp[3];
 
 
-
 	left_acc_status = getAccStatus(left_zupt, left_acc, left_acc_max, left_acc_min);
 
 	right_acc_status = getAccStatus(right_zupt, right_acc, right_acc_max, right_acc_min);
@@ -108,4 +106,4 @@ int RuinsExplore::getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc)
 	}
 
 	return 0;
-}
+}

+ 394 - 42
RunGame/SDK/shoes_sdk/RunGame.cpp

@@ -3,60 +3,332 @@
 
 #include "pub.h"
 
-void RunGame::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
-	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
-	int jump, int down, int girl_shoes)
+int rotateGamePos(int* pos, float heading, int left_or_right);
+
+void check_vector(vector<POS_X_CELL> &data_vector, int zupt)
 {
-	/*
-		跑酷游戏处理接口,
-		暂时在同一个函数里分开处理左右脚的数据,往后再优化
-	*/
+	//1、当 当前为触地时刻, 应保证 data_vector 仅有两个zupt
+	// vector 不可能为空,不作 空的判断
 
-	if (left_zupt)
+	if (zupt == 1)
 	{
-		memcpy(left_last_pos, left_pos, 3 * sizeof(int));
+		//如果输入为触地信号,那么应该先弹出头部zupt为0的数据
+		if (data_vector.size() == 1)
+		{
+			return;
+		}
+		while (data_vector.size() != 0)
+		{
+			if (data_vector[0].zupt == 0)
+			{
+				data_vector.erase(data_vector.begin());
+			}
+			else
+			{
+				break;
+			}
+		}
+
+		//再检测当前数组应该保持两个ZUPT就好
+		if (data_vector.size() == 1)
+		{
+			return;
+		}
+
+		//先统计当前有几个zupt吧
+		int zupt_count = 0;
+		for (int i = 0; i < data_vector.size(); i++)
+		{
+			if (data_vector[i].zupt == 1)
+			{
+				zupt_count++;
+			}
+		}
+
+		if (zupt_count <= 1)
+		{
+			std::cout << "rungame error 1 zupt_count : " << zupt_count <<endl;
+		}
+
+		//删除多余的触地数据
+		int delete_data_count = zupt_count - 2;
+
+		while (delete_data_count > 0)
+		{
+			if (data_vector[0].zupt == 1)
+			{
+				delete_data_count--;
+			}
+			data_vector.erase(data_vector.begin());
+		}
+
+		//判断额外的情况,如果数据长度就只有两个,而且都是zupt,那么就需要删除头部
+
+		if (data_vector.size() == 2 && data_vector[0].zupt == 1 && data_vector[1].zupt == 1)
+		{
+			data_vector.erase(data_vector.begin());
+		}
+
 	}
+	else
+	{
+		//当前信号为触地信号
+		//保证当前应该只有一个zupt信号
+		 
+		if (data_vector.size() == 1)
+		{
+			data_vector.clear();
+		}
 
-	if (right_zupt)
+		int zupt_count = 0;
+		for (int i = 0; i < data_vector.size(); i++)
+		{
+			if (data_vector[i].zupt == 1)
+			{
+				zupt_count++;
+			}
+		}
+
+		if (zupt_count == 0)
+		{
+			data_vector.clear();
+		}
+
+		//删除多余的触地数据
+		int delete_data_count = zupt_count - 1;
+
+		while (delete_data_count > 0)
+		{
+			if (data_vector[0].zupt == 1)
+			{
+				delete_data_count--;
+			}
+			data_vector.erase(data_vector.begin());
+		}
+
+	}
+}
+
+//计算结果的时候应该保持
+int calResult_LEFT(vector<POS_X_CELL>& data_vector)
+{
+	int motion = 0;
+	if (data_vector.size() <= 1)
 	{
-		memcpy(right_last_pos, right_pos, 3 * sizeof(int));
+		return motion;
 	}
 
-	int left_pos_tmp[3];
-	int right_pos_tmp[3];
+	//经过检查后,保证了头部只有一个触地信号, 
+	//那么应当将触地信号设置本数据段的初始方向,计算一系列旋转后的位置
 
-	for (int i = 0; i < 3; i++)
+	vector<int> pos_x_vector;
+	int pos_temp[3];
+	float heading_temp = data_vector[0].heading * 0.0001f;
+
+	for (int  i = 0; i < data_vector.size(); i++)
 	{
-		left_pos_tmp[i] = left_pos[i] - left_last_pos[i];
+		pos_temp[0] = data_vector[i].pos_x;
+		pos_temp[1] = data_vector[i].pos_y;
+		pos_temp[2] = data_vector[i].pos_z;
 
-		right_pos_tmp[i] = right_pos[i] - right_last_pos[i];
+		pos_x_vector.push_back(rotateGamePos(pos_temp, heading_temp, LEFT_FOOT));
 	}
 
-	
-	if (left_zupt == 0)
+	//左脚的话应该先找到最大值,及对应的位置
+	int max_val = pos_x_vector[0];
+	int max_val_index = 0;
+	for (int i = 0; i < pos_x_vector.size(); i++)
 	{
-		std::cout << "rungame leftpos: " << left_pos_tmp[0] << " " << left_pos_tmp[1] << " " << left_pos_tmp[2] << std::endl;
+		if (max_val < pos_x_vector[i])
+		{
+			max_val = pos_x_vector[i];
+
+			max_val_index = i;
+		}
 	}
-	
+	//再做判断
+	if (max_val - pos_x_vector[pos_x_vector.size() - 1] > 15 && data_vector[pos_x_vector.size() - 1].pitch * 0.0001f < 0.3f)
+	{
+		for (int i = 0; i < pos_x_vector.size(); i++)
+		{
+			std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , " ;
+		}
+		std::cout << endl;
 
 
+		if (data_vector[data_vector.size() - 1].zupt == 1)
+		{
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
 
-	left_acc_status =  getAccStatus(left_zupt, left_acc, left_acc_max, left_acc_min);
+			data_vector.push_back(temp);
+		}
+		else
+		{
+			data_vector.clear();
+		}
 
-	right_acc_status = getAccStatus(right_zupt, right_acc, right_acc_max, right_acc_min);
-	
-	setResultConLeft(left_zupt);
+		motion = 1;
+	}
+	else
+	{
+		if (data_vector[data_vector.size() - 1].zupt == 1 && data_vector[0].zupt == 1)
+		{
+			std::cout << "debug queue" << endl;
+			for (int i = 0; i < pos_x_vector.size(); i++)
+			{
+				std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , ";
+			}
+			std::cout << endl;
+
+			//在检测结果的时候,还能遇到两个触地信号,那么直接这段数据清空,留最新的触地信号
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
+
+			data_vector.push_back(temp);
+		}
+	}
+
+	return motion;
+}
+
+int calResult_RIGHT(vector<POS_X_CELL>& data_vector)
+{
+	int motion = 0;
+	if (data_vector.size() <= 1)
+	{
+		return motion;
+	}
+
+	//经过检查后,保证了头部只有一个触地信号, 
+	//那么应当将触地信号设置本数据段的初始方向,计算一系列旋转后的位置
+
+	vector<int> pos_x_vector;
+	int pos_temp[3];
+	float heading_temp = data_vector[0].heading * 0.0001f;
+
+	for (int i = 0; i < data_vector.size(); i++)
+	{
+		pos_temp[0] = data_vector[i].pos_x;
+		pos_temp[1] = data_vector[i].pos_y;
+		pos_temp[2] = data_vector[i].pos_z;
+
+		pos_x_vector.push_back(rotateGamePos(pos_temp, heading_temp, LEFT_FOOT));
+	}
+
+	//右脚的话应该先找到最小值,及对应的位置
+	int min_val = pos_x_vector[0];
+	int min_val_index = 0;
+	for (int i = 0; i < pos_x_vector.size(); i++)
+	{
+		if (min_val > pos_x_vector[i])
+		{
+			min_val = pos_x_vector[i];
+
+			min_val_index = i;
+		}
+	}
+	//再做判断
+	if (pos_x_vector[pos_x_vector.size() - 1] - min_val > 15 && data_vector[pos_x_vector.size() - 1].pitch * 0.0001f < 0.3f)
+	{
+		std::cout << "right_foot pos_offset : ";
+
+		for (int i = 0; i < pos_x_vector.size(); i++)
+		{
+			std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , ";
+		}
+		std::cout << endl;
+		
+
+		if (data_vector[data_vector.size() - 1].zupt == 1)
+		{
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
+
+			data_vector.push_back(temp);
+		}
+		else
+		{
+			data_vector.clear();
+		}
+
+		motion = 1;
+	}
+	else
+	{
+		if (data_vector[data_vector.size() - 1].zupt == 1 && data_vector[0].zupt == 1)
+		{
+			std::cout << "debug queue" << endl;
+			for (int i = 0; i < pos_x_vector.size(); i++)
+			{
+				std::cout << pos_x_vector[i] << " , " << data_vector[i].zupt << " , ";
+			}
+			std::cout << endl;
+
+			//在检测结果的时候,还能遇到两个触地信号,那么直接这段数据清空,留最新的触地信号
+			POS_X_CELL  temp = data_vector[data_vector.size() - 1];
+			data_vector.clear();
+
+			data_vector.push_back(temp);
+		}
+
+		
+	}
+
+	return motion;
+}
+
+void RunGame::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
+	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
+	int jump, int down, int rssi)
+{
+
+
+	POS_X_CELL left_pos_x_cell = { left_pos[0], left_pos[1], left_pos[2], left_att[0], left_att[1], left_zupt };
+
+	POS_X_CELL right_pos_x_cell = { right_pos[0], right_pos[1], right_pos[2], right_att[0], right_att[1],right_zupt };
+
+	left_q.push_back(left_pos_x_cell);
+	right_q.push_back(right_pos_x_cell);
+
+	check_vector(left_q, left_zupt);
+
+	check_vector(right_q, right_zupt);
+
+
+	if (calResult_LEFT(left_q))
+	{
+		result[0] = MOTION_LEFT;
+
+		std::cout << "appear LEFT_MOTION CMD" << endl;
+	}
+	else
+	{
+		result[0] = -1;
+	}
+
+	if (calResult_RIGHT(right_q))
+	{
+		result[1] = MOTION_RIGHT;
+
+		std::cout << "appear RIGHT_MOTION CMD" << endl;
+	}
+	else
+	{
+		result[1] = -1;
+	}
 
-	result[0] = getResultLeft(left_pos_tmp, girl_shoes);
 
-	setResultConRight(right_zupt);
-	
-	result[1] = getResultRight(right_pos_tmp, girl_shoes);
 
 	result[2] = getResultJump(jump);
 
 	result[3] = getResultDown(down);
 
+
+	last_left_zupt = left_zupt;
+	last_right_zupt = right_zupt;
+
+
 }
 
 void RunGame::getResult(int* dec)
@@ -122,14 +394,11 @@ int RunGame::getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc)
 }
 
 
-int RunGame::getResultLeft(int *pos, int girl_shoes)
+int RunGame::getResultLeft(int *pos, int girl_shoes, float pitch)
 {
 	int isLeft = -1;
 
-	int distance_threshold = 20;
-
-	if (girl_shoes)
-		distance_threshold = 15;
+	int distance_threshold = 15;
 
 	if (pos[0] > left_pos_offset_min)
 	{
@@ -137,7 +406,7 @@ int RunGame::getResultLeft(int *pos, int girl_shoes)
 
 	}
 
-	if (left_has_result == 1 && pos[0] - left_pos_offset_min < -distance_threshold)
+	if (left_has_result == 1 && pos[0] - left_pos_offset_min < -distance_threshold && pitch < 0.3f )
 	{
 		printf("this motion is Left\n");
 		isLeft = MOTION_LEFT;
@@ -152,26 +421,24 @@ int RunGame::getResultLeft(int *pos, int girl_shoes)
 	return isLeft;
 }
 
-int RunGame::getResultRight(int *pos, int girl_shoes)
+int RunGame::getResultRight(int *pos, int girl_shoes, float pitch)
 {
 	int isRight = -1;
 
-	int distance_threshold = 20;
+	int distance_threshold = 15;
+
 
-	if (girl_shoes)
-	{
-		distance_threshold = 15;
-	}
 	if (pos[0] < right_pos_offset_min)
 	{
 		right_pos_offset_min = pos[0];
 	}
 
-	if (right_has_result == 1 && pos[0] - right_pos_offset_min > distance_threshold)
+	if (right_has_result == 1 && pos[0] - right_pos_offset_min > distance_threshold && pitch < 0.3f )
 	{
 		printf("this motion is Right\n");
 
 		isRight = MOTION_RIGHT;
+
 		right_has_result = 0;
 	}
 	else if (right_has_result == 1 && pos[0] - right_pos_offset_min > distance_threshold && right_acc_status == 0)
@@ -204,7 +471,7 @@ int RunGame::getResultJump(int jump)
 
 	last_jump_time++;
 
-	if (last_jump == 0 && jump == 1 && left_acc_status == 1 && right_acc_status == 1)
+	if (last_jump == 0 && jump == 1)
 	{
 		static int jump_count = 0;
 
@@ -243,6 +510,21 @@ int RunGame::getResultDown(int down)
 
 }
 
+float RunGame::getGamePos(int left_or_right, int index)
+{
+	if (index < 0 || index > 2)
+		return -1;
+
+	if (left_or_right == LEFT_FOOT)
+	{
+		return left_game_pos[index] * 0.01f;
+	}
+	else
+	{
+		return right_game_pos[index] * 0.01f;
+	}
+}
+
 RunGame::RunGame()
 {
 	last_down = 0;
@@ -264,4 +546,74 @@ RunGame::RunGame()
 	memset(left_last_pos, 0, 3 * sizeof(int));
 	memset(right_last_pos, 0, 3 * sizeof(int));
 
+	left_reset_heading = 0.f;
+
+	right_reset_heading = 0.f;
+	
+	has_init_heading = 0;
+	
+	zupt_count = 0;
+
+	memset(left_game_pos, 0, 3 * sizeof(int));
+	memset(right_game_pos, 0, 3 * sizeof(int));
+
+	last_left_zupt = 1;
+	last_right_zupt = 1;
+}
+
+void RunGame::setGameheading(int left_zupt, int right_zupt, float left_heading, float right_heading , int rssi)
+{
+
+	if (left_zupt)
+	{
+		left_reset_heading = left_heading;
+	}
+
+	if (right_zupt)
+	{
+		right_reset_heading = right_heading;
+	}
+	
+
+}
+
+int rotateGamePos(int* pos, float heading,int left_or_right)
+{
+	float pos_f[3];
+
+	pos_f[2] = float(pos[2]) * 0.01f;
+	pos_f[1] = float(pos[1]) * 0.01f;
+	pos_f[0] = float(pos[0]) * 0.01f;
+
+	float posTemp[3];
+
+	posTemp[2] = pos_f[2];
+
+	
+	if (left_or_right == LEFT_FOOT)
+	{
+		posTemp[0] =  cos(heading) * float(pos_f[0]) + sin(heading) * float(pos_f[1]);
+		posTemp[1] = -sin(heading) * float(pos_f[0]) + cos(heading) * float(pos_f[1]);
+
+		/*
+		*  因为女生跑的时候,左鞋鞋子朝向是往左的,导致不在人体的主方向,会使估计的X方向轨迹会变长
+		*/
+		pos_f[0] = 0.9848 * posTemp[0] - 0.1736 * posTemp[1];
+		pos_f[1] = 0.1736 * posTemp[0] + 0.9848 * posTemp[1];
+	}
+	else
+	{
+		posTemp[0] = cos(heading) * float(pos_f[0]) + sin(heading) * float(pos_f[1]);
+		posTemp[1] = -sin(heading) * float(pos_f[0]) + cos(heading) * float(pos_f[1]);
+
+		pos_f[0] = 0.9848 * posTemp[0] + 0.1736 * posTemp[1];
+		pos_f[1] = - 0.1736 * posTemp[0] + 0.9848 * posTemp[1];
+	}
+	/*
+	pos[0] = (int)(pos_f[0] * 100.0f);
+	pos[1] = (int)(pos_f[1] * 100.0f);
+	pos[2] = (int)(pos_f[2] * 100.0f);
+	*/
+
+	return (int)(pos_f[0] * 100.0f);
 }

+ 47 - 3
RunGame/SDK/shoes_sdk/RunGame.h

@@ -2,6 +2,24 @@
 #ifndef _RunGame_H_
 #define _RunGame_H_
 
+#include <vector>
+
+using namespace std;
+
+struct POS_X_CELL
+{
+	//位置
+	int pos_x;
+	int pos_y;
+	int pos_z;
+
+	//角度
+	int heading;
+	int pitch;
+
+	int zupt;
+};
+
 class RunGame
 {
 	public:
@@ -12,21 +30,27 @@ class RunGame
 		void setResultConLeft(int zupt);
 		void setResultConRight(int zupt);
 
-		int getResultLeft(int *pos, int girl_shoes);
-		int getResultRight(int *pos, int girl_shoes);
+		int getResultLeft(int *pos, int girl_shoes, float pitch);
+		int getResultRight(int* pos, int girl_shoes, float pitch);
 
 		//void Process(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 Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
 			int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
-			int jump, int down, int girl_shoes);
+			int jump, int down, int rssi);
 
 		void getResult(int *dec);
 
 		int getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc);
 
+		void setGameheading(int left_zupt, int right_zupt, float left_heading, float right_heading, int rssi);
+
+		void rotateGamePos(int* pos, int left_or_right);
+
+		float getGamePos(int left_or_right, int index);
 
+		int  calResult(vector<POS_X_CELL> &q, int last_zupt , int zupt, int left_or_right);
 
 	private:
 
@@ -61,6 +85,26 @@ class RunGame
 
 		int left_acc_min[3];
 
+		//开局重置方向
+
+		float left_reset_heading;
+		
+		float right_reset_heading;
+		
+		int has_init_heading;
+
+		int zupt_count;
+
+		//测试用的pos
+		int left_game_pos[3];
+
+		int right_game_pos[3];
+
+		int last_left_zupt;
+		int last_right_zupt;
+
+		vector<POS_X_CELL> left_q;
+		vector<POS_X_CELL> right_q;
 
 };
 

+ 3 - 1
RunGame/SDK/shoes_sdk/SingleFootAction.h

@@ -5,6 +5,8 @@
 #define  STOP_ANGLE  -0.65f
 
 
+
+
 class  SingleFootAction {
 
 public:
@@ -71,4 +73,4 @@ private:
 	clock_t time_s = clock();
 
 	FootActionState footActionState = {0, 0 , 0};
-};
+};

+ 51 - 89
RunGame/SDK/shoes_sdk/Tricycle.cpp

@@ -29,6 +29,10 @@ Tricycle::Tricycle()
 
 	has_init = 0;
 
+	last_jump = 0;
+
+	prop_status = 0;
+
 }
 
 void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
@@ -55,16 +59,24 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 		right_zupt_count = 0;
 	}
 
+
 	float cur_left_heading = left_att[0] * 0.0001f;
 	float cur_right_heading = right_att[0] * 0.0001f;
 
+
 	//计算初始方向
 	if (left_zupt_count > 100 && right_zupt_count > 100 && rssi < 32)
 	{
 		left_foot_init_heading  = cur_left_heading;
 		right_foot_init_heading = cur_right_heading;
 
+		if (has_init == 0)
+		{
+			std::cout << "Cycle has inited !!!" << endl;
+		}
+
 		has_init = 1;
+
 	}
 
 
@@ -72,10 +84,11 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 
 	float right_heading_offset = calHeadingOffset(right_foot_init_heading, cur_right_heading);
 
+	//std::cout << "left_heading_offset : " << left_heading_offset << " right_heading_offset : " << right_heading_offset << endl;
 
 	if (fabsf(calHeadingOffset(left_heading_offset, right_heading_offset)) > PI/3.0f)
 	{
-		std::cout<< "dual_foot_heading appear max angle" <<endl;
+		//std::cout<< "dual_foot_heading appear max angle" <<endl;
 	}
 
 
@@ -90,7 +103,7 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 
 	int up_prop = -1;
 
-	if (jump && left_trigger_time == 0 && right_trigger_time == 0)
+	if (last_jump == 0 && jump)
 	{
 		left_jump_status = 1;
 		right_jump_status = 1;
@@ -98,101 +111,49 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 		std::cout << "过程中出现跳" << endl;
 	}
 
-	if (left_zupt && last_left_zupt == 0 && left_trigger_time == 0 && left_jump_status == 1)
-	{
-		left_trigger_time = 50;
-
-		if (left_pos_offset < -10)
-		{
-			left_jump_status = 2;
-		}
-		else if (left_pos_offset > 10)
-		{
-			left_trigger_time = 0;
-			left_jump_status = 0;
-
-			std::cout << "左脚将状态全设置为0" << endl;
-		}
-
-	}
-
-
-	if (left_zupt && last_left_zupt == 0)
-	{
-		std::cout << "left_zupt && last_left_zupt == 0" << endl;
-
-		std::cout << "left_jump_status : " << left_jump_status << endl;
-
-		std::cout << "left_trigger_time : " << left_trigger_time << endl;
-	}
-
-
-
-	if (right_zupt && last_right_zupt == 0 && right_trigger_time == 0 && right_jump_status == 1)
-	{
-		right_trigger_time = 50;
-
-		if (right_pos_offset > 10)
-		{
-			right_jump_status = 2;
-		}
-		else if (right_pos_offset < -10)
-		{
-			right_jump_status = 0;
-
-			right_trigger_time = 0;
-
-			std::cout << "右脚将状态全设置为0" << endl;
-		}
-	}
-
-	if (right_zupt && last_right_zupt == 0)
-	{
-		std::cout << "right_zupt && last_right_zupt == 0" << endl;
-
-		std::cout << "right_jump_status : " << right_jump_status <<endl;
-
-		std::cout << "right_trigger_time : " << right_trigger_time << endl;
-	}
-
 
-
-	if( right_trigger_time > 0 && left_trigger_time > 0)
+	if ((left_zupt && last_left_zupt == 0) || (right_zupt && last_right_zupt == 0))
 	{
-		//触发触发释放物品
-
-		std::cout << "debug : if( right_trigger_time > 0 && left_trigger_time > 0)" << endl;
-
-		if (right_jump_status == 1 && left_jump_status == 1)
+		if (left_pos_offset < -15 && right_pos_offset > 15)
 		{
 			up_prop = 1;
 
+			prop_status = up_prop;
+
 			std::cout << "上层 发放物品" << endl;
 		}
-		else if (right_jump_status == 2 && left_jump_status == 2)
-		{
-			down_prop = 1;
-
-			std::cout << "下层 发放物品" << endl;
+		else if (left_jump_status == 1 && right_jump_status == 1)
+		{	
+			if (abs(left_pos_offset) < 10 && abs(right_pos_offset) < 10 && prop_status == 1)
+			{
+				up_prop = 1;
+				std::cout << "因为上个状态是 上层发放物品,所以 这次也是 上层发放物品"  << endl;
+			}
+			else if (abs(left_pos_offset) < 8 && abs(right_pos_offset) < 8)
+			{
+				down_prop = 1;
+
+				prop_status = 0;
+
+				std::cout << "下层 发放物品" << endl;
+			}
+			else
+			{
+				prop_status = 0;
+			}
+			std::cout << "left_pos_offset : " << left_pos_offset << "  right_pos_offset : " << right_pos_offset << endl;
 		}
-		else
+
+		if (left_pos_offset > 8 && right_pos_offset < -8)
 		{
-			std::cout << "debug : right_jump_status : " << right_jump_status << "left_jump_status :" << left_jump_status << endl;
+			prop_status = 0;
 		}
 
-		right_trigger_time = 0;
-		left_trigger_time = 0;
+		left_jump_status = 0;
+		right_jump_status = 0;
 	}
 
-	if (left_trigger_time > 0)
-	{
-		left_trigger_time --;
-	}
 
-	if (right_trigger_time > 0)
-	{
-		right_trigger_time--;
-	}
 
 
 	if (left_zupt)
@@ -203,8 +164,6 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 			last_left_pos[i] = left_pos[i];
 		}
 
-		if(left_trigger_time == 0)
-			left_jump_status = 0;
 	}
 
 	left_pos_offset = left_pos[0] - last_left_pos[0];
@@ -215,8 +174,6 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 		{
 			last_right_pos[i] = right_pos[i];
 		}
-		if(right_trigger_time == 0)
-			right_jump_status = 0;
 	}
 
 	right_pos_offset = right_pos[0] - last_right_pos[0];
@@ -224,15 +181,20 @@ void Tricycle::Process(int* right_pos, int* right_att, int* right_acc, int right
 	last_left_zupt = left_zupt;
 	last_right_zupt = right_zupt;
 
+	last_jump = jump;
+
 
 	result[0] = (int)(game_heading_offset * 10000.0f);
 
-	result[1] = up_prop;
-	result[2] = down_prop;
+	result[1] = result[0];
+
+	result[2] = (down_prop == 1 ? MOTION_JUMP_OC : -1);
+	result[3] = (up_prop == 1 ? MOTION_JUMP_VERTICAL : -1);
 
 	if (has_init == 0)
 	{
 		result[0] = 0;
+		result[1] = 0;
 	}
 
 }

+ 4 - 0
RunGame/SDK/shoes_sdk/Tricycle.h

@@ -51,6 +51,10 @@ private:
 	int left_pos_offset;
 	int right_pos_offset;
 
+	int last_jump;
+
+	int prop_status;
+
 };
 
 #endif

+ 6 - 1
RunGame/SDK/shoes_sdk/pub.h

@@ -26,6 +26,8 @@ using namespace std;
 #define CYCLE 6
 #define BIGFOOT 7
 
+#define TESTGAME 100
+
 #define RSSI_LIMIT
 
 #define PI 3.141592653
@@ -34,7 +36,7 @@ using namespace std;
 
 #define PRESS_MIN 41000
 
-#define GAME_VERSION "0.3.30"
+#define GAME_VERSION "0.3.52"
 
 enum CMD_MOTION
 {
@@ -51,6 +53,9 @@ enum CMD_MOTION
     MOTION_RIGHT_UP, // 点击-右上
     MOTION_RIGHT_DOWN, // 点击-右下
     MOTION_STEP, // 点击-原地踩
+    MOTION_JUMP_OC, // 开合跳
+    MOTION_JUMP_VERTICAL, // 垂直跳
+
 
     NUMBERS_OF_MOTION,
 

+ 186 - 0
RunGame/SDK/shoes_sdk/publicMotion.cpp

@@ -0,0 +1,186 @@
+#include "publicMotion.h"
+
+publicMotion::publicMotion()
+{
+	motion_time = 0;
+
+	memset(left_front_mag_window, 0, 5 * sizeof(int));
+
+	memset(right_front_mag_window, 0, 5 * sizeof(int));
+
+	memset(left_back_mag_window, 0, 5 * sizeof(int));
+
+	memset(right_back_mag_window, 0, 5 * sizeof(int));
+
+	memset(left_front_mag_mean_window, 0, 15 * sizeof(int));
+
+	memset(right_front_mag_mean_window, 0, 15 * sizeof(int));
+
+	memset(left_back_mag_mean_window, 0, 15 * sizeof(int));
+
+	memset(right_back_mag_mean_window, 0, 15 * sizeof(int));
+
+	left_front_up_time = 0;
+	right_front_up_time = 0;
+
+	left_back_up_time = 0;
+	right_back_up_time = 0;
+
+}
+
+void publicMotion::meanFiltData(int time_count, int mag_data, int* mag_data_window, int* mean_mag_data)
+{
+	if (time_count < 7)
+	{
+		mean_mag_data[time_count % 5] = mag_data;
+
+	}
+	else
+	{
+		float sum = 0;
+		for (int i = 0; i < 5; i++)
+		{
+			sum += mag_data_window[i];
+		}
+
+		mean_mag_data[time_count % 15] = sum / 5.;
+	}
+}
+
+/*
+* 均值滤波的窗口大小为10, 当检测到前三个的和 < 后三个数据的和,则视为上升的趋势
+* 上升的时候,还要检测上升趋势的最大值,防止两个凸曲线有重叠误判为蹲
+*/
+void  publicMotion::setSpecialPoint_part(int mag_data, int* mean_data, int* max_val, int* down_point, int* up_time)
+{
+	int prev_sum = (mean_data[(motion_time - 8) % 15] + mean_data[(motion_time - 7) % 15] + mean_data[(motion_time - 6) % 15]);
+
+	int prev_sum1 = (mean_data[(motion_time - 11) % 15] + mean_data[(motion_time - 10) % 15] + mean_data[(motion_time - 9) % 15]);
+	int prev_sum2 = (mean_data[(motion_time - 14) % 15] + mean_data[(motion_time - 13) % 15] + mean_data[(motion_time - 12) % 15]);
+
+	int back_sum = (mean_data[(motion_time - 2) % 15] + mean_data[(motion_time - 1) % 15] + mean_data[(motion_time) % 15]);
+
+	if (prev_sum < back_sum - 100 || prev_sum1 < back_sum - 10 || prev_sum2 < back_sum - 10)
+	{
+		if (*max_val < mean_data[motion_time % 15])
+		{
+			*max_val = mean_data[motion_time % 15];
+		}
+
+		(*up_time)++;
+	}
+	else
+	{
+		*max_val = mean_data[motion_time % 15];
+
+		*down_point = mean_data[motion_time % 15];
+
+		*up_time = 0;
+	}
+}
+
+void publicMotion::setSpecialPoint(int left_front_data, int right_front_data, int left_back_data, int right_back_data)
+{
+	if (motion_time < 10)
+	{
+		left_back_mag_point_val = left_back_data;
+		right_back_mag_point_val = right_back_data;
+
+		left_front_mag_point_val = left_front_data;
+		right_front_mag_point_val = right_front_data;
+
+		left_back_mag_up_max = left_back_data;
+		right_back_mag_up_max = right_back_data;
+
+		left_front_mag_up_max = left_front_data;
+		right_front_mag_up_max = right_front_data;
+	}
+	else
+	{
+
+		setSpecialPoint_part(left_front_data, left_front_mag_mean_window, &left_front_mag_up_max, &left_front_mag_point_val, &left_front_up_time);
+
+		setSpecialPoint_part(right_front_data, right_front_mag_mean_window, &right_front_mag_up_max, &right_front_mag_point_val, &right_front_up_time);
+
+		setSpecialPoint_part(left_back_data, left_back_mag_mean_window, &left_back_mag_up_max, &left_back_mag_point_val, &left_back_up_time);
+
+		setSpecialPoint_part(right_back_data, right_back_mag_mean_window, &right_back_mag_up_max, &right_back_mag_point_val, &right_back_up_time);
+	}
+}
+
+void publicMotion::setMagData(int left_front_data, int right_front_data, int left_back_data, int right_back_data)
+{
+
+	left_front_mag_window[motion_time % 5] = left_front_data;
+
+	right_front_mag_window[motion_time % 5] = right_front_data;
+
+	left_back_mag_window[motion_time % 5] = left_back_data;
+
+	right_back_mag_window[motion_time % 5] = right_back_data;
+
+	//均值滤波
+	meanFiltData(motion_time, left_front_data, left_front_mag_window, left_front_mag_mean_window);
+	meanFiltData(motion_time, right_front_data, right_front_mag_window, right_front_mag_mean_window);
+
+	meanFiltData(motion_time, left_back_data, left_back_mag_window, left_back_mag_mean_window);
+	meanFiltData(motion_time, right_back_data, right_back_mag_window, right_back_mag_mean_window);
+
+	setSpecialPoint(left_front_data, right_front_data, left_back_data, right_back_data);
+
+
+	motion_time++;
+
+}
+
+int publicMotion::getDownData(int left_front_data, int right_front_data, int left_back_data, int right_back_data)
+{
+	setMagData(left_front_data, right_front_data, left_back_data, right_back_data);
+
+	int  left_front_down_tag = 0;
+	int  right_front_down_tag = 0;
+
+	int  left_back_down_tag = 0;
+	int  right_back_down_tag = 0;
+
+	if (left_back_data - left_back_mag_point_val > 2000 || (left_back_data - left_back_mag_point_val > 1000 && left_back_mag_point_val > 15000))
+	{
+		left_back_down_tag = 1;
+	}
+
+	if (right_back_data - right_back_mag_point_val > 2000 || (right_back_data - right_back_mag_point_val > 1000 && right_back_mag_point_val > 15000))
+	{
+		right_back_down_tag = 1;
+	}
+
+
+	if (left_back_down_tag && right_back_down_tag
+		&& left_back_data - left_back_mag_up_max > -500 && right_back_data - right_back_mag_up_max > -500 &&
+		abs(left_back_up_time - right_back_up_time) < 10 && left_back_up_time > 3 && right_back_up_time > 3)
+	{
+
+		return 1;
+	}
+
+
+	if (left_front_data - left_front_mag_point_val > 2000 || (left_front_data - left_front_mag_point_val > 1000 && left_front_mag_point_val > 15000))
+	{
+		left_front_down_tag = 1;
+	}
+
+	if (right_front_data - right_front_mag_point_val > 2000 || (right_front_data - right_front_mag_point_val > 1000 && right_front_mag_point_val > 15000))
+	{
+		right_front_down_tag = 1;
+	}
+
+	if (left_front_down_tag && right_front_down_tag
+		&& left_front_data - left_front_mag_up_max > -500 && right_front_data - right_front_mag_up_max > -500
+		&& abs(left_front_up_time - right_front_up_time) < 10 && left_front_up_time > 3 && right_front_up_time > 3)
+	{
+
+		return 1;
+	}
+
+
+	return 0;
+}

+ 58 - 0
RunGame/SDK/shoes_sdk/publicMotion.h

@@ -0,0 +1,58 @@
+#pragma once
+#ifndef _PUBLIC_MOTION_H
+#define _PUBLIC_MOTION_H
+
+#include <iostream>
+
+class publicMotion {
+
+public:
+	publicMotion();
+
+	void setMagData(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
+	
+	void meanFiltData(int time_count, int mag_data, int* mag_data_window, int* mean_mag_data);
+
+	void setSpecialPoint(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
+
+	int getDownData(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
+
+	void setSpecialPoint_part(int mag_data, int* mean_data, int *max_val, int *down_point, int *up_time);
+
+private:
+	int left_front_mag_window[5];
+	int right_front_mag_window[5];
+
+	int left_back_mag_window[5];
+	int right_back_mag_window[5];
+
+	int left_front_mag_mean_window[15];
+	int right_front_mag_mean_window[15];
+
+	int left_back_mag_mean_window[15];
+	int right_back_mag_mean_window[15];
+
+	int motion_time;
+
+	int left_back_mag_point_val;
+	int right_back_mag_point_val;
+
+	int left_front_mag_point_val;
+	int right_front_mag_point_val;
+
+	int left_back_mag_up_max;
+	int right_back_mag_up_max;
+
+	int left_front_mag_up_max;
+	int right_front_mag_up_max;
+
+	int left_front_up_time;
+	int right_front_up_time;
+	
+	int left_back_up_time;
+	int right_back_up_time;
+
+};
+
+
+#endif

+ 22 - 0
RunGame/SDK/shoes_sdk/testGame.cpp

@@ -0,0 +1,22 @@
+
+#include "testGame.h"
+
+testGame::testGame()
+{
+	for (int i = 0; i < 4; i++)
+	{
+		result[i] = 0;
+	}
+}
+
+void testGame::Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
+	int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
+	int jump, int down, int rssi)
+{
+	
+}
+
+void testGame::getResult(int* matrix)
+{
+	memcpy(matrix, result, 4 * sizeof(int));
+}

+ 24 - 0
RunGame/SDK/shoes_sdk/testGame.h

@@ -0,0 +1,24 @@
+#pragma once
+#ifndef __test_game_h__
+#define __test_game_h__
+
+#include <iostream>
+
+class testGame {
+
+public:
+	testGame();
+
+	//void Process(int* right_pos, int* right_att, int right_zupt, int* left_pos, int* left_att, int left_zupt, int jump, int down, int rssi);
+	void Process(int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_press,
+		int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_press,
+		int jump, int down, int rssi);
+
+	void getResult(int* matrix);
+
+private:
+
+	int result[4];
+};
+
+#endif

+ 176 - 158
RunGame/Unity-iPhone.xcodeproj/project.pbxproj

@@ -222,51 +222,6 @@
 		93D3D17527797663006D26A0 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0C027797662006D26A0 /* AFSecurityPolicy.m */; };
 		93D3D17627797663006D26A0 /* AFCompatibilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0C127797662006D26A0 /* AFCompatibilityMacros.h */; };
 		93D3D17727797663006D26A0 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0C227797662006D26A0 /* AFHTTPSessionManager.h */; };
-		93D3D17827797663006D26A0 /* MonsterH5.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0C427797662006D26A0 /* MonsterH5.h */; };
-		93D3D17927797663006D26A0 /* DanceFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0C527797662006D26A0 /* DanceFoot.cpp */; };
-		93D3D17A27797663006D26A0 /* DanceFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0C527797662006D26A0 /* DanceFoot.cpp */; };
-		93D3D17B27797663006D26A0 /* RunGame.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0C627797662006D26A0 /* RunGame.h */; };
-		93D3D17C27797663006D26A0 /* FootStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0C727797662006D26A0 /* FootStep.cpp */; };
-		93D3D17D27797663006D26A0 /* FootStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0C727797662006D26A0 /* FootStep.cpp */; };
-		93D3D17E27797663006D26A0 /* Tricycle.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0C827797662006D26A0 /* Tricycle.h */; };
-		93D3D17F27797663006D26A0 /* RuinsExplore.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0C927797662006D26A0 /* RuinsExplore.h */; };
-		93D3D18027797663006D26A0 /* DanceGame.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0CA27797662006D26A0 /* DanceGame.h */; };
-		93D3D18127797663006D26A0 /* OriginTraj.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0CB27797662006D26A0 /* OriginTraj.h */; };
-		93D3D18227797663006D26A0 /* MonsterH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0CC27797662006D26A0 /* MonsterH5.cpp */; };
-		93D3D18327797663006D26A0 /* MonsterH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0CC27797662006D26A0 /* MonsterH5.cpp */; };
-		93D3D18427797663006D26A0 /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0CD27797662006D26A0 /* BigFoot.cpp */; };
-		93D3D18527797663006D26A0 /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0CD27797662006D26A0 /* BigFoot.cpp */; };
-		93D3D18627797663006D26A0 /* Interaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0CE27797662006D26A0 /* Interaction.cpp */; };
-		93D3D18727797663006D26A0 /* Interaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0CE27797662006D26A0 /* Interaction.cpp */; };
-		93D3D18827797663006D26A0 /* SingleFootAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0CF27797662006D26A0 /* SingleFootAction.h */; };
-		93D3D18927797663006D26A0 /* Interaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D027797662006D26A0 /* Interaction.h */; };
-		93D3D18A27797663006D26A0 /* pub.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D127797662006D26A0 /* pub.h */; };
-		93D3D18B27797663006D26A0 /* DanceFoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D227797662006D26A0 /* DanceFoot.h */; };
-		93D3D18C27797663006D26A0 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0D327797662006D26A0 /* Tricycle.cpp */; };
-		93D3D18D27797663006D26A0 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0D327797662006D26A0 /* Tricycle.cpp */; };
-		93D3D18E27797663006D26A0 /* FootStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D427797662006D26A0 /* FootStep.h */; };
-		93D3D18F27797663006D26A0 /* SingleFootAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0D527797662006D26A0 /* SingleFootAction.cpp */; };
-		93D3D19027797663006D26A0 /* SingleFootAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0D527797662006D26A0 /* SingleFootAction.cpp */; };
-		93D3D19127797663006D26A0 /* BigFoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D627797662006D26A0 /* BigFoot.h */; };
-		93D3D19227797663006D26A0 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0D727797662006D26A0 /* RuinsExplore.cpp */; };
-		93D3D19327797663006D26A0 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0D727797662006D26A0 /* RuinsExplore.cpp */; };
-		93D3D19427797663006D26A0 /* InertialTrajProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D827797662006D26A0 /* InertialTrajProcess.h */; };
-		93D3D19527797663006D26A0 /* Game.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0D927797662006D26A0 /* Game.h */; };
-		93D3D19627797663006D26A0 /* DanceGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DA27797662006D26A0 /* DanceGame.cpp */; };
-		93D3D19727797663006D26A0 /* DanceGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DA27797662006D26A0 /* DanceGame.cpp */; };
-		93D3D19827797663006D26A0 /* jumpH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DB27797662006D26A0 /* jumpH5.cpp */; };
-		93D3D19927797663006D26A0 /* jumpH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DB27797662006D26A0 /* jumpH5.cpp */; };
-		93D3D19A27797663006D26A0 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 93D3D0DC27797662006D26A0 /* ReadMe.txt */; };
-		93D3D19B27797663006D26A0 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 93D3D0DC27797662006D26A0 /* ReadMe.txt */; };
-		93D3D19C27797663006D26A0 /* OriginTraj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DD27797662006D26A0 /* OriginTraj.cpp */; };
-		93D3D19D27797663006D26A0 /* OriginTraj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DD27797662006D26A0 /* OriginTraj.cpp */; };
-		93D3D19E27797663006D26A0 /* RunGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DE27797662006D26A0 /* RunGame.cpp */; };
-		93D3D19F27797663006D26A0 /* RunGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DE27797662006D26A0 /* RunGame.cpp */; };
-		93D3D1A027797663006D26A0 /* InertialTrajProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DF27797662006D26A0 /* InertialTrajProcess.cpp */; };
-		93D3D1A127797663006D26A0 /* InertialTrajProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0DF27797662006D26A0 /* InertialTrajProcess.cpp */; };
-		93D3D1A227797663006D26A0 /* jumpH5.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0E027797662006D26A0 /* jumpH5.h */; };
-		93D3D1A327797663006D26A0 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0E127797662006D26A0 /* Game.cpp */; };
-		93D3D1A427797663006D26A0 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93D3D0E127797662006D26A0 /* Game.cpp */; };
 		93D3D1A527797663006D26A0 /* IOSPlatformSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D3D0E227797662006D26A0 /* IOSPlatformSDK.h */; };
 		93D3D1A627797663006D26A0 /* 组24@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93D3D0E427797662006D26A0 /* 组24@3x.png */; };
 		93D3D1A727797663006D26A0 /* 组24@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93D3D0E427797662006D26A0 /* 组24@3x.png */; };
@@ -393,6 +348,55 @@
 		93D3D22B27797758006D26A0 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D3D22A27797758006D26A0 /* MobileCoreServices.framework */; };
 		93D3D22D2779775D006D26A0 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D3D22C2779775C006D26A0 /* libz.tbd */; };
 		93D3D22F27797762006D26A0 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D3D22E27797762006D26A0 /* libc++.tbd */; };
+		93E737E1278BD6970017A553 /* pub.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C0278BD6940017A553 /* pub.h */; };
+		93E737E2278BD6970017A553 /* Game.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C1278BD6940017A553 /* Game.h */; };
+		93E737E3278BD6970017A553 /* testGame.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C2278BD6940017A553 /* testGame.h */; };
+		93E737E4278BD6970017A553 /* publicMotion.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C3278BD6940017A553 /* publicMotion.h */; };
+		93E737E5278BD6970017A553 /* InertialTrajProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C4278BD6940017A553 /* InertialTrajProcess.h */; };
+		93E737E6278BD6970017A553 /* DanceGame.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C5278BD6950017A553 /* DanceGame.h */; };
+		93E737E7278BD6970017A553 /* jumpH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737C6278BD6950017A553 /* jumpH5.cpp */; };
+		93E737E8278BD6970017A553 /* jumpH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737C6278BD6950017A553 /* jumpH5.cpp */; };
+		93E737E9278BD6970017A553 /* FootStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737C7278BD6950017A553 /* FootStep.h */; };
+		93E737EA278BD6970017A553 /* InertialTrajProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737C8278BD6950017A553 /* InertialTrajProcess.cpp */; };
+		93E737EB278BD6970017A553 /* InertialTrajProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737C8278BD6950017A553 /* InertialTrajProcess.cpp */; };
+		93E737EC278BD6970017A553 /* RunGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737C9278BD6950017A553 /* RunGame.cpp */; };
+		93E737ED278BD6970017A553 /* RunGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737C9278BD6950017A553 /* RunGame.cpp */; };
+		93E737EE278BD6970017A553 /* BigFoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737CA278BD6950017A553 /* BigFoot.h */; };
+		93E737EF278BD6970017A553 /* SingleFootAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737CB278BD6950017A553 /* SingleFootAction.cpp */; };
+		93E737F0278BD6970017A553 /* SingleFootAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737CB278BD6950017A553 /* SingleFootAction.cpp */; };
+		93E737F1278BD6970017A553 /* Tricycle.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737CC278BD6950017A553 /* Tricycle.h */; };
+		93E737F2278BD6970017A553 /* SingleFootAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737CD278BD6950017A553 /* SingleFootAction.h */; };
+		93E737F3278BD6970017A553 /* MonsterH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737CE278BD6950017A553 /* MonsterH5.cpp */; };
+		93E737F4278BD6970017A553 /* MonsterH5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737CE278BD6950017A553 /* MonsterH5.cpp */; };
+		93E737F5278BD6970017A553 /* FootStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737CF278BD6950017A553 /* FootStep.cpp */; };
+		93E737F6278BD6970017A553 /* FootStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737CF278BD6950017A553 /* FootStep.cpp */; };
+		93E737F7278BD6970017A553 /* RuinsExplore.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737D0278BD6950017A553 /* RuinsExplore.h */; };
+		93E737F8278BD6970017A553 /* jumpH5.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737D1278BD6950017A553 /* jumpH5.h */; };
+		93E737F9278BD6970017A553 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D2278BD6950017A553 /* Game.cpp */; };
+		93E737FA278BD6970017A553 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D2278BD6950017A553 /* Game.cpp */; };
+		93E737FB278BD6970017A553 /* DanceFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D3278BD6960017A553 /* DanceFoot.cpp */; };
+		93E737FC278BD6970017A553 /* DanceFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D3278BD6960017A553 /* DanceFoot.cpp */; };
+		93E737FD278BD6970017A553 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D4278BD6960017A553 /* Tricycle.cpp */; };
+		93E737FE278BD6970017A553 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D4278BD6960017A553 /* Tricycle.cpp */; };
+		93E737FF278BD6970017A553 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D5278BD6960017A553 /* RuinsExplore.cpp */; };
+		93E73800278BD6970017A553 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D5278BD6960017A553 /* RuinsExplore.cpp */; };
+		93E73801278BD6970017A553 /* OriginTraj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D6278BD6960017A553 /* OriginTraj.cpp */; };
+		93E73802278BD6970017A553 /* OriginTraj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D6278BD6960017A553 /* OriginTraj.cpp */; };
+		93E73803278BD6970017A553 /* testGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D7278BD6960017A553 /* testGame.cpp */; };
+		93E73804278BD6970017A553 /* testGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D7278BD6960017A553 /* testGame.cpp */; };
+		93E73805278BD6970017A553 /* DanceGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D8278BD6960017A553 /* DanceGame.cpp */; };
+		93E73806278BD6970017A553 /* DanceGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D8278BD6960017A553 /* DanceGame.cpp */; };
+		93E73807278BD6970017A553 /* publicMotion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D9278BD6960017A553 /* publicMotion.cpp */; };
+		93E73808278BD6970017A553 /* publicMotion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737D9278BD6960017A553 /* publicMotion.cpp */; };
+		93E73809278BD6970017A553 /* DanceFoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737DA278BD6960017A553 /* DanceFoot.h */; };
+		93E7380A278BD6970017A553 /* RunGame.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737DB278BD6960017A553 /* RunGame.h */; };
+		93E7380B278BD6970017A553 /* OriginTraj.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737DC278BD6960017A553 /* OriginTraj.h */; };
+		93E7380C278BD6970017A553 /* Interaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737DD278BD6960017A553 /* Interaction.cpp */; };
+		93E7380D278BD6970017A553 /* Interaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737DD278BD6960017A553 /* Interaction.cpp */; };
+		93E7380E278BD6970017A553 /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737DE278BD6960017A553 /* BigFoot.cpp */; };
+		93E7380F278BD6970017A553 /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E737DE278BD6960017A553 /* BigFoot.cpp */; };
+		93E73810278BD6970017A553 /* Interaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737DF278BD6960017A553 /* Interaction.h */; };
+		93E73811278BD6970017A553 /* MonsterH5.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E737E0278BD6960017A553 /* MonsterH5.h */; };
 		9455416CA37DCB24F84AAAAC /* System.Diagnostics.StackTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D304888B6D2CB1AC203A26B /* System.Diagnostics.StackTrace.cpp */; };
 		94D347778B9DCDB11873288C /* Il2CppAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85044D7EB7EF8D8255B9DF9D /* Il2CppAttributes.cpp */; };
 		960B411583238B14F5192BC1 /* mscorlib2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8EC4C598F83628F813666F5 /* mscorlib2.cpp */; };
@@ -902,36 +906,6 @@
 		93D3D0C027797662006D26A0 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicy.m; sourceTree = "<group>"; };
 		93D3D0C127797662006D26A0 /* AFCompatibilityMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFCompatibilityMacros.h; sourceTree = "<group>"; };
 		93D3D0C227797662006D26A0 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPSessionManager.h; sourceTree = "<group>"; };
-		93D3D0C427797662006D26A0 /* MonsterH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MonsterH5.h; sourceTree = "<group>"; };
-		93D3D0C527797662006D26A0 /* DanceFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceFoot.cpp; sourceTree = "<group>"; };
-		93D3D0C627797662006D26A0 /* RunGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunGame.h; sourceTree = "<group>"; };
-		93D3D0C727797662006D26A0 /* FootStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FootStep.cpp; sourceTree = "<group>"; };
-		93D3D0C827797662006D26A0 /* Tricycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tricycle.h; sourceTree = "<group>"; };
-		93D3D0C927797662006D26A0 /* RuinsExplore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuinsExplore.h; sourceTree = "<group>"; };
-		93D3D0CA27797662006D26A0 /* DanceGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceGame.h; sourceTree = "<group>"; };
-		93D3D0CB27797662006D26A0 /* OriginTraj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OriginTraj.h; sourceTree = "<group>"; };
-		93D3D0CC27797662006D26A0 /* MonsterH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MonsterH5.cpp; sourceTree = "<group>"; };
-		93D3D0CD27797662006D26A0 /* BigFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BigFoot.cpp; sourceTree = "<group>"; };
-		93D3D0CE27797662006D26A0 /* Interaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Interaction.cpp; sourceTree = "<group>"; };
-		93D3D0CF27797662006D26A0 /* SingleFootAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleFootAction.h; sourceTree = "<group>"; };
-		93D3D0D027797662006D26A0 /* Interaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interaction.h; sourceTree = "<group>"; };
-		93D3D0D127797662006D26A0 /* pub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pub.h; sourceTree = "<group>"; };
-		93D3D0D227797662006D26A0 /* DanceFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceFoot.h; sourceTree = "<group>"; };
-		93D3D0D327797662006D26A0 /* Tricycle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Tricycle.cpp; sourceTree = "<group>"; };
-		93D3D0D427797662006D26A0 /* FootStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootStep.h; sourceTree = "<group>"; };
-		93D3D0D527797662006D26A0 /* SingleFootAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleFootAction.cpp; sourceTree = "<group>"; };
-		93D3D0D627797662006D26A0 /* BigFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigFoot.h; sourceTree = "<group>"; };
-		93D3D0D727797662006D26A0 /* RuinsExplore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuinsExplore.cpp; sourceTree = "<group>"; };
-		93D3D0D827797662006D26A0 /* InertialTrajProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InertialTrajProcess.h; sourceTree = "<group>"; };
-		93D3D0D927797662006D26A0 /* Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Game.h; sourceTree = "<group>"; };
-		93D3D0DA27797662006D26A0 /* DanceGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceGame.cpp; sourceTree = "<group>"; };
-		93D3D0DB27797662006D26A0 /* jumpH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jumpH5.cpp; sourceTree = "<group>"; };
-		93D3D0DC27797662006D26A0 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
-		93D3D0DD27797662006D26A0 /* OriginTraj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OriginTraj.cpp; sourceTree = "<group>"; };
-		93D3D0DE27797662006D26A0 /* RunGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunGame.cpp; sourceTree = "<group>"; };
-		93D3D0DF27797662006D26A0 /* InertialTrajProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InertialTrajProcess.cpp; sourceTree = "<group>"; };
-		93D3D0E027797662006D26A0 /* jumpH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jumpH5.h; sourceTree = "<group>"; };
-		93D3D0E127797662006D26A0 /* Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Game.cpp; sourceTree = "<group>"; };
 		93D3D0E227797662006D26A0 /* IOSPlatformSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSPlatformSDK.h; sourceTree = "<group>"; };
 		93D3D0E427797662006D26A0 /* 组24@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "组24@3x.png"; sourceTree = "<group>"; };
 		93D3D0E527797662006D26A0 /* pop_image_circle@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pop_image_circle@3x.png"; sourceTree = "<group>"; };
@@ -1001,6 +975,39 @@
 		93D3D22A27797758006D26A0 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/iOSSupport/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };
 		93D3D22C2779775C006D26A0 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
 		93D3D22E27797762006D26A0 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; };
+		93E737C0278BD6940017A553 /* pub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pub.h; sourceTree = "<group>"; };
+		93E737C1278BD6940017A553 /* Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Game.h; sourceTree = "<group>"; };
+		93E737C2278BD6940017A553 /* testGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testGame.h; sourceTree = "<group>"; };
+		93E737C3278BD6940017A553 /* publicMotion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = publicMotion.h; sourceTree = "<group>"; };
+		93E737C4278BD6940017A553 /* InertialTrajProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InertialTrajProcess.h; sourceTree = "<group>"; };
+		93E737C5278BD6950017A553 /* DanceGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceGame.h; sourceTree = "<group>"; };
+		93E737C6278BD6950017A553 /* jumpH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jumpH5.cpp; sourceTree = "<group>"; };
+		93E737C7278BD6950017A553 /* FootStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootStep.h; sourceTree = "<group>"; };
+		93E737C8278BD6950017A553 /* InertialTrajProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InertialTrajProcess.cpp; sourceTree = "<group>"; };
+		93E737C9278BD6950017A553 /* RunGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunGame.cpp; sourceTree = "<group>"; };
+		93E737CA278BD6950017A553 /* BigFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigFoot.h; sourceTree = "<group>"; };
+		93E737CB278BD6950017A553 /* SingleFootAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleFootAction.cpp; sourceTree = "<group>"; };
+		93E737CC278BD6950017A553 /* Tricycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tricycle.h; sourceTree = "<group>"; };
+		93E737CD278BD6950017A553 /* SingleFootAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleFootAction.h; sourceTree = "<group>"; };
+		93E737CE278BD6950017A553 /* MonsterH5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MonsterH5.cpp; sourceTree = "<group>"; };
+		93E737CF278BD6950017A553 /* FootStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FootStep.cpp; sourceTree = "<group>"; };
+		93E737D0278BD6950017A553 /* RuinsExplore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuinsExplore.h; sourceTree = "<group>"; };
+		93E737D1278BD6950017A553 /* jumpH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jumpH5.h; sourceTree = "<group>"; };
+		93E737D2278BD6950017A553 /* Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Game.cpp; sourceTree = "<group>"; };
+		93E737D3278BD6960017A553 /* DanceFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceFoot.cpp; sourceTree = "<group>"; };
+		93E737D4278BD6960017A553 /* Tricycle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Tricycle.cpp; sourceTree = "<group>"; };
+		93E737D5278BD6960017A553 /* RuinsExplore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuinsExplore.cpp; sourceTree = "<group>"; };
+		93E737D6278BD6960017A553 /* OriginTraj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OriginTraj.cpp; sourceTree = "<group>"; };
+		93E737D7278BD6960017A553 /* testGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testGame.cpp; sourceTree = "<group>"; };
+		93E737D8278BD6960017A553 /* DanceGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DanceGame.cpp; sourceTree = "<group>"; };
+		93E737D9278BD6960017A553 /* publicMotion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = publicMotion.cpp; sourceTree = "<group>"; };
+		93E737DA278BD6960017A553 /* DanceFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DanceFoot.h; sourceTree = "<group>"; };
+		93E737DB278BD6960017A553 /* RunGame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunGame.h; sourceTree = "<group>"; };
+		93E737DC278BD6960017A553 /* OriginTraj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OriginTraj.h; sourceTree = "<group>"; };
+		93E737DD278BD6960017A553 /* Interaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Interaction.cpp; sourceTree = "<group>"; };
+		93E737DE278BD6960017A553 /* BigFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BigFoot.cpp; sourceTree = "<group>"; };
+		93E737DF278BD6960017A553 /* Interaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interaction.h; sourceTree = "<group>"; };
+		93E737E0278BD6960017A553 /* MonsterH5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MonsterH5.h; sourceTree = "<group>"; };
 		94EE4D6E94A5583A570AFF92 /* GenericMethods5.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GenericMethods5.cpp; path = Classes/Native/GenericMethods5.cpp; sourceTree = SOURCE_ROOT; };
 		95114C51BBF1DED7AB4923CC /* Generics22.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Generics22.cpp; path = Classes/Native/Generics22.cpp; sourceTree = SOURCE_ROOT; };
 		960391211D6CE46E003BF157 /* MediaToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaToolbox.framework; path = System/Library/Frameworks/MediaToolbox.framework; sourceTree = SDKROOT; };
@@ -1577,11 +1584,11 @@
 		93D3D07B27797662006D26A0 /* SDK */ = {
 			isa = PBXGroup;
 			children = (
+				93D3D0E227797662006D26A0 /* IOSPlatformSDK.h */,
+				93D3D0B027797662006D26A0 /* IOSPlatformSDK.mm */,
 				93D3D09727797662006D26A0 /* BLE */,
 				93D3D0A727797662006D26A0 /* Entity   */,
 				93D3D0B127797662006D26A0 /* HTTP */,
-				93D3D0E227797662006D26A0 /* IOSPlatformSDK.h */,
-				93D3D0B027797662006D26A0 /* IOSPlatformSDK.mm */,
 				93D3D0E327797662006D26A0 /* resources   */,
 				93D3D0C327797662006D26A0 /* shoes_sdk */,
 				93D3D0AA27797662006D26A0 /* ThirdClass */,
@@ -1734,36 +1741,39 @@
 		93D3D0C327797662006D26A0 /* shoes_sdk */ = {
 			isa = PBXGroup;
 			children = (
-				93D3D0C427797662006D26A0 /* MonsterH5.h */,
-				93D3D0C527797662006D26A0 /* DanceFoot.cpp */,
-				93D3D0C627797662006D26A0 /* RunGame.h */,
-				93D3D0C727797662006D26A0 /* FootStep.cpp */,
-				93D3D0C827797662006D26A0 /* Tricycle.h */,
-				93D3D0C927797662006D26A0 /* RuinsExplore.h */,
-				93D3D0CA27797662006D26A0 /* DanceGame.h */,
-				93D3D0CB27797662006D26A0 /* OriginTraj.h */,
-				93D3D0CC27797662006D26A0 /* MonsterH5.cpp */,
-				93D3D0CD27797662006D26A0 /* BigFoot.cpp */,
-				93D3D0CE27797662006D26A0 /* Interaction.cpp */,
-				93D3D0CF27797662006D26A0 /* SingleFootAction.h */,
-				93D3D0D027797662006D26A0 /* Interaction.h */,
-				93D3D0D127797662006D26A0 /* pub.h */,
-				93D3D0D227797662006D26A0 /* DanceFoot.h */,
-				93D3D0D327797662006D26A0 /* Tricycle.cpp */,
-				93D3D0D427797662006D26A0 /* FootStep.h */,
-				93D3D0D527797662006D26A0 /* SingleFootAction.cpp */,
-				93D3D0D627797662006D26A0 /* BigFoot.h */,
-				93D3D0D727797662006D26A0 /* RuinsExplore.cpp */,
-				93D3D0D827797662006D26A0 /* InertialTrajProcess.h */,
-				93D3D0D927797662006D26A0 /* Game.h */,
-				93D3D0DA27797662006D26A0 /* DanceGame.cpp */,
-				93D3D0DB27797662006D26A0 /* jumpH5.cpp */,
-				93D3D0DC27797662006D26A0 /* ReadMe.txt */,
-				93D3D0DD27797662006D26A0 /* OriginTraj.cpp */,
-				93D3D0DE27797662006D26A0 /* RunGame.cpp */,
-				93D3D0DF27797662006D26A0 /* InertialTrajProcess.cpp */,
-				93D3D0E027797662006D26A0 /* jumpH5.h */,
-				93D3D0E127797662006D26A0 /* Game.cpp */,
+				93E737DE278BD6960017A553 /* BigFoot.cpp */,
+				93E737CA278BD6950017A553 /* BigFoot.h */,
+				93E737D3278BD6960017A553 /* DanceFoot.cpp */,
+				93E737DA278BD6960017A553 /* DanceFoot.h */,
+				93E737D8278BD6960017A553 /* DanceGame.cpp */,
+				93E737C5278BD6950017A553 /* DanceGame.h */,
+				93E737CF278BD6950017A553 /* FootStep.cpp */,
+				93E737C7278BD6950017A553 /* FootStep.h */,
+				93E737D2278BD6950017A553 /* Game.cpp */,
+				93E737C1278BD6940017A553 /* Game.h */,
+				93E737C8278BD6950017A553 /* InertialTrajProcess.cpp */,
+				93E737C4278BD6940017A553 /* InertialTrajProcess.h */,
+				93E737DD278BD6960017A553 /* Interaction.cpp */,
+				93E737DF278BD6960017A553 /* Interaction.h */,
+				93E737C6278BD6950017A553 /* jumpH5.cpp */,
+				93E737D1278BD6950017A553 /* jumpH5.h */,
+				93E737CE278BD6950017A553 /* MonsterH5.cpp */,
+				93E737E0278BD6960017A553 /* MonsterH5.h */,
+				93E737D6278BD6960017A553 /* OriginTraj.cpp */,
+				93E737DC278BD6960017A553 /* OriginTraj.h */,
+				93E737C0278BD6940017A553 /* pub.h */,
+				93E737D9278BD6960017A553 /* publicMotion.cpp */,
+				93E737C3278BD6940017A553 /* publicMotion.h */,
+				93E737D5278BD6960017A553 /* RuinsExplore.cpp */,
+				93E737D0278BD6950017A553 /* RuinsExplore.h */,
+				93E737C9278BD6950017A553 /* RunGame.cpp */,
+				93E737DB278BD6960017A553 /* RunGame.h */,
+				93E737CB278BD6950017A553 /* SingleFootAction.cpp */,
+				93E737CD278BD6950017A553 /* SingleFootAction.h */,
+				93E737D7278BD6960017A553 /* testGame.cpp */,
+				93E737C2278BD6940017A553 /* testGame.h */,
+				93E737D4278BD6960017A553 /* Tricycle.cpp */,
+				93E737CC278BD6950017A553 /* Tricycle.h */,
 			);
 			path = shoes_sdk;
 			sourceTree = "<group>";
@@ -1833,15 +1843,15 @@
 		93D3D11427797662006D26A0 /* Tool */ = {
 			isa = PBXGroup;
 			children = (
-				93D3D11527797662006D26A0 /* GameObjc.h */,
-				93D3D11627797662006D26A0 /* AlgorithmTool.m */,
-				93D3D11727797662006D26A0 /* UIColor+Hex.m */,
-				93D3D11827797662006D26A0 /* UIView+ST.h */,
-				93D3D11927797662006D26A0 /* MYFactoryManager.h */,
-				93D3D11A27797662006D26A0 /* UIColor+Hex.h */,
 				93D3D11B27797662006D26A0 /* AlgorithmTool.h */,
+				93D3D11627797662006D26A0 /* AlgorithmTool.m */,
+				93D3D11527797662006D26A0 /* GameObjc.h */,
 				93D3D11C27797662006D26A0 /* GameObjc.mm */,
+				93D3D11927797662006D26A0 /* MYFactoryManager.h */,
 				93D3D11D27797662006D26A0 /* MYFactoryManager.m */,
+				93D3D11A27797662006D26A0 /* UIColor+Hex.h */,
+				93D3D11727797662006D26A0 /* UIColor+Hex.m */,
+				93D3D11827797662006D26A0 /* UIView+ST.h */,
 				93D3D11E27797662006D26A0 /* UIView+ST.m */,
 			);
 			path = Tool;
@@ -1924,63 +1934,65 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				93D3D18E27797663006D26A0 /* FootStep.h in Headers */,
 				93D3D16627797662006D26A0 /* AFURLSessionManager.h in Headers */,
+				93E737F8278BD6970017A553 /* jumpH5.h in Headers */,
+				93E737E9278BD6970017A553 /* FootStep.h in Headers */,
 				93D3D12127797662006D26A0 /* TXCarouselViewLayout.h in Headers */,
-				93D3D19427797663006D26A0 /* InertialTrajProcess.h in Headers */,
 				93D3D16327797662006D26A0 /* HTTPDataProcession.h in Headers */,
+				93E737E3278BD6970017A553 /* testGame.h in Headers */,
+				93E7380A278BD6970017A553 /* RunGame.h in Headers */,
 				93D3D13A27797662006D26A0 /* NoDeviceTip.h in Headers */,
 				93D3D14627797662006D26A0 /* BTDataProcess.h in Headers */,
 				93BB27AD2785978B0019B85C /* SocketRocketUtility.h in Headers */,
+				93E737E2278BD6970017A553 /* Game.h in Headers */,
 				93D3D12A27797662006D26A0 /* TXCarouselView.h in Headers */,
 				93D3D1A527797663006D26A0 /* IOSPlatformSDK.h in Headers */,
 				93D3D20927797663006D26A0 /* UIView+ST.h in Headers */,
 				93D3D16727797662006D26A0 /* AFURLRequestSerialization.h in Headers */,
-				93D3D19527797663006D26A0 /* Game.h in Headers */,
 				9DC67E8821CBBED5005F9FA1 /* RenderPluginDelegate.h in Headers */,
-				93D3D1A227797663006D26A0 /* jumpH5.h in Headers */,
 				93D3D12527797662006D26A0 /* TXCarouselCollectionViewCell.h in Headers */,
-				93D3D17B27797663006D26A0 /* RunGame.h in Headers */,
 				93D3D15527797662006D26A0 /* DebugView.h in Headers */,
-				93D3D17827797663006D26A0 /* MonsterH5.h in Headers */,
+				93E737F7278BD6970017A553 /* RuinsExplore.h in Headers */,
 				93D3D20C27797663006D26A0 /* AlgorithmTool.h in Headers */,
-				93D3D19127797663006D26A0 /* BigFoot.h in Headers */,
-				93D3D18827797663006D26A0 /* SingleFootAction.h in Headers */,
 				93D3D15427797662006D26A0 /* MainShoesAnalysis.h in Headers */,
 				93D3D14F27797662006D26A0 /* BTDataSend.h in Headers */,
 				9DC67E8521CBBEBB005F9FA1 /* UnityAppController.h in Headers */,
+				93E73810278BD6970017A553 /* Interaction.h in Headers */,
 				93D3D16427797662006D26A0 /* AFSecurityPolicy.h in Headers */,
 				93BB27A8278597830019B85C /* SRWebSocket.h in Headers */,
+				93E7380B278BD6970017A553 /* OriginTraj.h in Headers */,
+				93E737E1278BD6970017A553 /* pub.h in Headers */,
 				93D3D17127797663006D26A0 /* AFNetworking.h in Headers */,
+				93E737F2278BD6970017A553 /* SingleFootAction.h in Headers */,
+				93E737E4278BD6970017A553 /* publicMotion.h in Headers */,
 				93D3D17627797663006D26A0 /* AFCompatibilityMacros.h in Headers */,
 				9D25ABA1213FB47800354C27 /* UnityFramework.h in Headers */,
 				93D3D14027797662006D26A0 /* SearchDeviceViewController.h in Headers */,
 				93D3D13227797662006D26A0 /* TXCarouselCellModel.h in Headers */,
-				93D3D18A27797663006D26A0 /* pub.h in Headers */,
 				93D3D12227797662006D26A0 /* ShoesCarouselView.h in Headers */,
-				93D3D18027797663006D26A0 /* DanceGame.h in Headers */,
 				93D3D13D27797662006D26A0 /* AnimationView.h in Headers */,
+				93E737E5278BD6970017A553 /* InertialTrajProcess.h in Headers */,
 				93D3D20A27797663006D26A0 /* MYFactoryManager.h in Headers */,
 				93D3D15927797662006D26A0 /* UserFriendsModel.h in Headers */,
-				93D3D18127797663006D26A0 /* OriginTraj.h in Headers */,
+				93E737F1278BD6970017A553 /* Tricycle.h in Headers */,
 				93D3D15C27797662006D26A0 /* MBProgressHUD.h in Headers */,
+				93E73809278BD6970017A553 /* DanceFoot.h in Headers */,
 				9DC67E8621CBBEC7005F9FA1 /* UndefinePlatforms.h in Headers */,
 				93D3D13727797662006D26A0 /* PopupView.h in Headers */,
-				93D3D18927797663006D26A0 /* Interaction.h in Headers */,
 				93D3D14327797662006D26A0 /* LEONBLManager.h in Headers */,
-				93D3D17F27797663006D26A0 /* RuinsExplore.h in Headers */,
 				93D3D20427797663006D26A0 /* GameObjc.h in Headers */,
+				93E73811278BD6970017A553 /* MonsterH5.h in Headers */,
+				93E737E6278BD6970017A553 /* DanceGame.h in Headers */,
 				93D3D16527797662006D26A0 /* AFNetworkReachabilityManager.h in Headers */,
+				93E737EE278BD6970017A553 /* BigFoot.h in Headers */,
 				93D3D16C27797662006D26A0 /* AFURLResponseSerialization.h in Headers */,
 				93D3D12F27797662006D26A0 /* ShoesCollectionCell.h in Headers */,
 				93D3D15327797662006D26A0 /* ViceShoesAnalysis.h in Headers */,
 				93D3D15227797662006D26A0 /* CBPeripheral+ADName.h in Headers */,
 				93D3D17727797663006D26A0 /* AFHTTPSessionManager.h in Headers */,
-				93D3D17E27797663006D26A0 /* Tricycle.h in Headers */,
 				93D3D20B27797663006D26A0 /* UIColor+Hex.h in Headers */,
 				9DC67E8721CBBEC7005F9FA1 /* RedefinePlatforms.h in Headers */,
 				9DC67E8921CBBEDF005F9FA1 /* LifeCycleListener.h in Headers */,
-				93D3D18B27797663006D26A0 /* DanceFoot.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2124,7 +2136,6 @@
 				93D3D1DA27797663006D26A0 /* gamepop_shoes.png in Resources */,
 				93D3D1AC27797663006D26A0 /* pop_image_shoes.png in Resources */,
 				93D3D12827797662006D26A0 /* ShoesCollectionCell.xib in Resources */,
-				93D3D19A27797663006D26A0 /* ReadMe.txt in Resources */,
 				93D3D1BE27797663006D26A0 /* gamepop_shoes@3x.png in Resources */,
 				93D3D1DC27797663006D26A0 /* gamepop_close_notes.png in Resources */,
 				93D3D1CA27797663006D26A0 /* gamepop_leftarrow.png in Resources */,
@@ -2193,7 +2204,6 @@
 				93D3D1D327797663006D26A0 /* gamepop_close.png in Resources */,
 				93D3D1B927797663006D26A0 /* gamepop_rihgtarrow_notes.png in Resources */,
 				93D3D1D927797663006D26A0 /* gamepop_leftarrow_notes@2x.png in Resources */,
-				93D3D19B27797663006D26A0 /* ReadMe.txt in Resources */,
 				93D3D1A727797663006D26A0 /* 组24@3x.png in Resources */,
 				93D3D1C927797663006D26A0 /* gamepop_determine@2x.png in Resources */,
 				93D3D1E527797663006D26A0 /* gamepop_leftarrow@2x.png in Resources */,
@@ -2247,50 +2257,52 @@
 				93BB27AB2785978B0019B85C /* SocketRocketUtility.m in Sources */,
 				93D3D17427797663006D26A0 /* AFSecurityPolicy.m in Sources */,
 				93D3D16D27797663006D26A0 /* AFURLSessionManager.m in Sources */,
+				93E737F3278BD6970017A553 /* MonsterH5.cpp in Sources */,
 				93D3D13027797662006D26A0 /* TXCarouselCollectionViewCell.m in Sources */,
-				93D3D18F27797663006D26A0 /* SingleFootAction.cpp in Sources */,
+				93E73803278BD6970017A553 /* testGame.cpp in Sources */,
 				93D3D15F27797662006D26A0 /* IOSPlatformSDK.mm in Sources */,
 				93D3D13327797662006D26A0 /* TXCarouselView.m in Sources */,
 				93D3D13B27797662006D26A0 /* NoDeviceTip.m in Sources */,
-				93D3D18C27797663006D26A0 /* Tricycle.cpp in Sources */,
-				93D3D19827797663006D26A0 /* jumpH5.cpp in Sources */,
-				93D3D19627797663006D26A0 /* DanceGame.cpp in Sources */,
-				93D3D18427797663006D26A0 /* BigFoot.cpp in Sources */,
 				93D3D12627797662006D26A0 /* ShoesCollectionCell.m in Sources */,
 				93D3D12B27797662006D26A0 /* ShoesCarouselView.m in Sources */,
 				9DA3B0442174CB96001678C7 /* main.mm in Sources */,
 				93D3D14127797662006D26A0 /* CBPeripheral+ADName.m in Sources */,
 				93D3D15A27797662006D26A0 /* MBProgressHUD.m in Sources */,
 				93D3D20F27797663006D26A0 /* MYFactoryManager.m in Sources */,
-				93D3D19C27797663006D26A0 /* OriginTraj.cpp in Sources */,
 				93D3D14D27797662006D26A0 /* MainShoesAnalysis.mm in Sources */,
+				93E7380C278BD6970017A553 /* Interaction.cpp in Sources */,
 				93BB27A6278597830019B85C /* SRWebSocket.m in Sources */,
+				93E737F5278BD6970017A553 /* FootStep.cpp in Sources */,
+				93E737EA278BD6970017A553 /* InertialTrajProcess.cpp in Sources */,
 				93D3D14B27797662006D26A0 /* BTDataProcess.mm in Sources */,
+				93E737E7278BD6970017A553 /* jumpH5.cpp in Sources */,
 				93D3D15027797662006D26A0 /* LEONBLManager.m in Sources */,
+				93E737FB278BD6970017A553 /* DanceFoot.cpp in Sources */,
 				93D3D14427797662006D26A0 /* BTDataSend.m in Sources */,
-				93D3D17C27797663006D26A0 /* FootStep.cpp in Sources */,
 				93D3D13E27797662006D26A0 /* AnimationView.m in Sources */,
+				93E737FF278BD6970017A553 /* RuinsExplore.cpp in Sources */,
+				93E737FD278BD6970017A553 /* Tricycle.cpp in Sources */,
+				93E737EF278BD6970017A553 /* SingleFootAction.cpp in Sources */,
 				93D3D13527797662006D26A0 /* PopupView.m in Sources */,
 				93D3D16A27797662006D26A0 /* AFHTTPSessionManager.m in Sources */,
 				93D3D12D27797662006D26A0 /* TXCarouselViewLayout.m in Sources */,
+				93E73801278BD6970017A553 /* OriginTraj.cpp in Sources */,
+				93E73807278BD6970017A553 /* publicMotion.cpp in Sources */,
+				93E737F9278BD6970017A553 /* Game.cpp in Sources */,
 				93D3D14727797662006D26A0 /* ViceShoesAnalysis.m in Sources */,
-				93D3D1A327797663006D26A0 /* Game.cpp in Sources */,
-				93D3D17927797663006D26A0 /* DanceFoot.cpp in Sources */,
 				93D3D20527797663006D26A0 /* AlgorithmTool.m in Sources */,
-				93D3D18627797663006D26A0 /* Interaction.cpp in Sources */,
+				93E73805278BD6970017A553 /* DanceGame.cpp in Sources */,
+				93E7380E278BD6970017A553 /* BigFoot.cpp in Sources */,
 				93D3D21127797663006D26A0 /* UIView+ST.m in Sources */,
 				93D3D17227797663006D26A0 /* AFNetworkReachabilityManager.m in Sources */,
 				93D3D16F27797663006D26A0 /* AFURLRequestSerialization.m in Sources */,
 				93D3D12327797662006D26A0 /* TXCarouselCellModel.m in Sources */,
-				93D3D18227797663006D26A0 /* MonsterH5.cpp in Sources */,
 				93D3D16127797662006D26A0 /* HTTPDataProcession.m in Sources */,
 				93D3D14927797662006D26A0 /* DebugView.m in Sources */,
 				93D3D20D27797663006D26A0 /* GameObjc.mm in Sources */,
-				93D3D19E27797663006D26A0 /* RunGame.cpp in Sources */,
-				93D3D1A027797663006D26A0 /* InertialTrajProcess.cpp in Sources */,
 				93D3D13827797662006D26A0 /* SearchDeviceViewController.m in Sources */,
-				93D3D19227797663006D26A0 /* RuinsExplore.cpp in Sources */,
 				93D3D20727797663006D26A0 /* UIColor+Hex.m in Sources */,
+				93E737EC278BD6970017A553 /* RunGame.cpp in Sources */,
 				93D3D15727797662006D26A0 /* UserFriendsModel.m in Sources */,
 				93D3D16827797662006D26A0 /* AFURLResponseSerialization.m in Sources */,
 			);
@@ -2320,9 +2332,11 @@
 				93D3D14A27797662006D26A0 /* DebugView.m in Sources */,
 				9D25ABB1213FB6D600354C27 /* UnityView+Keyboard.mm in Sources */,
 				93D3D16E27797663006D26A0 /* AFURLSessionManager.m in Sources */,
+				93E73808278BD6970017A553 /* publicMotion.cpp in Sources */,
 				9D25ABC5213FB6F800354C27 /* EAGLContextHelper.mm in Sources */,
 				9D25ABCB213FB6F800354C27 /* UnityReplayKit.mm in Sources */,
 				9D25ABBA213FB6E300354C27 /* UnityView+tvOS.mm in Sources */,
+				93E737ED278BD6970017A553 /* RunGame.cpp in Sources */,
 				9D25ABBB213FB6E300354C27 /* UnityViewControllerBase.mm in Sources */,
 				93D3D15827797662006D26A0 /* UserFriendsModel.m in Sources */,
 				9D25ABCC213FB6F800354C27 /* UnityReplayKit_Scripting.mm in Sources */,
@@ -2338,7 +2352,6 @@
 				9D25ABB6213FB6E300354C27 /* StoreReview.m in Sources */,
 				9D25ABB4213FB6E300354C27 /* OrientationSupport.mm in Sources */,
 				9D25ABAF213FB6BE00354C27 /* RenderPluginDelegate.mm in Sources */,
-				93D3D19927797663006D26A0 /* jumpH5.cpp in Sources */,
 				9D25ABE3213FB76500354C27 /* UnityAppController.mm in Sources */,
 				9D25ABBF213FB6F800354C27 /* AVCapture.mm in Sources */,
 				9D25ABE1213FB76500354C27 /* iPhone_Sensors.mm in Sources */,
@@ -2346,7 +2359,6 @@
 				9D25ABC6213FB6F800354C27 /* Filesystem.mm in Sources */,
 				9D25ABB8213FB6E300354C27 /* UnityView.mm in Sources */,
 				9DFA7F9D21410F2E00C2880E /* main.mm in Sources */,
-				93D3D1A127797663006D26A0 /* InertialTrajProcess.cpp in Sources */,
 				9D25ABC7213FB6F800354C27 /* GlesHelper.mm in Sources */,
 				9D25ABBE213FB6F800354C27 /* OnDemandResources.mm in Sources */,
 				9D25ABE4213FB76500354C27 /* UnityAppController+Rendering.mm in Sources */,
@@ -2363,11 +2375,9 @@
 				93D3D16B27797662006D26A0 /* AFHTTPSessionManager.m in Sources */,
 				9D25ABC9213FB6F800354C27 /* MetalHelper.mm in Sources */,
 				9D25ABE8213FB7C800354C27 /* RegisterMonoModules.cpp in Sources */,
-				93D3D17D27797663006D26A0 /* FootStep.cpp in Sources */,
 				CD5D48878DA27F5D2BDF600B /* Assembly-CSharp.cpp in Sources */,
 				F83E41A2AEA7D45C1A99CB2E /* Assembly-CSharp1.cpp in Sources */,
 				B9794559AF9B63B8135109C8 /* Assembly-CSharp2.cpp in Sources */,
-				93D3D19727797663006D26A0 /* DanceGame.cpp in Sources */,
 				B1004C229B3941540880F905 /* Assembly-CSharp3.cpp in Sources */,
 				93BB27A7278597830019B85C /* SRWebSocket.m in Sources */,
 				93D3D13427797662006D26A0 /* TXCarouselView.m in Sources */,
@@ -2376,7 +2386,8 @@
 				774842AEB4BF2B2BE59B392C /* Assembly-CSharp6.cpp in Sources */,
 				1C27423D8AC9076BF90C8EAA /* Assembly-CSharp7.cpp in Sources */,
 				ADFA45C186E1C09FF0910161 /* Assembly-CSharp8.cpp in Sources */,
-				93D3D1A427797663006D26A0 /* Game.cpp in Sources */,
+				93E73806278BD6970017A553 /* DanceGame.cpp in Sources */,
+				93E737FC278BD6970017A553 /* DanceFoot.cpp in Sources */,
 				81A84AAD8CA10B66A065BBC6 /* Assembly-CSharp_CodeGen.c in Sources */,
 				93D3D16227797662006D26A0 /* HTTPDataProcession.m in Sources */,
 				4AFF454DAEDA71F26CECB2A7 /* GenericMethods.cpp in Sources */,
@@ -2388,6 +2399,7 @@
 				A01045F3B565FE20887132E9 /* GenericMethods6.cpp in Sources */,
 				73A8474A84F28CD671B60784 /* GenericMethods7.cpp in Sources */,
 				B1B8418AB29314E90D15B8D9 /* Generics.cpp in Sources */,
+				93E737E8278BD6970017A553 /* jumpH5.cpp in Sources */,
 				93D3D17527797663006D26A0 /* AFSecurityPolicy.m in Sources */,
 				BABB4B1D93A9545EB9F6D26A /* Generics1.cpp in Sources */,
 				28834DFAB23888569E05B5F2 /* Generics10.cpp in Sources */,
@@ -2396,7 +2408,6 @@
 				93D3D14827797662006D26A0 /* ViceShoesAnalysis.m in Sources */,
 				CE27444F99CC9834B9674C2C /* Generics12.cpp in Sources */,
 				FD504BBDB8B2893A67BAB751 /* Generics13.cpp in Sources */,
-				93D3D19327797663006D26A0 /* RuinsExplore.cpp in Sources */,
 				8B364B76A109874B92DBB212 /* Generics14.cpp in Sources */,
 				AC744B09A6D00F60EF453692 /* Generics15.cpp in Sources */,
 				50004D04A8EBD19C0020B598 /* Generics16.cpp in Sources */,
@@ -2430,6 +2441,7 @@
 				30FF4459AFF3F948908F9605 /* Il2CppGenericComDefinitions.cpp in Sources */,
 				C73B40F3B0C10D1FC2BBFC4F /* Il2CppGenericInstDefinitions.c in Sources */,
 				DF214FCC8411A309F1AA4690 /* Il2CppGenericMethodDefinitions.c in Sources */,
+				93E73804278BD6970017A553 /* testGame.cpp in Sources */,
 				F563452F8DBCDF036D2A7BAB /* Il2CppGenericMethodPointerTable.cpp in Sources */,
 				ED8149A8947BA32C1AAA84B7 /* Il2CppGenericMethodTable.c in Sources */,
 				93D3D21527797668006D26A0 /* PluginInterface.mm in Sources */,
@@ -2446,15 +2458,13 @@
 				EFAB4A29B10D642884EAAE18 /* Mono.Security1.cpp in Sources */,
 				F8454860A5F9CA320456F0B4 /* Mono.Security_CodeGen.c in Sources */,
 				6BED477CA62074F49E4AFE02 /* mscorlib.cpp in Sources */,
-				93D3D19F27797663006D26A0 /* RunGame.cpp in Sources */,
 				E3BE42AC941BDA8D2443CA5B /* mscorlib1.cpp in Sources */,
 				2ED14CC29C11FCEF3ADF597C /* mscorlib10.cpp in Sources */,
 				ABC24B80A05291BD17F1EB62 /* mscorlib11.cpp in Sources */,
+				93E737FE278BD6970017A553 /* Tricycle.cpp in Sources */,
 				82EE4909BA5A5A8681252B13 /* mscorlib12.cpp in Sources */,
 				1EB5457E9628E484BD781153 /* mscorlib13.cpp in Sources */,
 				BA424F509679722751BFFA2A /* mscorlib14.cpp in Sources */,
-				93D3D19D27797663006D26A0 /* OriginTraj.cpp in Sources */,
-				93D3D18527797663006D26A0 /* BigFoot.cpp in Sources */,
 				6E0D4367AACA8D782D80DEFF /* mscorlib15.cpp in Sources */,
 				0E3847EC808356AC2EB79B6B /* mscorlib16.cpp in Sources */,
 				448E41ED88CBC47C4996B4D7 /* mscorlib17.cpp in Sources */,
@@ -2470,6 +2480,7 @@
 				93D3D14527797662006D26A0 /* BTDataSend.m in Sources */,
 				3D0B4939A61E5E194DD6D0CC /* mscorlib7.cpp in Sources */,
 				044E4647A430316AF2F42FEA /* mscorlib8.cpp in Sources */,
+				93E737F6278BD6970017A553 /* FootStep.cpp in Sources */,
 				1DBD4D16A215F45F4F833D49 /* mscorlib9.cpp in Sources */,
 				93D3D21227797663006D26A0 /* UIView+ST.m in Sources */,
 				160E4DB8957FCA40E34FFC2D /* mscorlib_CodeGen.c in Sources */,
@@ -2490,7 +2501,6 @@
 				C8894690996CAE2D2D71CCE7 /* QFramework.Core_CodeGen.c in Sources */,
 				263A494ABD0C40F8B64FB7DE /* QFramework.CSharpExtension.cpp in Sources */,
 				EBD3432D8BB1B78434394A0D /* QFramework.CSharpExtension_CodeGen.c in Sources */,
-				93D3D18327797663006D26A0 /* MonsterH5.cpp in Sources */,
 				202841F99661500E23B4E0E2 /* QFramework.DataStructure.cpp in Sources */,
 				93D3D15B27797662006D26A0 /* MBProgressHUD.m in Sources */,
 				F87C4E2FBB24D4762A8FF79F /* QFramework.DataStructure_CodeGen.c in Sources */,
@@ -2500,10 +2510,13 @@
 				C68C4C88A124B4561D842A9C /* QFramework.EventSystem_CodeGen.c in Sources */,
 				93D3D14C27797662006D26A0 /* BTDataProcess.mm in Sources */,
 				01B14F2794C20F4AF83EDD10 /* QFramework.FSM.cpp in Sources */,
+				93E73800278BD6970017A553 /* RuinsExplore.cpp in Sources */,
 				A5AE4C63B2C54DC109EFF8D4 /* QFramework.FSM_CodeGen.c in Sources */,
 				E13B45A18DE413B60F7BC033 /* QFramework.IOC.cpp in Sources */,
 				8B594A449DF4BE01F42980F5 /* QFramework.IOC_CodeGen.c in Sources */,
+				93E7380D278BD6970017A553 /* Interaction.cpp in Sources */,
 				50884B09B04B0685E80855E1 /* QFramework.Log.cpp in Sources */,
+				93E737FA278BD6970017A553 /* Game.cpp in Sources */,
 				93D3D20E27797663006D26A0 /* GameObjc.mm in Sources */,
 				93D3D14E27797662006D26A0 /* MainShoesAnalysis.mm in Sources */,
 				63874FF894D46F7E0EC018D1 /* QFramework.Log_CodeGen.c in Sources */,
@@ -2533,16 +2546,19 @@
 				78794D3B9ACA51D79A332B4D /* System.Diagnostics.StackTrace_CodeGen.c in Sources */,
 				5265470E9B10BD267CEF5190 /* System.Globalization.Extensions.cpp in Sources */,
 				DCE64E7FBD0B4266FB9573E0 /* System.Globalization.Extensions_CodeGen.c in Sources */,
+				93E737F4278BD6970017A553 /* MonsterH5.cpp in Sources */,
 				C0334287803EA8B3866F51D9 /* System.IO.Compression.cpp in Sources */,
 				F94847159E123AB47E8E1986 /* System.IO.Compression_CodeGen.c in Sources */,
 				321042D5B7A1392AA821670E /* System.Xml.cpp in Sources */,
 				93D3D16027797662006D26A0 /* IOSPlatformSDK.mm in Sources */,
 				AD4D41F390AF18DC37FA86ED /* System.Xml1.cpp in Sources */,
 				3F8D41E085B99EAE906562DB /* System.Xml2.cpp in Sources */,
+				93E73802278BD6970017A553 /* OriginTraj.cpp in Sources */,
 				F0644298A6B7958B44B71D03 /* System.Xml3.cpp in Sources */,
 				BC454818B95738B209898806 /* System.Xml4.cpp in Sources */,
 				D404413786A7E42987BCFA5A /* System.Xml5.cpp in Sources */,
 				2EF8405ABD24DC1D04A3FD4E /* System.Xml6.cpp in Sources */,
+				93E7380F278BD6970017A553 /* BigFoot.cpp in Sources */,
 				AC8C4D988C1EC33C2D824BF7 /* System.Xml_CodeGen.c in Sources */,
 				9C3B4143BFDE95D54DCC3147 /* System1.cpp in Sources */,
 				DC6C4F2A9B90584428EC5432 /* System2.cpp in Sources */,
@@ -2557,11 +2573,11 @@
 				19514B99BFE3DF9EA5860189 /* Unity.TextMeshPro2.cpp in Sources */,
 				861A45A2B3089A2AAC4BA14F /* Unity.TextMeshPro3.cpp in Sources */,
 				219E436581689DA6F66250D1 /* Unity.TextMeshPro_CodeGen.c in Sources */,
+				93E737EB278BD6970017A553 /* InertialTrajProcess.cpp in Sources */,
 				EFF34DFBB4DFE369FA17026E /* UnityClassRegistration.cpp in Sources */,
 				E32343A8B80CBBE48EB5A539 /* UnityEngine.AndroidJNIModule.cpp in Sources */,
 				4D8747178CBAECE037D9C477 /* UnityEngine.AndroidJNIModule_CodeGen.c in Sources */,
 				DE2A40F5844B28566572D787 /* UnityEngine.AnimationModule.cpp in Sources */,
-				93D3D18D27797663006D26A0 /* Tricycle.cpp in Sources */,
 				67BF4AFB87D59F46F3DBA8D0 /* UnityEngine.AnimationModule_CodeGen.c in Sources */,
 				4D8743A28F4B59A28AF53D35 /* UnityEngine.AssetBundleModule.cpp in Sources */,
 				BE2C453BBE3501BD31FD7D31 /* UnityEngine.AssetBundleModule_CodeGen.c in Sources */,
@@ -2572,7 +2588,6 @@
 				8365497ABCB7DECFE7ADE94C /* UnityEngine.CoreModule2.cpp in Sources */,
 				266743A78BFE316C48BA59A7 /* UnityEngine.CoreModule_CodeGen.c in Sources */,
 				3E9F4A12B393AF30DFA8D77F /* UnityEngine.cpp in Sources */,
-				93D3D17A27797663006D26A0 /* DanceFoot.cpp in Sources */,
 				EE0B4D31A5033919C23A204A /* UnityEngine.GameCenterModule.cpp in Sources */,
 				EA5A47CC84FFDB37BCE399E8 /* UnityEngine.GameCenterModule_CodeGen.c in Sources */,
 				C43544558506D8CB8183D163 /* UnityEngine.ImageConversionModule.cpp in Sources */,
@@ -2586,6 +2601,7 @@
 				BB9A4B3FAF5DB1EFC26E71B3 /* UnityEngine.ParticleSystemModule.cpp in Sources */,
 				C94A4032ABABBEA6C3099687 /* UnityEngine.ParticleSystemModule_CodeGen.c in Sources */,
 				7E0245D08308BAA49103463C /* UnityEngine.Physics2DModule.cpp in Sources */,
+				93E737F0278BD6970017A553 /* SingleFootAction.cpp in Sources */,
 				8D17458581415BB6971D1A41 /* UnityEngine.Physics2DModule_CodeGen.c in Sources */,
 				3BBE4878B5B3F0CA86E4040B /* UnityEngine.PhysicsModule.cpp in Sources */,
 				B8F645089CB66BAF79CBAFE5 /* UnityEngine.PhysicsModule_CodeGen.c in Sources */,
@@ -2602,11 +2618,9 @@
 				B6A74AE98EFB6DA8349DD5F3 /* UnityEngine.UI3.cpp in Sources */,
 				5E1E489DB2AFEDAF2368EAFC /* UnityEngine.UIModule.cpp in Sources */,
 				B49B416695FDBBE744652F24 /* UnityEngine.UIModule_CodeGen.c in Sources */,
-				93D3D19027797663006D26A0 /* SingleFootAction.cpp in Sources */,
 				B80C4D20B79724ED3A8D8D12 /* UnityEngine.UI_CodeGen.c in Sources */,
 				A69C48B3A43508BB53CFB6CB /* UnityEngine.UnityWebRequestModule.cpp in Sources */,
 				C3B34DEB98103B10FCF997F5 /* UnityEngine.UnityWebRequestModule_CodeGen.c in Sources */,
-				93D3D18727797663006D26A0 /* Interaction.cpp in Sources */,
 				A6A64BF0B58E1819DD6AA007 /* UnityEngine.UnityWebRequestTextureModule.cpp in Sources */,
 				1FCC425DAFE07F18F9EFD300 /* UnityEngine.UnityWebRequestTextureModule_CodeGen.c in Sources */,
 				1BE64FCEAA19A894B5C5B7B3 /* UnityEngine.UnityWebRequestWWWModule.cpp in Sources */,
@@ -2668,6 +2682,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/SDK/ThirdClass/Bugly-2.5.9",
+					"$(PROJECT_DIR)",
 				);
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
@@ -2724,6 +2739,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/SDK/ThirdClass/Bugly-2.5.9",
+					"$(PROJECT_DIR)",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				INFOPLIST_FILE = Info.plist;
@@ -2902,6 +2918,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/SDK/ThirdClass/Bugly-2.5.9",
+					"$(PROJECT_DIR)",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				INFOPLIST_FILE = Info.plist;
@@ -3024,6 +3041,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/SDK/ThirdClass/Bugly-2.5.9",
+					"$(PROJECT_DIR)",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				INFOPLIST_FILE = Info.plist;

+ 7 - 0
RunGame/Unity-iPhone.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

BIN
RunGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate