Browse Source

同步修改

develop
杨栋梁 4 years ago
parent
commit
bd73be065e
  1. 4
      Assets/Scripts/Common/Disasters/Wound_Trapped/HaemalStrand.cs
  2. 47
      Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs
  3. 20
      Assets/Scripts/Common/ReportSystem/UIViewQuestionnaire.cs

4
Assets/Scripts/Common/Disasters/Wound_Trapped/HaemalStrand.cs

@ -296,10 +296,10 @@ public class HaemalStrand : MonoBehaviour
safearea.HasWounderNum= safearea.HasWounderNum+1;
if (TargetObj.GetComponent<TrappedMoveFree>())
{
TargetObj.GetComponent<NavMeshAgent>().SetDestination(TargetObj.transform.position);
//TargetObj.GetComponent<NavMeshAgent>().SetDestination(TargetObj.transform.position);
TargetObj.GetComponent<TrappedMoveFree>().TargetPosition = TargetObj.transform.position;
TargetObj.GetComponent<TrappedPathFind>().pathFindEnable = false;
TargetObj.GetComponent<NavMeshAgent>().baseOffset = 0.2f;
//TargetObj.GetComponent<NavMeshAgent>().baseOffset = 0.2f;
TargetObj.GetComponent<TrappedMoveFree>().IsBefirstAirOrMoving = false;
TargetObj.GetComponent<TrappedMoveFree>().OverMoveOrGuidance = true;
TargetObj.GetComponent<TrappedMoveFree>().SaveFrirmanUserId = fireman1.GetComponent<BaseGameObjInfo>().UserID;

47
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<BaseGameObjInfo>().gameObjID)
{
if (IsBefirstAirOrMoving)
{
@ -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.Count > 0)
//{
// if (fireMan.GetComponent<FiremanMoveTrapped>().trappedlist.Contains(info.gameObjID))
// {
// LoadPromptWin.Instance.LoadTextPromptWindow("该人员已跟随移动", 1f);
// return;
// }
// else
// {
// LoadPromptWin.Instance.LoadTextPromptWindow("不能同时移动多名人员", 1f);
// return;
// }
//}
if (!IsMoveState && !OverMoveOrGuidance)
{
if (fireMan.GetComponent<FiremanMoveTrapped>().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("<color=#00aa00ff>" + "sssssssss" + "</color>");
Debug.Log("<color=#00aa00ff>" + "sssssssss"+ "</color>");
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;
}

20
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<List<Question>>("Question.json");
if (ReportDataMgr.IsVictory)
@ -53,7 +60,20 @@ public class UIViewQuestionnaire : UIView
StartCoroutine(CreateItem());
ButtonEnter.GetComponent<Button>().interactable = false;
}
private bool CheckZD()
{
bool has = false;
for (int i = 0; i < CurrentUserInfo.room.UserList.Count; i++)
{
if (CurrentUserInfo.room.UserList[i].Role==Role.)
{
has = true;
break;
}
}
return has;
}
internal void SetSyncData(List<Question> questions)
{
// count +1

Loading…
Cancel
Save