|
|
|
@ -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); |
|
|
|
@ -404,6 +404,7 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
if (info.gameObjID == GetComponent<BaseGameObjInfo>().gameObjID) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (IsBefirstAirOrMoving) |
|
|
|
|
{ |
|
|
|
|
LoadPromptWin.Instance.LoadTextPromptWindow("该人员正在被急救或者移动,不能操作", 2f); |
|
|
|
@ -419,21 +420,27 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
LoadPromptWin.Instance.LoadTextPromptWindow("该人员被营救,不能再进行操作", 1f); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (fireMan.GetComponent<FiremanMoveTrapped>().trappedlist.Count > 0) |
|
|
|
|
{ |
|
|
|
|
if (fireMan.GetComponent<FiremanMoveTrapped>().trappedlist.Contains(info.gameObjID)) |
|
|
|
|
|
|
|
|
|
//if (fireMan.GetComponent<FiremanMoveTrapped>().trappedlist.Count > 0) |
|
|
|
|
//{ |
|
|
|
|
// if (fireMan.GetComponent<FiremanMoveTrapped>().trappedlist.Contains(info.gameObjID)) |
|
|
|
|
// { |
|
|
|
|
// LoadPromptWin.Instance.LoadTextPromptWindow("该人员已跟随移动", 1f); |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
// else |
|
|
|
|
// { |
|
|
|
|
// LoadPromptWin.Instance.LoadTextPromptWindow("不能同时移动多名人员", 1f); |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
//} |
|
|
|
|
if (!IsMoveState && !OverMoveOrGuidance) |
|
|
|
|
{ |
|
|
|
|
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); |
|
|
|
|