Compare commits
No commits in common. "HQB_workspace" and "main" have entirely different histories.
HQB_workspace
...
main
|
|
@ -4,7 +4,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public abstract class Device_Base : PermanentTriggerBase
|
public class Device_Base : PermanentTriggerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备类型
|
/// 设备类型
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ 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,4 +64,5 @@ public class Device_Switch : Device_Base
|
||||||
transform.localEulerAngles = new Vector3(0, 45, 0);
|
transform.localEulerAngles = new Vector3(0, 45, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
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;
|
||||||
|
|
@ -92,4 +90,5 @@ 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,5 +101,4 @@ public class Tool_Base : PermanentTriggerBase
|
||||||
back?.Invoke();
|
back?.Invoke();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,6 @@ 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]
|
||||||
|
|
@ -62,7 +55,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>
|
||||||
/// 背包中所有的工具和材料
|
/// 背包中所有的工具和材料
|
||||||
|
|
@ -93,9 +86,4 @@ 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(UserExamStat.sceneName, () =>
|
ScenesManager.Instance.LoadSceneAsyn($"{GameManager.Instance.systemId}_{GameManager.RunModelMgr.schemeID}_{UserExamStat.sceneName}", () =>
|
||||||
{
|
{
|
||||||
//右侧工具栏切换
|
//右侧工具栏切换
|
||||||
if (!GameManager.UIMgr.GetPanel<UI_MenuBar>())//office场景下,右侧工具栏可能会隐藏
|
if (!GameManager.UIMgr.GetPanel<UI_MenuBar>())//office场景下,右侧工具栏可能会隐藏
|
||||||
|
|
@ -329,5 +329,4 @@ public class ReconnectMgr : SingletonMono<ReconnectMgr>
|
||||||
RecoverScene();
|
RecoverScene();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -27,4 +27,6 @@ public class MirrorController : PermanentTriggerBase
|
||||||
_highlight.SetHighlighted(false);
|
_highlight.SetHighlighted(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,6 @@ 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,10 +19,6 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,10 +67,6 @@ 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": true
|
"isDone": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 2,
|
"index": 2,
|
||||||
"subProcessId": 2,
|
"subProcessId": 2,
|
||||||
"currentScore": 0.0,
|
"currentScore": 0.0,
|
||||||
"isDone": true
|
"isDone": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"index": 3,
|
"index": 3,
|
||||||
|
|
@ -112,31 +112,10 @@
|
||||||
"isDone": false
|
"isDone": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"experiencedScene": [
|
|
||||||
"02_MenuScene",
|
|
||||||
"03_OfficeScene"
|
|
||||||
],
|
|
||||||
"allToolAndMaterial": [],
|
"allToolAndMaterial": [],
|
||||||
"allWear": [],
|
"allWear": [],
|
||||||
"sceneName": "03_OfficeScene",
|
"sceneName": "02_MenuScene",
|
||||||
"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