Compare commits
44 Commits
main
...
HQB_workspace
Author | SHA1 | Date |
---|---|---|
|
19e9b34fa1 | |
|
a66a6f9a3d | |
|
5e26973e4e | |
|
a105033700 | |
|
b4cf6286a8 | |
|
b280c5d0de | |
|
e26450191a | |
|
0c4162df67 | |
|
9e3d0fd4f1 | |
|
5276fcaede | |
|
877e3fb7cc | |
|
17067bc33d | |
|
22c974d21c | |
|
27c356ba28 | |
|
824bc36529 | |
|
d38e193431 | |
|
939810213c | |
|
9ca554ab57 | |
|
0b6a393e81 | |
|
b0d1ac0edd | |
|
3c9b1c9a8a | |
|
36c6945209 | |
|
1597d53826 | |
|
8fdc47d314 | |
|
009110306d | |
|
eadf603199 | |
|
8664ce8398 | |
|
a79129a467 | |
|
096c742205 | |
|
ce401f8b53 | |
|
165d08a8ec | |
|
b5083fa17e | |
|
2adbebe563 | |
|
aa02fffc38 | |
|
03735133df | |
|
bcc75cf099 | |
|
36098d8173 | |
|
da457d6aff | |
|
a502be2aa0 | |
|
56eba812fe | |
|
254f54a708 | |
|
97504b1e4b | |
|
70ada07f3a | |
|
1397e0e6ff |
|
@ -4,7 +4,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Device_Base : PermanentTriggerBase
|
public abstract class Device_Base : PermanentTriggerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备类型
|
/// 设备类型
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class DeviceTrigger : PermanentTriggerBase
|
||||||
/// 点击回调
|
/// 点击回调
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Action clickAction;
|
public Action clickAction;
|
||||||
|
|
||||||
protected override void OnMDown()
|
protected override void OnMDown()
|
||||||
{
|
{
|
||||||
base.OnMDown();
|
base.OnMDown();
|
||||||
|
|
|
@ -64,5 +64,4 @@ public class Device_Switch : Device_Base
|
||||||
transform.localEulerAngles = new Vector3(0, 45, 0);
|
transform.localEulerAngles = new Vector3(0, 45, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
|
using LitJson;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
@ -90,5 +92,4 @@ public class Device_CabinetDoor : Device_Base
|
||||||
transform.localEulerAngles = Vector3.zero;
|
transform.localEulerAngles = Vector3.zero;
|
||||||
transform.Find("¼ÆÁ¿¹ñËø2/¼ÆÁ¿¹ñËø3").localEulerAngles = Vector3.zero;
|
transform.Find("¼ÆÁ¿¹ñËø2/¼ÆÁ¿¹ñËø3").localEulerAngles = Vector3.zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public abstract class ScoreBase : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置科目得分,用于断线重连恢复
|
/// 设置科目得分,用于断线重连恢复 HQB
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void setCurrentScore(float _score)
|
public void setCurrentScore(float _score)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using UnityEngine;
|
||||||
using LitJson;
|
using LitJson;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ????buffer
|
/// 转存场景buffer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BufferTemp_1002
|
public class BufferTemp_1002
|
||||||
{
|
{
|
||||||
|
@ -462,7 +462,7 @@ public class Score_1002 : ScoreBase
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ?????List??,??????
|
/// 保存场景中List缓存,用于断线重连
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="System.NotImplementedException"></exception>
|
/// <exception cref="System.NotImplementedException"></exception>
|
||||||
public override string SaveSceneBufferList()
|
public override string SaveSceneBufferList()
|
||||||
|
@ -476,13 +476,13 @@ public class Score_1002 : ScoreBase
|
||||||
tmp.installCover = installCover;
|
tmp.installCover = installCover;
|
||||||
tmp.currentInstallTestJieXian = currentInstallTestJieXian;
|
tmp.currentInstallTestJieXian = currentInstallTestJieXian;
|
||||||
string sceneInfo = JsonConvert.SerializeObject(tmp, Formatting.Indented);
|
string sceneInfo = JsonConvert.SerializeObject(tmp, Formatting.Indented);
|
||||||
Debug.Log("==????:" + sceneInfo);
|
Debug.Log("==场景信息:" + sceneInfo);
|
||||||
return sceneInfo;
|
return sceneInfo;
|
||||||
//throw new System.NotImplementedException();
|
//throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ??????
|
/// 读取场景缓存
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void LoadSceneBufferList(string sceneInfo)
|
public override void LoadSceneBufferList(string sceneInfo)
|
||||||
{
|
{
|
||||||
|
|
|
@ -101,4 +101,5 @@ public class Tool_Base : PermanentTriggerBase
|
||||||
back?.Invoke();
|
back?.Invoke();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,13 @@ public class ReconnectTriggerInfo
|
||||||
public string triggerInfo;
|
public string triggerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//每个场景中保存的信息
|
||||||
|
public class ReconnectSpecialScene
|
||||||
|
{
|
||||||
|
public string sceneName;
|
||||||
|
public List<ReconnectItemInfo> currentSceneTools = new List<ReconnectItemInfo>();
|
||||||
|
public List<ReconnectTriggerInfo> currentSceneTriggers = new List<ReconnectTriggerInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
//用于记录场景中物品的信息
|
//用于记录场景中物品的信息
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -55,7 +62,7 @@ public class TB_UserExamStat
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户经历过的场景
|
/// 用户经历过的场景
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//public List<string> experiencedScene = new List<string>();
|
public List<string> experiencedScene = new List<string>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 背包中所有的工具和材料
|
/// 背包中所有的工具和材料
|
||||||
|
@ -86,4 +93,9 @@ public class TB_UserExamStat
|
||||||
/// 关卡内所有缓存信息,不定数据格式
|
/// 关卡内所有缓存信息,不定数据格式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string currentSceneOtherInfo = "";
|
public string currentSceneOtherInfo = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 记录每个场景中的情况
|
||||||
|
/// </summary>
|
||||||
|
public List<ReconnectSpecialScene> experiencedScenes = new List<ReconnectSpecialScene>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,16 +39,16 @@ public class ReconnectMgr : SingletonMono<ReconnectMgr>
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户每经历一个场景就需要保存一个场景的数据
|
/// 用户每经历一个场景就需要保存一个场景的数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//public bool IntoNewScene(string sceneName)
|
public bool IntoNewScene(string sceneName)
|
||||||
//{
|
{
|
||||||
// if (UserExamStat.experiencedScene.Contains(sceneName))
|
if (UserExamStat.experiencedScene.Contains(sceneName))
|
||||||
// return false;
|
return false;
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// UserExamStat.experiencedScene.Add(sceneName);
|
UserExamStat.experiencedScene.Add(sceneName);
|
||||||
// return true;
|
return true;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
ReconnectMgr()//构造函数
|
ReconnectMgr()//构造函数
|
||||||
{
|
{
|
||||||
|
@ -199,7 +199,7 @@ public class ReconnectMgr : SingletonMono<ReconnectMgr>
|
||||||
public void RecoverScene()
|
public void RecoverScene()
|
||||||
{
|
{
|
||||||
//先恢复场景
|
//先恢复场景
|
||||||
ScenesManager.Instance.LoadSceneAsyn($"{GameManager.Instance.systemId}_{GameManager.RunModelMgr.schemeID}_{UserExamStat.sceneName}", () =>
|
ScenesManager.Instance.LoadSceneAsyn(UserExamStat.sceneName, () =>
|
||||||
{
|
{
|
||||||
//右侧工具栏切换
|
//右侧工具栏切换
|
||||||
if (!GameManager.UIMgr.GetPanel<UI_MenuBar>())//office场景下,右侧工具栏可能会隐藏
|
if (!GameManager.UIMgr.GetPanel<UI_MenuBar>())//office场景下,右侧工具栏可能会隐藏
|
||||||
|
@ -329,4 +329,5 @@ public class ReconnectMgr : SingletonMono<ReconnectMgr>
|
||||||
RecoverScene();
|
RecoverScene();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
|
@ -27,6 +27,4 @@ public class MirrorController : PermanentTriggerBase
|
||||||
_highlight.SetHighlighted(false);
|
_highlight.SetHighlighted(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,9 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
|
using LitJson;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Unity.VisualScripting;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
public class MobileController : PermanentTriggerBase
|
public class MobileController : PermanentTriggerBase
|
||||||
|
|
|
@ -19,6 +19,10 @@ public class ScenesManager : BaseManager<ScenesManager>
|
||||||
LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
LoadSceneMode loadSceneMode = LoadSceneMode.Single)
|
||||||
{
|
{
|
||||||
SceneManager.LoadScene(sceneName, loadSceneMode);
|
SceneManager.LoadScene(sceneName, loadSceneMode);
|
||||||
|
if (ReconnectMgr.Instance != null) //进入场景后做记录
|
||||||
|
{
|
||||||
|
ReconnectMgr.Instance.IntoNewScene(sceneName);
|
||||||
|
}
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +71,10 @@ public class ScenesManager : BaseManager<ScenesManager>
|
||||||
{
|
{
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
if (ReconnectMgr.Instance != null)//进入场景后做记录
|
||||||
|
{
|
||||||
|
ReconnectMgr.Instance.IntoNewScene(sceneName);
|
||||||
|
}
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,13 +7,13 @@
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"subProcessId": 1,
|
"subProcessId": 1,
|
||||||
"currentScore": 0.0,
|
"currentScore": 0.0,
|
||||||
"isDone": false
|
"isDone": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 2,
|
"index": 2,
|
||||||
"subProcessId": 2,
|
"subProcessId": 2,
|
||||||
"currentScore": 0.0,
|
"currentScore": 0.0,
|
||||||
"isDone": false
|
"isDone": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 3,
|
"index": 3,
|
||||||
|
@ -112,10 +112,31 @@
|
||||||
"isDone": false
|
"isDone": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"experiencedScene": [
|
||||||
|
"02_MenuScene",
|
||||||
|
"03_OfficeScene"
|
||||||
|
],
|
||||||
"allToolAndMaterial": [],
|
"allToolAndMaterial": [],
|
||||||
"allWear": [],
|
"allWear": [],
|
||||||
"sceneName": "02_MenuScene",
|
"sceneName": "03_OfficeScene",
|
||||||
"currentSceneTools": [],
|
"currentSceneTools": [],
|
||||||
"currentSceneTriggers": [],
|
"currentSceneTriggers": [
|
||||||
"currentSceneOtherInfo": "{\r\n \"TestPen3list\": [],\r\n \"InSwitchCloseYDList\": [],\r\n \"InSwitchOpenYDList\": [],\r\n \"currentunInstallJieXian\": [],\r\n \"currentInstallJieXian\": [],\r\n \"installCover\": [],\r\n \"currentInstallTestJieXian\": []\r\n}"
|
{
|
||||||
|
"triggerID": 5005,
|
||||||
|
"triggerName": "手机",
|
||||||
|
"selfPosInScene": {
|
||||||
|
"x": 0.0244421959,
|
||||||
|
"y": 0.885706842,
|
||||||
|
"z": -1.00569367
|
||||||
|
},
|
||||||
|
"selfRotInScene": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"triggerInfo": "{\"downIndex\":\"2\",\"triggerID\":\"5005\",\"triggerName\":\"\\u624B\\u673A\"}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"currentSceneOtherInfo": "{\r\n \"TestPen3list\": [],\r\n \"InSwitchCloseYDList\": [],\r\n \"InSwitchOpenYDList\": [],\r\n \"currentunInstallJieXian\": [],\r\n \"currentInstallJieXian\": [],\r\n \"installCover\": [],\r\n \"currentInstallTestJieXian\": []\r\n}",
|
||||||
|
"experiencedScenes": []
|
||||||
}
|
}
|
Loading…
Reference in New Issue