diff --git a/Assets/Scripts/Common/Disasters/Wound_Trapped/HaemalStrand.cs b/Assets/Scripts/Common/Disasters/Wound_Trapped/HaemalStrand.cs index b9b64d6..d96dcf8 100644 --- a/Assets/Scripts/Common/Disasters/Wound_Trapped/HaemalStrand.cs +++ b/Assets/Scripts/Common/Disasters/Wound_Trapped/HaemalStrand.cs @@ -296,10 +296,10 @@ public class HaemalStrand : MonoBehaviour safearea.HasWounderNum= safearea.HasWounderNum+1; if (TargetObj.GetComponent()) { - TargetObj.GetComponent().SetDestination(TargetObj.transform.position); + //TargetObj.GetComponent().SetDestination(TargetObj.transform.position); TargetObj.GetComponent().TargetPosition = TargetObj.transform.position; TargetObj.GetComponent().pathFindEnable = false; - TargetObj.GetComponent().baseOffset = 0.2f; + //TargetObj.GetComponent().baseOffset = 0.2f; TargetObj.GetComponent().IsBefirstAirOrMoving = false; TargetObj.GetComponent().OverMoveOrGuidance = true; TargetObj.GetComponent().SaveFrirmanUserId = fireman1.GetComponent().UserID; diff --git a/Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs b/Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs index 5ac02d3..574fe7c 100644 --- a/Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs +++ b/Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs @@ -186,7 +186,7 @@ public class TrappedMoveFree : MonoBehaviour public void OnEnable() { //MessageDispatcher.AddListener("SetGuidpathIndex", AddGuidIndex); - // MessageDispatcher.AddListener("MOVE_MAN_COMMAND", MoveExcute); + MessageDispatcher.AddListener("MOVE_MAN_COMMAND", MoveExcute); MessageDispatcher.AddListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); MessageDispatcher.AddListener("FRISTAID_MAN_COMMAND", FristAidTrapped); MessageDispatcher.AddListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); @@ -203,7 +203,7 @@ public class TrappedMoveFree : MonoBehaviour public void OnDestroy() { // MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex); - //MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); + MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped); MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); @@ -219,7 +219,7 @@ public class TrappedMoveFree : MonoBehaviour public void OnDisable() { //MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex); - // MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); + MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped); MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); @@ -403,6 +403,7 @@ public class TrappedMoveFree : MonoBehaviour if (info.gameObjID == GetComponent().gameObjID) { + if (IsBefirstAirOrMoving) { @@ -419,21 +420,27 @@ public class TrappedMoveFree : MonoBehaviour LoadPromptWin.Instance.LoadTextPromptWindow("该人员被营救,不能再进行操作", 1f); return; } - if (fireMan.GetComponent().trappedlist.Count > 0) + + //if (fireMan.GetComponent().trappedlist.Count > 0) + //{ + // if (fireMan.GetComponent().trappedlist.Contains(info.gameObjID)) + // { + // LoadPromptWin.Instance.LoadTextPromptWindow("该人员已跟随移动", 1f); + // return; + // } + // else + // { + // LoadPromptWin.Instance.LoadTextPromptWindow("不能同时移动多名人员", 1f); + // return; + // } + //} + if (!IsMoveState && !OverMoveOrGuidance) { - if (fireMan.GetComponent().trappedlist.Contains(info.gameObjID)) - { - LoadPromptWin.Instance.LoadTextPromptWindow("该人员已跟随移动", 1f); - return; - } - else + if (Haemal > 50) { - LoadPromptWin.Instance.LoadTextPromptWindow("不能同时移动多名人员", 1f); + LoadPromptWin.Instance.LoadTextPromptWindow("该被困人员不需要移动", 1f); return; } - } - if (!IsMoveState && !OverMoveOrGuidance) - { if (Vector3.Distance(fireMan.transform.position, transform.position) > 3) { LoadPromptWin.Instance.LoadTextPromptWindow("请靠近需救助人员", 1f); @@ -869,12 +876,12 @@ public class TrappedMoveFree : MonoBehaviour //引导 if (Guidance) { - + if (guidPoint.Count == 1 /*&& Vector3.Distance(transform.position, guidPoint[0]) < 2*/) { - if (TargetPosition != guidPoint[0]) + if (TargetPosition!=guidPoint[0]) { - Debug.Log("" + "sssssssss" + ""); + Debug.Log("" + "sssssssss"+ ""); TargetPosition = guidPoint[0]; if (CurrentUserInfo.room != null && CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) { @@ -913,7 +920,7 @@ public class TrappedMoveFree : MonoBehaviour } else if (guidPoint.Count > 1) { - if (!guidPoint.Contains(TargetPosition)) + if (!guidPoint.Contains(TargetPosition)) { AddGuidIndex(); } @@ -1021,11 +1028,11 @@ public class TrappedMoveFree : MonoBehaviour void AniamtorSet() { - if (Haemal <= 50) + if (Haemal <= 50) { return; } - if (nav.enabled == false) + if (nav.enabled==false) { return; } diff --git a/Assets/Scripts/Common/ReportSystem/UIViewQuestionnaire.cs b/Assets/Scripts/Common/ReportSystem/UIViewQuestionnaire.cs index 094b9b4..94d9698 100644 --- a/Assets/Scripts/Common/ReportSystem/UIViewQuestionnaire.cs +++ b/Assets/Scripts/Common/ReportSystem/UIViewQuestionnaire.cs @@ -35,6 +35,13 @@ public class UIViewQuestionnaire : UIView private void Awake() { + if (!CheckZD()) + { + LoadPromptWin.Instance.LoadTextPromptWindow("未检测到中队,跳过打分环节",2f); + gameObject.SetActive(false); + return; + } + // 读取数据 Questions = ResourceManager.LoadJson>("Question.json"); if (ReportDataMgr.IsVictory) @@ -53,7 +60,20 @@ public class UIViewQuestionnaire : UIView StartCoroutine(CreateItem()); ButtonEnter.GetComponent