Browse Source

1、退出主场景清空演练提示信息

2、灭火机器人不能移动(之前加判断加错位置了)
3、数据统计被营救之后才计入已被营救人员
4、车辆没有做的技能隐藏掉
develop
曹衍涛 5 years ago
parent
commit
225ac8aaab
  1. 4077
      Assets/Resources/ClonePrefabs/Car/ForcibleEntryTruck.prefab
  2. 23
      Assets/Scripts/Common/Cars/TruckSkillPanelController.cs
  3. 2
      Assets/Scripts/Common/DisasterLibrary/DisasterLibraryRecord.cs
  4. 9
      Assets/Scripts/Common/DisasterLibrary/FireLiquidLevelRecord.cs
  5. 21
      Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs
  6. 2
      Assets/Scripts/Common/EquipSystem/MyFrame/UIManager.cs
  7. 50
      Assets/Scripts/Common/ReportSystem/ReportDataMgr.cs
  8. 9
      Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs
  9. 5
      Assets/Scripts/DongYouLiQing/LeadGroup/DrillBeginButton.cs

4077
Assets/Resources/ClonePrefabs/Car/ForcibleEntryTruck.prefab

File diff suppressed because it is too large Load Diff

23
Assets/Scripts/Common/Cars/TruckSkillPanelController.cs

@ -763,7 +763,8 @@ public class TruckSkillPanelController : MonoBehaviour
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills., TruckSkills.,TruckSkills., TruckSkills., TruckSkills.,TruckSkills.,
TruckSkills., TruckSkills. TruckSkills.,
TruckSkills.
}; };
break; break;
case CloneObjType.HighSprayingTruck: case CloneObjType.HighSprayingTruck:
@ -778,38 +779,44 @@ public class TruckSkillPanelController : MonoBehaviour
case CloneObjType.SmokeExhaustTruck: case CloneObjType.SmokeExhaustTruck:
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills.,TruckSkills. TruckSkills.,
//TruckSkills.排烟
}; };
break; break;
case CloneObjType.RescueVehicle: case CloneObjType.RescueVehicle:
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills.,TruckSkills. TruckSkills.,
//TruckSkills.拖车
}; };
break; break;
case CloneObjType.LightingAppliance: case CloneObjType.LightingAppliance:
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills.,TruckSkills. TruckSkills.,
//TruckSkills.照明
}; };
break; break;
case CloneObjType.Apparatus: case CloneObjType.Apparatus:
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills.,TruckSkills. TruckSkills.,
//TruckSkills.器材选择
}; };
break; break;
case CloneObjType.AirSupplyTruck: case CloneObjType.AirSupplyTruck:
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills.,TruckSkills. TruckSkills.,
//TruckSkills.充气
}; };
break; break;
case CloneObjType.ForcibleEntryTruck: case CloneObjType.ForcibleEntryTruck:
resultList = new List<TruckSkills>() resultList = new List<TruckSkills>()
{ {
TruckSkills.,TruckSkills., TruckSkills.,
TruckSkills.,TruckSkills.,TruckSkills., //TruckSkills.破拆,
//TruckSkills.固定支架,TruckSkills.自动举臂,TruckSkills.收回举臂,
}; };
break; break;
} }

2
Assets/Scripts/Common/DisasterLibrary/DisasterLibraryRecord.cs

@ -9,7 +9,7 @@ using System;
/// </summary> /// </summary>
public abstract class DisasterLibraryRecord : MonoBehaviour { public abstract class DisasterLibraryRecord : MonoBehaviour {
public virtual void OnEnable() public virtual void Start()
{ {
MessageDispatcher.AddListener("DISASTER_LIBRARY_RECORD",DLRecord); MessageDispatcher.AddListener("DISASTER_LIBRARY_RECORD",DLRecord);
} }

9
Assets/Scripts/Common/DisasterLibrary/FireLiquidLevelRecord.cs

@ -18,6 +18,10 @@ public class FireLiquidLevelRecord : DisasterLibraryRecord
public override void DisasterRecord(Disaster disaster) public override void DisasterRecord(Disaster disaster)
{ {
if (transform == null)
{
return;
}
base.DisasterRecord(disaster); base.DisasterRecord(disaster);
((FireLiquidLevelDisaster)disaster).fireScale = GetComponent<FireLiquidLevelCtrl>().FireScale; ((FireLiquidLevelDisaster)disaster).fireScale = GetComponent<FireLiquidLevelCtrl>().FireScale;
@ -26,4 +30,9 @@ public class FireLiquidLevelRecord : DisasterLibraryRecord
DisasterLibraryFile.Instance.DisasterRecord(disaster); DisasterLibraryFile.Instance.DisasterRecord(disaster);
} }
public override void OnDestroy()
{
base.OnDestroy();
Debug.LogError(gameObject.name);
}
} }

21
Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs

@ -591,10 +591,29 @@ public class TrappedMoveFree : MonoBehaviour
msg.buildNum = safe.GetComponent<CloneGameObjInfo>().buildNum; msg.buildNum = safe.GetComponent<CloneGameObjInfo>().buildNum;
msg.floorNum = safe.GetComponent<CloneGameObjInfo>().floorNum; msg.floorNum = safe.GetComponent<CloneGameObjInfo>().floorNum;
msg.interlayerNum = safe.GetComponent<CloneGameObjInfo>().interlayerNum; msg.interlayerNum = safe.GetComponent<CloneGameObjInfo>().interlayerNum;
StartCoroutine(checkguide());
} }
} }
IEnumerator checkguide()
{
while (Guidance&&!OverMoveOrGuidance)
{
yield return new WaitForSeconds(10f);
if (Vector3.Distance(transform.position, guidPoint[0]) > 1f)
{
if (CurrentUserInfo.mySelf.Id==CurrentUserInfo.room.Owner.UserInfo.Id)
{
TrappedPathFindingCmdArgs arg = new TrappedPathFindingCmdArgs();
arg.hitPoint = guidPoint[0];
targetPosition = guidPoint[0];
arg.gameObjIdSelf = GetComponent<BaseGameObjInfo>().gameObjID;
TrappedPathFindingCommand.Instance.Execute(GetComponent<BaseGameObjInfo>().gameObjID, arg);
}
}
}
}
private void AddGuidIndex() private void AddGuidIndex()
{ {
//if (!Guidance) //if (!Guidance)

2
Assets/Scripts/Common/EquipSystem/MyFrame/UIManager.cs

@ -246,7 +246,7 @@ public static class UIManager
// 销毁页面 // 销毁页面
public static void DestroyView(string viewName) public static void DestroyView(string viewName)
{ {
if (Views.ContainsKey(viewName)) if (Views!=null&&Views.ContainsKey(viewName)&&viewName!=null)
{ {
Views.Remove(viewName); Views.Remove(viewName);
} }

50
Assets/Scripts/Common/ReportSystem/ReportDataMgr.cs

@ -489,38 +489,46 @@ public class ReportDataMgr
// 自己救的轻伤员 // 自己救的轻伤员
foreach (var item in allTrappedPerson) foreach (var item in allTrappedPerson)
{ {
TrappedMoveFree cloneGameObjInfo = item.GetComponent<TrappedMoveFree>(); if (item && item.GetComponent<TrappedMoveFree>())
if (cloneGameObjInfo.SaveFrirmanUserId == CurrentUserInfo.mySelf.Id)
{ {
totalSaveTrappedCount += 1; TrappedMoveFree cloneGameObjInfo = item.GetComponent<TrappedMoveFree>();
} if (cloneGameObjInfo.SaveFrirmanUserId == CurrentUserInfo.mySelf.Id&&cloneGameObjInfo.OverMoveOrGuidance)
// 下级救的人
foreach (var id in allSubId)
{
if (cloneGameObjInfo.SaveFrirmanUserId == id)
{ {
totalSaveTrappedCount += 1; totalSaveTrappedCount += 1;
break; }
// 下级救的人
foreach (var id in allSubId)
{
if (cloneGameObjInfo.SaveFrirmanUserId == id && cloneGameObjInfo.OverMoveOrGuidance)
{
totalSaveTrappedCount += 1;
break;
}
} }
} }
} }
// 自己救的重伤员 // 自己救的重伤员
foreach (var item in allWoundedPerson) foreach (var item in allWoundedPerson)
{ {
WoundedSave cloneGameObjInfo = item.GetComponent<WoundedSave>(); if (item&&item.GetComponent<WoundedSave>())
if (cloneGameObjInfo.SaveFrirmanUserId == CurrentUserInfo.mySelf.Id)
{ {
totalSaveWoundedCount += 1; WoundedSave cloneGameObjInfo = item.GetComponent<WoundedSave>();
} if (cloneGameObjInfo.SaveFrirmanUserId == CurrentUserInfo.mySelf.Id&& cloneGameObjInfo.OverMoveOrGuidance)
// 下级救的人
foreach (var id in allSubId)
{
if (cloneGameObjInfo.SaveFrirmanUserId == id)
{ {
totalSaveWoundedCount += 1; totalSaveWoundedCount += 1;
break; }
// 下级救的人
foreach (var id in allSubId)
{
if (cloneGameObjInfo.SaveFrirmanUserId == id && cloneGameObjInfo.OverMoveOrGuidance)
{
totalSaveWoundedCount += 1;
break;
}
} }
} }
} }
} }
} }
@ -873,6 +881,7 @@ public class ReportDataMgr
// 获取表现最好的指挥 // 获取表现最好的指挥
public static string GetZhiHuiBest() public static string GetZhiHuiBest()
{ {
ReportDataMgr.GetActInPersonCount();
// 计算最高票数 // 计算最高票数
float max = ZhiHuiScore.Max(i => i.Value); float max = ZhiHuiScore.Max(i => i.Value);
string name = ZhiHuiScore.Find(i => i.Value == max).Key; string name = ZhiHuiScore.Find(i => i.Value == max).Key;
@ -900,6 +909,7 @@ public class ReportDataMgr
// 获取灭火平均分 // 获取灭火平均分
public static float GetFireScore() public static float GetFireScore()
{ {
ReportDataMgr.GetActInPersonCount();
float score = 0; float score = 0;
foreach (var item in FireScore) foreach (var item in FireScore)
{ {
@ -910,6 +920,7 @@ public class ReportDataMgr
// 获取救人平均分 // 获取救人平均分
public static float GetSaveScore() public static float GetSaveScore()
{ {
ReportDataMgr.GetActInPersonCount();
float score = 0; float score = 0;
foreach (var item in SaveScore) foreach (var item in SaveScore)
{ {
@ -920,6 +931,7 @@ public class ReportDataMgr
// 获取侦察平均分 // 获取侦察平均分
public static float GetLookAtScore() public static float GetLookAtScore()
{ {
ReportDataMgr.GetActInPersonCount();
float score = 0; float score = 0;
foreach (var item in LookAtScore) foreach (var item in LookAtScore)
{ {
@ -930,6 +942,7 @@ public class ReportDataMgr
// 获取冷却平均分 // 获取冷却平均分
public static float GetCoolScore() public static float GetCoolScore()
{ {
ReportDataMgr.GetActInPersonCount();
float score = 0; float score = 0;
foreach (var item in CoolScore) foreach (var item in CoolScore)
{ {
@ -940,6 +953,7 @@ public class ReportDataMgr
// 获取供水平均分 // 获取供水平均分
public static float GetWaterScore() public static float GetWaterScore()
{ {
ReportDataMgr.GetActInPersonCount();
float score = 0; float score = 0;
foreach (var item in WaterScore) foreach (var item in WaterScore)
{ {

9
Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs

@ -140,12 +140,13 @@ public class FireRobotLayWaterHose : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if (remainlenght<=0.5f)
{
agent.SetDestination(transform.position);
}
if (flag && agent.velocity.magnitude > 0) //开启“铺设水带”,并且开始寻路时才会执行 if (flag && agent.velocity.magnitude > 0) //开启“铺设水带”,并且开始寻路时才会执行
{ {
if (remainlenght <= 0.5f)
{
agent.SetDestination(transform.position);
}
HasUseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20); HasUseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20);
ParentLayHose.GetComponent<ParentLayWaterHoseMsg>().LineLenght = GetSelfConsumedLength(); ParentLayHose.GetComponent<ParentLayWaterHoseMsg>().LineLenght = GetSelfConsumedLength();
ParentLayHose.GetComponent<ParentLayWaterHoseMsg>().UseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20); ParentLayHose.GetComponent<ParentLayWaterHoseMsg>().UseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20);

5
Assets/Scripts/DongYouLiQing/LeadGroup/DrillBeginButton.cs

@ -23,6 +23,11 @@ public class DrillBeginButton : BaseButton
{ {
P_Disaster = GameObject.Find("P_AllParent").transform.Find("P_Disasters"); P_Disaster = GameObject.Find("P_AllParent").transform.Find("P_Disasters");
} }
public override void OnDestroy()
{
base.OnDestroy();
vicHint = "";
}
public override void RespondFun() public override void RespondFun()
{ {

Loading…
Cancel
Save