Browse Source

作战部署根据场景中存在的xfss类型显示消防设施

连接泡沫栓可以直接出泡沫
作战部署xfss类型改为选中显示
master
曹衍涛 4 years ago
parent
commit
5598540426
  1. 1518
      Assets/00Sinopec oil depot/Prefab/SceneAll.prefab
  2. 57
      Assets/Editor/SceneToolFloor.cs
  3. 64
      Assets/Scenes/DongYouLiQing.unity
  4. 1
      Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs
  5. 4
      Assets/Scripts/Common/OperationalPreparation/XFSS.cs
  6. 19
      Assets/Scripts/Common/OperationalPreparation/XFSSShowOrHide.cs

1518
Assets/00Sinopec oil depot/Prefab/SceneAll.prefab

File diff suppressed because it is too large Load Diff

57
Assets/Editor/SceneToolFloor.cs

@ -429,11 +429,13 @@ public class SceneToolFloor
}
quad.layer = LayerMask.NameToLayer("FightDeploy");
obj[i].transform.Find("Quad").localScale = new Vector3(3, 3, 3);
quad.gameObject.SetActive(false);
}
else
{
obj[i].transform.Find("Quad").gameObject.layer = LayerMask.NameToLayer("FightDeploy");
obj[i].transform.Find("Quad").localScale = new Vector3(3, 3, 3);
obj[i].transform.Find("Quad").gameObject.SetActive(false);
}
}
@ -511,4 +513,59 @@ public class SceneToolFloor
}
}
}
/// <summary>
/// 须先添加MeshCollider使用,选中消火栓父物体设置
/// </summary>
[MenuItem("SceneTool/SetShiWaiXHS")]
public static void SetShiWaiXHS()
{
Transform[] obj = Selection.GetTransforms(SelectionMode.Deep);
CloneableEnums SNXHS = GameObject.Find("CloneAbleEnumsParent").transform.Find("SNXHS").GetComponent<CloneableEnums>();
{
for (int i = 0; i < obj.Length; i++)
{
if (obj[i].gameObject.GetComponent<MeshCollider>())
{
if (!obj[i].gameObject.GetComponent<CreateStaticObjID>())
{
obj[i].gameObject.AddComponent<CreateStaticObjID>();
}
if (!obj[i].gameObject.GetComponent<CloneableEnums>())
{
obj[i].gameObject.AddComponent<CloneableEnums>();
}
if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>())
{
obj[i].gameObject.AddComponent<CloneGameObjInfo>();
}
if (!obj[i].gameObject.GetComponent<WaterSource>())
{
obj[i].gameObject.AddComponent<WaterSource>();
}
if (!obj[i].gameObject.GetComponent<WATER_SOURCE_INFO_SYNC>())
{
obj[i].gameObject.AddComponent<WATER_SOURCE_INFO_SYNC>();
}
if (!obj[i].gameObject.GetComponent<XFSS>())
{
obj[i].gameObject.AddComponent<XFSS>();
}
obj[i].gameObject.GetComponent<XFSS>().type = XFSSType.;
obj[i].gameObject.GetComponent<CloneableEnums>().CloneableTypes = SNXHS.CloneableTypes;
obj[i].gameObject.GetComponent<WaterSource>().water = true;
if (obj[i].GetComponent<XFSS>())
{
if (obj[i].GetComponent<XFSS>().type==XFSSType.)
{
obj[i].gameObject.GetComponent<WaterSource>().foam = true;
}
}
}
}
}
}
}

64
Assets/Scenes/DongYouLiQing.unity

@ -11880,6 +11880,70 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1761888962, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888967, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888972, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888977, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888982, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888987, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888992, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761888997, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889002, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889007, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889012, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889017, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889022, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889027, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889032, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1761889037, guid: 09c0cccb124191341899682630b4af0f, type: 3}
propertyPath: foam
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6437235523710523079, guid: 09c0cccb124191341899682630b4af0f,
type: 3}
propertyPath: m_IsActive

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

@ -178,7 +178,6 @@ public class TrappedMoveFree : MonoBehaviour
set
{
Debug.Log("<color=#00aa00ff>" + "dssfsda" + "</color>");
targetPosition = value;
}
}

4
Assets/Scripts/Common/OperationalPreparation/XFSS.cs

@ -39,11 +39,11 @@ public class XFSS : MonoBehaviour {
{
if (info.Value)
{
transform.Find("Quad").gameObject.SetActive(false);
transform.Find("Quad").gameObject.SetActive(true);
}
else
{
transform.Find("Quad").gameObject.SetActive(true);
transform.Find("Quad").gameObject.SetActive(false);
}
}
}

19
Assets/Scripts/Common/OperationalPreparation/XFSSShowOrHide.cs

@ -7,6 +7,25 @@ using UnityEngine.UI;
public class XFSSShowOrHide : BaseToggle
{
private void Start()
{
XFSS[] xfsshas = GameObject.Find("SceneAll").GetComponentsInChildren<XFSS>(true);
List<string> type = new List<string>();
for (int i = 0; i < xfsshas.Length; i++)
{
if (!type.Contains(xfsshas[i].type.ToString()))
{
type.Add(xfsshas[i].type.ToString());
}
}
for (int i = 0; i < type.Count; i++)
{
if (!type.Contains(transform.Find("Label").GetComponent<Text>().text))
{
gameObject.SetActive(false);
}
}
}
public override void RespondFun(bool value)
{
string XFSSTyepe = transform.Find("Label").GetComponent<Text>().text;

Loading…
Cancel
Save