|
@@ -34,21 +34,77 @@ public class GameLaunch : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//模拟数据
|
|
//模拟数据
|
|
|
- //string simulationData = "11111111111/10kV真空断路器及开关柜例行检修/练习/47.92.0.243:15156";
|
|
|
|
|
|
|
+ //string simulationData = "b4d71ce589ed0ab52b945a7e42fd6499d00c58b7/PC_电缆熔接头制作/1/12345678910/47.92.0.243:15158/Exam/PC_电缆熔接头制作/这是总平台参数";
|
|
|
//string[] tmpArgs = simulationData.Split('/');
|
|
//string[] tmpArgs = simulationData.Split('/');
|
|
|
- //截断
|
|
|
|
|
- string[] tmpArgs = args[1].Split('/');
|
|
|
|
|
-
|
|
|
|
|
|
|
+ string[] tmpArgs = args[1].Decrypt("chivatech").Split('/');
|
|
|
// 文件各种:手机号/课程名/模式/地址
|
|
// 文件各种:手机号/课程名/模式/地址
|
|
|
- string tmpPhoneNumber = tmpArgs[0];
|
|
|
|
|
- string tmpCourseName = tmpArgs[1];
|
|
|
|
|
- string tmpMode = tmpArgs[2];
|
|
|
|
|
- if (tmpArgs.Length > 3)
|
|
|
|
|
- {
|
|
|
|
|
- string tmpAddress = tmpArgs[3];
|
|
|
|
|
- GrpcChannelContronller.Instance.StartClient(tmpAddress);
|
|
|
|
|
|
|
+ string tmpPhoneNumber = "";
|
|
|
|
|
+ string tmpCourseName = "";
|
|
|
|
|
+ string tmpLoadScene = "";
|
|
|
|
|
+ string tmpMode = "";
|
|
|
|
|
+
|
|
|
|
|
+ UserProxy userProxy = DAL.Instance.Get<UserProxy>();
|
|
|
|
|
+
|
|
|
|
|
+ if (String.IsNullOrEmpty(tmpArgs[2]))
|
|
|
|
|
+ userProxy.userInfo.userName = "Chiva";
|
|
|
|
|
+ else
|
|
|
|
|
+ userProxy.userInfo.userName = tmpArgs[2];
|
|
|
|
|
+
|
|
|
|
|
+ if (String.IsNullOrEmpty(tmpArgs[3]))
|
|
|
|
|
+ userProxy.userInfo.phoneNumber = "40008013900";
|
|
|
|
|
+ else
|
|
|
|
|
+ userProxy.userInfo.phoneNumber = tmpArgs[3];
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- GetInfoaboutSpecifiedUser(tmpPhoneNumber);
|
|
|
|
|
|
|
+ Debug.Log(tmpArgs.Length + "-asd-" + args[1]);
|
|
|
|
|
+ if (tmpArgs.Length < 4)
|
|
|
|
|
+ {
|
|
|
|
|
+ #region 电专平台接口解析
|
|
|
|
|
+
|
|
|
|
|
+ // 文件各种:手机号/课程名/模式/地址
|
|
|
|
|
+ tmpPhoneNumber = tmpArgs[0];
|
|
|
|
|
+ tmpCourseName = tmpArgs[1];
|
|
|
|
|
+ tmpMode = tmpArgs[2];
|
|
|
|
|
+ //if (tmpArgs.Length > 3)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // string tmpAddress = tmpArgs[3];
|
|
|
|
|
+ // //GrpcChannelContronller.Instance.StartClient(tmpAddress);
|
|
|
|
|
+
|
|
|
|
|
+ // GetInfoaboutSpecifiedUser(tmpPhoneNumber);
|
|
|
|
|
+ //}
|
|
|
|
|
+ #endregion
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ #region 通用平台接口解析
|
|
|
|
|
+
|
|
|
|
|
+ tmpPhoneNumber = tmpArgs[5];
|
|
|
|
|
+ tmpMode = tmpArgs[2];
|
|
|
|
|
+
|
|
|
|
|
+ GrpcChannelContronller.Instance.StartClient(tmpArgs[4]);
|
|
|
|
|
+ tmpCourseName = tmpArgs[1];
|
|
|
|
|
+
|
|
|
|
|
+ GlobalConfig.m_SelectDevice = tmpCourseName;
|
|
|
|
|
+
|
|
|
|
|
+ tmpLoadScene = tmpArgs[6];
|
|
|
|
|
+ switch (tmpArgs[5])
|
|
|
|
|
+ {
|
|
|
|
|
+ case "Learn":
|
|
|
|
|
+ tmpMode = "学习";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "Practice":
|
|
|
|
|
+ tmpMode = "练习";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "Exam":
|
|
|
|
|
+ tmpMode = "考核";
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ tmpMode = "学习";
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Debug.Log(tmpCourseName + " --" + tmpMode);
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//自由模式场景进自由练考模式
|
|
//自由模式场景进自由练考模式
|
|
@@ -63,13 +119,13 @@ public class GameLaunch : MonoBehaviour
|
|
|
|
|
|
|
|
GlobalConfig.m_SelectDevice = tmpCourseName;
|
|
GlobalConfig.m_SelectDevice = tmpCourseName;
|
|
|
|
|
|
|
|
- if (!string.IsNullOrEmpty(tmpCourseName))
|
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(tmpLoadScene))
|
|
|
{
|
|
{
|
|
|
- m_asyncLoad.Init(tmpCourseName, m_isOpenAsyncLoad);
|
|
|
|
|
|
|
+ m_asyncLoad.Init(tmpLoadScene, m_isOpenAsyncLoad);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Debug.Log($"ERROR:请检查是否存在 {tmpCourseName} 课程");
|
|
|
|
|
|
|
+ Debug.Log($"ERROR:请检查是否存在 {tmpLoadScene} 课程");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -108,7 +164,7 @@ public class GameLaunch : MonoBehaviour
|
|
|
break;
|
|
break;
|
|
|
case "练习":
|
|
case "练习":
|
|
|
|
|
|
|
|
- if(freeMode)
|
|
|
|
|
|
|
+ if (freeMode)
|
|
|
{
|
|
{
|
|
|
GlobalData.m_CurrentOperationMode = OperationMode.FreeParctice;
|
|
GlobalData.m_CurrentOperationMode = OperationMode.FreeParctice;
|
|
|
}
|
|
}
|