Browse Source

演练相关问题修复

master
杨栋梁 3 years ago
parent
commit
d5688649ff
  1. 18
      Assets/MscPublic/Assets/Scripts/MainScene/FloorControlModule/UIFloor.cs
  2. 2
      Assets/Prefabs/DongYouLiQing/P_AllParent.prefab
  3. 16
      Assets/Resources/ClonePrefabs/DisasterPrefabs/TrappedPerson.prefab
  4. 4
      Assets/Resources/ClonePrefabs/Tool/SafeArea.prefab
  5. 112
      Assets/Scripts/Common/DisasterLibrary/DisasterLoad.cs
  6. 54
      Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs
  7. 14
      Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedPathFind.cs
  8. 4
      Assets/Scripts/Common/GameObjectCtrl/ObjRotate.cs
  9. 46
      Assets/Scripts/Common/InputSystem/InputManager/InputManager.cs
  10. 3
      Assets/Scripts/Common/NetworkSystem/NetWorkSync/OBJ_ROTATE_SYNC.cs
  11. 4
      Assets/Scripts/Common/NetworkSystem/NetWorkSync/PATHFIND_SYNC.cs
  12. 4
      Assets/Scripts/Common/Tools/SafeAreaMessage.cs
  13. 50
      Assets/Scripts/DongYouLiQing/BaseCommander/SkillPanel/FireManSkillPanelController.cs
  14. 4
      Assets/Scripts/SmartX1/SmartController.cs

18
Assets/MscPublic/Assets/Scripts/MainScene/FloorControlModule/UIFloor.cs

@ -96,7 +96,12 @@ public class UIFloor : BaseToggle
}
foreach (var item in floorsPanelManager.AllWai)
{
item.gameObject.SetActive(true);
Renderer[] renderers = item.GetComponentsInChildren<Renderer>();
for (int i = 0; i < renderers.Length; i++)
{
renderers[i].enabled = true;
}
//item.gameObject.SetActive(true);
}
ShowCloneObj();
}
@ -109,7 +114,12 @@ public class UIFloor : BaseToggle
{
if (item.buildNum == data.buildNum && item.floorNum > data.floorNum && Mathf.Abs(item.floorNum) > 0)
{
item.gameObject.SetActive(false);
Renderer[] renderers = item.GetComponentsInChildren<Renderer>();
for (int i = 0; i < renderers.Length; i++)
{
renderers[i].enabled = false;
}
//item.gameObject.SetActive(false);
}
}
@ -139,7 +149,7 @@ public class UIFloor : BaseToggle
}
if (MyTarget != null/* && floorNum == 0*/)//镜头拉近
{
cameraManager.SetCameraView(MyTarget.position, FollowCameraDistance,-110,52);
cameraManager.SetCameraView(MyTarget.position, FollowCameraDistance,50,52);
}
//if (RecordData.isRecording())
//{
@ -206,7 +216,7 @@ public class UIFloor : BaseToggle
{
if (objs[i].gameObject == SelectedObjs.selectedObj || SelectedObjs.selectedCharacters.Contains( objs[i].gameObject))
{
break;
continue;
}
//if (string.IsNullOrEmpty(objs[i].buildNum))
//{//克隆在地面上的物体

2
Assets/Prefabs/DongYouLiQing/P_AllParent.prefab

@ -1197,7 +1197,7 @@ MonoBehaviour:
type: 3}
cloneObjType: 106
Height: 0.2
AreaPrefabSize: 20
AreaPrefabSize: 10
cloneAble: 0
--- !u!114 &114948936895584374
MonoBehaviour:

16
Assets/Resources/ClonePrefabs/DisasterPrefabs/TrappedPerson.prefab

@ -1047,16 +1047,16 @@ NavMeshAgent:
m_GameObject: {fileID: 1827870700707724}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.5
m_Radius: 0.1
m_Speed: 2.5
m_Acceleration: 8
m_Acceleration: 80
avoidancePriority: 50
m_AngularSpeed: 120
m_StoppingDistance: 1.5
m_AngularSpeed: 400
m_StoppingDistance: 0.5
m_AutoTraverseOffMeshLink: 1
m_AutoBraking: 1
m_AutoRepath: 1
m_Height: 2
m_Height: 1.5
m_BaseOffset: 0
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
@ -1254,13 +1254,13 @@ CharacterController:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Height: 2
m_Radius: 0.3
m_Height: 1.89
m_Radius: 0.26
m_SlopeLimit: 45
m_StepOffset: 0.3
m_SkinWidth: 0.08
m_MinMoveDistance: 0.001
m_Center: {x: 0, y: 1, z: 0}
m_Center: {x: 0, y: 0.92, z: 0}
--- !u!114 &2594175076028504782
MonoBehaviour:
m_ObjectHideFlags: 0

4
Assets/Resources/ClonePrefabs/Tool/SafeArea.prefab

@ -40,7 +40,7 @@ Transform:
m_GameObject: {fileID: 1688105851940198}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -569.1, y: 0.3, z: -480.8}
m_LocalScale: {x: 1.5, y: 1, z: 1.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -187,7 +187,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a2cecff9aa0169343bb23ed89a955a6c, type: 3}
m_Name:
m_EditorClassIdentifier:
sideLength: 20
sideLength: 10
hasWounderNum: 0
--- !u!114 &114330804224454362
MonoBehaviour:

112
Assets/Scripts/Common/DisasterLibrary/DisasterLoad.cs

@ -269,6 +269,17 @@ public class DisasterLoad : MonoBehaviour
clonesync.gameObjType = cloneGameObjInfo.gameObjType;
clonesync.UserID = cloneGameObjInfo.UserID;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
obj.GetComponent<SmokeCtrl>().smokeAttribute = SmokeDisaster.smokeAttribute;
@ -328,6 +339,17 @@ public class DisasterLoad : MonoBehaviour
clonesync.gameObjType = cloneGameObjInfo.gameObjType;
clonesync.UserID = cloneGameObjInfo.UserID;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
@ -496,6 +518,17 @@ public class DisasterLoad : MonoBehaviour
NetworkManager.Default.SendAsync("SET_LIQUIP_HIDE_SYNC", obj.GetComponent<BaseGameObjInfo>().gameObjID);
}
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var argrotate = new ObjRotateSyncData();
argrotate.SendUserID = CurrentUserInfo.mySelf.Id;
argrotate.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
argrotate.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
argrotate.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
}
@ -545,6 +578,17 @@ public class DisasterLoad : MonoBehaviour
clonesync.UserID = cloneGameObjInfo.UserID;
clonesync.HitObjID = Leak1Disaster.OilTankId;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
@ -603,6 +647,17 @@ public class DisasterLoad : MonoBehaviour
arg.gameObjID = cloneGameObjInfo.gameObjID;
arg.Level = Leak2Disaster.level;
NetworkManager.Default.SendAsync("SET_LEAK2_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var argrotate = new ObjRotateSyncData();
argrotate.SendUserID = CurrentUserInfo.mySelf.Id;
argrotate.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
argrotate.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
argrotate.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
}
@ -650,6 +705,17 @@ public class DisasterLoad : MonoBehaviour
clonesync.gameObjType = cloneGameObjInfo.gameObjType;
clonesync.UserID = cloneGameObjInfo.UserID;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
}
@ -696,6 +762,17 @@ public class DisasterLoad : MonoBehaviour
clonesync.gameObjType = cloneGameObjInfo.gameObjType;
clonesync.UserID = cloneGameObjInfo.UserID;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
}
@ -742,6 +819,17 @@ public class DisasterLoad : MonoBehaviour
clonesync.gameObjType = cloneGameObjInfo.gameObjType;
clonesync.UserID = cloneGameObjInfo.UserID;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
@ -788,6 +876,16 @@ public class DisasterLoad : MonoBehaviour
clonesync.gameObjType = cloneGameObjInfo.gameObjType;
clonesync.UserID = cloneGameObjInfo.UserID;
NetworkManager.Default.SendAsync("CLONE_SINGLE_DISASTER_SYNC", clonesync);
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if (obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
@ -866,8 +964,20 @@ public class DisasterLoad : MonoBehaviour
data.SendUserID = CurrentUserInfo.mySelf.Id;
NetworkManager.Default.SendAsync("FORCIBLE_SCALE_SYNC", data);
}
//旋转同步,加载灾情导掉足同步克隆只同步了位置,没有同步旋转,所以要在同步一遍旋转
if(obj.GetComponent<OBJ_ROTATE_SYNC>())
{
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = obj.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = obj.transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
}
}
}
}

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

@ -626,21 +626,23 @@ public class TrappedMoveFree : MonoBehaviour
return;
}
Guidance = true;
for (int i = 0; i < guidPoint.Count - 1; i++)
{
for (int k = guidPoint.Count - 2; k > i; k--)
{
float distance = Vector3.Distance(guidPoint[i], guidPoint[k]);//计算两点的距离
if (distance < 5)
{
for (int j = k; j > i; j--)
{
guidPoint.RemoveAt(j);
}
break;
}
}
}
//一处距离进的两个点
//for (int i = 0; i < guidPoint.Count - 1; i++)
//{
// for (int k = guidPoint.Count - 2; k > i; k--)
// {
// float distance = Vector3.Distance(guidPoint[i], guidPoint[k]);//计算两点的距离
// if (distance < 5)
// {
// for (int j = k; j > i; j--)
// {
// guidPoint.RemoveAt(j);
// }
// break;
// }
// }
//}
TargetPosition = guidPoint[0];
SaveFrirmanUserId = fireman.GetComponent<BaseGameObjInfo>().UserID;
//引导同步
@ -667,7 +669,25 @@ public class TrappedMoveFree : MonoBehaviour
}
}
public bool HasPath( List<Vector3> guidPoint)
{
bool has=true;
guidPoint.Insert(0,transform.position);
for (int i = 0; i < guidPoint.Count - 1; i++)
{
for (int k = guidPoint.Count - 2; k > i; k--)
{
List<Vector3> corners = new List<Vector3>();
var haspath = GetComponent<TrappedPathFind>().SetPathCorners(guidPoint[i], guidPoint[k], corners);
if (!haspath)
{
has = false;
}
}
}
return has;
}
IEnumerator checkguide()
{
while (Guidance && !OverMoveOrGuidance)
@ -943,7 +963,7 @@ public class TrappedMoveFree : MonoBehaviour
TrappedPathFindingCommand.Instance.Execute(GetComponent<BaseGameObjInfo>().gameObjID, arg);
}
}
if (Vector3.Distance(transform.position, guidPoint[0]) < 2)
if (Vector3.Distance(transform.position, guidPoint[0]) < 0.6f)
{
Guidance = false;
movestate = MoveState.IDLE;

14
Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedPathFind.cs

@ -165,7 +165,7 @@ public class TrappedPathFind : MonoBehaviour
}
}
}
bool setPathCorners(Vector3 sourcePosition, Vector3 targetPosition, List<Vector3> corners)
public bool setPathCorners(Vector3 sourcePosition, Vector3 targetPosition, List<Vector3> corners)
{
NavMeshPath NavMeshPath = new NavMeshPath();
NavMesh.CalculatePath(sourcePosition, targetPosition, filter, NavMeshPath);
@ -257,9 +257,9 @@ public class TrappedPathFind : MonoBehaviour
}
private void setFloorMessage()
{
//设置寻路对象楼层属性
//璁剧疆瀵昏矾瀵硅薄妤煎眰灞炴€?
Vector3 adPos2 = transform.position;
Ray ray = new Ray(adPos2, -Vector3.up);
Ray ray = new Ray(adPos2 + Vector3.up, Vector3.down);
RaycastHit hit = new RaycastHit();
if (Physics.Raycast(ray, out hit, 1000, LayerMask.GetMask("SoldierRoad", "CarRoad")))
{
@ -274,6 +274,12 @@ public class TrappedPathFind : MonoBehaviour
}
}
}
/// <summary>
/// 判断当前位置到目标点是否能到达
/// </summary>
/// <param name="endpoint"></param>
/// <param name="corners"></param>
/// <returns></returns>
public List<Vector3> GetPathCornert(Vector3 endpoint, List<Vector3> corners)
{
List<Vector3> gocornert = new List<Vector3>();
@ -291,7 +297,7 @@ public class TrappedPathFind : MonoBehaviour
/// <param name="destinationPos">终点位置</param>
/// <param name="corners">可寻路路径拐角点集合</param>
/// <returns>返回是否有可寻路路径</returns>
private bool SetPathCorners(Vector3 startingPos, Vector3 destinationPos, List<Vector3> corners)
public bool SetPathCorners(Vector3 startingPos, Vector3 destinationPos, List<Vector3> corners)
{
NavMesh.CalculatePath(startingPos, destinationPos, filter, path);
Vector3[] tempCorners = new Vector3[path.corners.Length];

4
Assets/Scripts/Common/GameObjectCtrl/ObjRotate.cs

@ -54,7 +54,7 @@ public class ObjRotate : MonoBehaviour {
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = gameObject.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = new Vector3(0, -Time.deltaTime * rotateSpeed, 0);
arg.rotate = transform.rotation.eulerAngles;//new Vector3(0, -Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}
@ -73,7 +73,7 @@ public class ObjRotate : MonoBehaviour {
var arg = new ObjRotateSyncData();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = gameObject.GetComponent<BaseGameObjInfo>().gameObjID;
arg.rotate = new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.rotate = transform.rotation.eulerAngles;//new Vector3(0, Time.deltaTime * rotateSpeed, 0);
arg.space = Space.World;
NetworkManager.Default.SendAsync("OBJ_ROTATE_SYNC", arg);
}

46
Assets/Scripts/Common/InputSystem/InputManager/InputManager.cs

@ -1636,9 +1636,49 @@ public class InputManager : MonoBehaviour
{
if (!GuidanceList.Contains(hit.point))
{
GuidanceList.Add(hit.point);
GameObject hitpart = Instantiate(pointer,hit.point,Quaternion.identity);
hitpart.transform.parent = p_Hitpoint;
if(SelectedObjs.selectedCharacters[0].GetComponent<FiremanMoveTrapped>().GuidanceTrapped!=null)
{
List<Vector3> corn = new List<Vector3>();
//添加第一个点,判断被困人员当前位置能不能到达点击的点
if (GuidanceList.Count == 0)
{
bool can= SelectedObjs.selectedCharacters[0].GetComponent<FiremanMoveTrapped>().
GuidanceTrapped.GetComponent<TrappedPathFind>()
.setPathCorners(SelectedObjs.selectedCharacters[0].GetComponent<FiremanMoveTrapped>().
GuidanceTrapped.transform.position, hitpoint.point, corn);
if (can)
{
GuidanceList.Add(hit.point);
GameObject hitpart = Instantiate(pointer, hit.point, Quaternion.identity);
hitpart.transform.parent = p_Hitpoint;
}
else
{
LoadPromptWin.Instance.LoadTextPromptWindow("被困人员不能从上一个引导点到达该点", 2f);
}
}
//后续添加其他点
else
{
bool can = SelectedObjs.selectedCharacters[0].GetComponent<FiremanMoveTrapped>().
GuidanceTrapped.GetComponent<TrappedPathFind>()
.setPathCorners(GuidanceList[GuidanceList.Count - 1], hitpoint.point, corn);
if (can)
{
GuidanceList.Add(hit.point);
GameObject hitpart = Instantiate(pointer, hit.point, Quaternion.identity);
hitpart.transform.parent = p_Hitpoint;
}
else
{
LoadPromptWin.Instance.LoadTextPromptWindow("被困人员不能从上一个引导点到达该点", 2f);
}
}
}
}
}
}

3
Assets/Scripts/Common/NetworkSystem/NetWorkSync/OBJ_ROTATE_SYNC.cs

@ -21,7 +21,8 @@ public class OBJ_ROTATE_SYNC : NetworkMessageBehaviour
{
if (GetComponent<BaseGameObjInfo>().gameObjID==info.gameObjID)
{
transform.Rotate(info.rotate.x,info.rotate.y,info.rotate.z,info.space);
//transform.Rotate(info.rotate.x,info.rotate.y,info.rotate.z,info.space);
transform.eulerAngles = info.rotate;
}
}
}

4
Assets/Scripts/Common/NetworkSystem/NetWorkSync/PATHFIND_SYNC.cs

@ -158,7 +158,7 @@ public class PATHFIND_SYNC : NetworkMessageBehaviour
{
//setFloorMessage();
}
if (objinfo.gameObjType == CloneObjType.fireman)
if (objinfo.gameObjType == CloneObjType.fireman|| objinfo.gameObjType==CloneObjType.trappedPerson)
{
setFloorMessage();
@ -169,7 +169,7 @@ public class PATHFIND_SYNC : NetworkMessageBehaviour
}
if (i == corners.Count)
{
if (objinfo.gameObjType == CloneObjType.fireman)
if (objinfo.gameObjType == CloneObjType.fireman || objinfo.gameObjType == CloneObjType.trappedPerson)
{
setFloorMessage();

4
Assets/Scripts/Common/Tools/SafeAreaMessage.cs

@ -7,7 +7,7 @@ using AX.NetworkSystem;
public class SafeAreaMessage : MonoBehaviour {
public float sideLength = 20;//安全区边长
public float sideLength = 10;//安全区边长
private bool flag;
public int hasWounderNum=0;
@ -68,7 +68,7 @@ public class SafeAreaMessage : MonoBehaviour {
//z与行数线性相关
float z = 2 * tens - 4f;
float x = (-1) * units + 4.5f;
pos = new Vector3(2*x,0.25f,2*z);
pos = new Vector3(1*x,0.25f,1*z);
}
return pos;
}

50
Assets/Scripts/DongYouLiQing/BaseCommander/SkillPanel/FireManSkillPanelController.cs

@ -623,21 +623,45 @@ public class FireManSkillPanelController : MonoBehaviour
if (InputManager.GuidanceList.Count > 0 &&
(Mathf.Abs(guidendpos.x - safepos.x) < 10 && Mathf.Abs(guidendpos.z - safepos.z) < 10))
{
//引导命令
GuideLodeCmdArgs arg = new GuideLodeCmdArgs();
arg.pathpointList = InputManager.GuidanceList;
arg.FireManID = SelectFireMan.GetComponent<BaseGameObjInfo>().gameObjID;
arg.TrappedID = SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped.GetComponent<BaseGameObjInfo>().gameObjID;
TrappedMoveFollowGuidePointCommand.Instance.Execute(SelectFireMan.GetComponent<BaseGameObjInfo>().gameObjID, arg);
InputManager.skill = false;
InputManager.IsGuidance = false;
InputManager.GuidanceList.Clear();
for (int i = 0; i < p_Hitpoint.childCount; i++)
//if (SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped.GetComponent<TrappedMoveFree>().HasPath(InputManager.GuidanceList))
{
Destroy(p_Hitpoint.GetChild(i).gameObject);
//引导命令
GuideLodeCmdArgs arg = new GuideLodeCmdArgs();
arg.pathpointList = InputManager.GuidanceList;
arg.FireManID = SelectFireMan.GetComponent<BaseGameObjInfo>().gameObjID;
arg.TrappedID = SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped.GetComponent<BaseGameObjInfo>().gameObjID;
TrappedMoveFollowGuidePointCommand.Instance.Execute(SelectFireMan.GetComponent<BaseGameObjInfo>().gameObjID, arg);
InputManager.skill = false;
InputManager.IsGuidance = false;
InputManager.GuidanceList.Clear();
for (int i = 0; i < p_Hitpoint.childCount; i++)
{
Destroy(p_Hitpoint.GetChild(i).gameObject);
}
SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped = null;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
}
SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped = null;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
//else
//{
// InputManager.GuidanceList.Clear();
// for (int i = 0; i < p_Hitpoint.childCount; i++)
// {
// Destroy(p_Hitpoint.GetChild(i).gameObject);
// }
// LoadPromptWin.Instance.LoadTextPromptWindow("不能将伤员引导至安全区,请重新规划路线", 3f);
// InputManager.skill = false;
// SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
// InputManager.GuidanceList.Clear();
// InputManager.IsGuidance = false;
// if (SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped != null)
// {
// //SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped.GetComponent<TrappedMoveFree>().Guidance = false;
// SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped.GetComponent<TrappedMoveFree>().CancelGuidance();
// SelectFireMan.GetComponent<FiremanMoveTrapped>().GuidanceTrapped = null;
// }
// SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
//}
}
else

4
Assets/Scripts/SmartX1/SmartController.cs

@ -116,7 +116,7 @@ public class SmartController : MonoBehaviour
{
//Debug.Log(keyHandles[0]);
//Debug.Log("异常" + ex.Message);
//GameObject.Find("Application").GetComponent<ApplicationClose>().isSmartX1Exit = true;
// GameObject.Find("Application").GetComponent<ApplicationClose>().isSmartX1Exit = true;
Application.Quit();
return false;
}
@ -140,7 +140,7 @@ public class SmartController : MonoBehaviour
if (t2 - t1 > new TimeSpan(0, 0, 5))
{
//Debug.Log("程序退出!");
// GameObject.Find("Application").GetComponent<ApplicationClose>().isSmartX1Exit = true;
//GameObject.Find("Application").GetComponent<ApplicationClose>().isSmartX1Exit = true;
Application.Quit();
}
}

Loading…
Cancel
Save