警示窗
This commit is contained in:
parent
8ae97dee20
commit
0cc4f10ed1
@ -501,6 +501,7 @@ MonoBehaviour:
|
||||
addBtn: {fileID: 0}
|
||||
subtractBtn: {fileID: 0}
|
||||
jsonReader1: {fileID: 1417128757}
|
||||
warningPopPanel1: {fileID: 447504741}
|
||||
--- !u!1 &287151818
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1156,7 +1157,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 447504738}
|
||||
- component: {fileID: 447504740}
|
||||
- component: {fileID: 447504739}
|
||||
- component: {fileID: 447504741}
|
||||
m_Layer: 5
|
||||
m_Name: WarningPop
|
||||
m_TagString: Untagged
|
||||
@ -1176,6 +1177,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1884689974}
|
||||
- {fileID: 1790987176}
|
||||
m_Father: {fileID: 1592869153}
|
||||
m_RootOrder: 7
|
||||
@ -1185,36 +1187,6 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: -0.0088888}
|
||||
m_SizeDelta: {x: 1920, y: 1080}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &447504739
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 447504737}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 0d341980b0d10594ebff2c7fab7fb1d3, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &447504740
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1223,6 +1195,20 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 447504737}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &447504741
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 447504737}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9d22682848613f4488467b1f6b3f402b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
closeBtn: {fileID: 1241914629}
|
||||
showText: {fileID: 1468625400}
|
||||
--- !u!1 &452024856
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2546,6 +2532,7 @@ MonoBehaviour:
|
||||
jsonReader1: {fileID: 1417128757}
|
||||
selectScenePanel: {fileID: 7468736064579811982}
|
||||
datePanel: {fileID: 468742199}
|
||||
warningPopPanel: {fileID: 447504741}
|
||||
--- !u!114 &618256463
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4398,7 +4385,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -1184
|
||||
value: -764
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@ -6114,7 +6101,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.56078434, g: 0.6862745, b: 0.81568635, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@ -7680,7 +7667,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 197.98004, y: 11.888}
|
||||
m_AnchoredPosition: {x: 0, y: 11.888}
|
||||
m_SizeDelta: {x: 269.8211, y: 81.795}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1241914627
|
||||
@ -7696,7 +7683,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.24313726}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@ -9641,7 +9628,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.18039216, g: 0.23137257, b: 0.36078432, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@ -11111,7 +11098,7 @@ RectTransform:
|
||||
- {fileID: 671339046}
|
||||
- {fileID: 1046922002}
|
||||
m_Father: {fileID: 447504738}
|
||||
m_RootOrder: 0
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -11355,6 +11342,10 @@ PrefabInstance:
|
||||
propertyPath: selectScene
|
||||
value:
|
||||
objectReference: {fileID: 7468736064579811982}
|
||||
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: warningPopPanel
|
||||
value:
|
||||
objectReference: {fileID: 447504741}
|
||||
- target: {fileID: 2102021661377337229, guid: 86668fbe8407a8741bb903177bc93fdb, type: 3}
|
||||
propertyPath: jueseChoicePanel
|
||||
value:
|
||||
@ -11795,6 +11786,82 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1814351535}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1884689973
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1884689974}
|
||||
- component: {fileID: 1884689976}
|
||||
- component: {fileID: 1884689975}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1884689974
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884689973}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 447504738}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -0.000061035, y: -0.000061035}
|
||||
m_SizeDelta: {x: 1920, y: 1080}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1884689975
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884689973}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 0d341980b0d10594ebff2c7fab7fb1d3, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1884689976
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884689973}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1885878471
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -94,6 +94,7 @@ public class Panel : Base
|
||||
public JSONReader jsonReader1;
|
||||
public SelectScenePanel selectScenePanel;
|
||||
public DatePanel datePanel;
|
||||
public WarningPopPanel warningPopPanel;
|
||||
|
||||
private bool isPersonSelected = false; // 标志是否选择了人员
|
||||
private bool isDutySelected = false; // 标志是否选择了职责
|
||||
@ -298,21 +299,27 @@ public class Panel : Base
|
||||
//处理人员管理按钮
|
||||
public void ClickPersonnelManagement()
|
||||
{
|
||||
foreach (Transform child in panelContent)
|
||||
if (sceneDataDictionary.Count != 0)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
foreach (Transform child in panelContent)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
foreach (var sceneEntry in sceneDataDictionary)
|
||||
{
|
||||
GameObject managerPanelInstance = Instantiate(ManagerPanelPrefab, panelContent);
|
||||
Button button = managerPanelInstance.GetComponent<Button>();
|
||||
button.onClick.AddListener(() => managerPanel1.OnItemClicked(managerPanelInstance));
|
||||
Text sceneText = managerPanelInstance.transform.Find("top/sceneName").GetComponent<Text>();
|
||||
sceneText.text = sceneEntry.Key;
|
||||
managerPanel1.CreateScenePanel(sceneEntry.Key, sceneEntry.Value, managerPanelInstance);
|
||||
//managerPanel1.SetPlate();
|
||||
ManagerPanel.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
foreach (var sceneEntry in sceneDataDictionary)
|
||||
else
|
||||
{
|
||||
//Debug.Log($"³¡¾°: {sceneEntry.Key}£¬ÈËÊý: {sceneEntry.Value.Count}");
|
||||
GameObject managerPanelInstance = Instantiate(ManagerPanelPrefab, panelContent);
|
||||
Button button = managerPanelInstance.GetComponent<Button>();
|
||||
button.onClick.AddListener(() => managerPanel1.OnItemClicked(managerPanelInstance));
|
||||
Text sceneText = managerPanelInstance.transform.Find("top/sceneName").GetComponent<Text>();
|
||||
sceneText.text = sceneEntry.Key;
|
||||
managerPanel1.CreateScenePanel(sceneEntry.Key, sceneEntry.Value, managerPanelInstance);
|
||||
//managerPanel1.SetPlate();
|
||||
ManagerPanel.gameObject.SetActive(true);
|
||||
warningPopPanel.OpenPanel("δÅäÖÃÓ¦¼±ÈËÔ±£¡");
|
||||
}
|
||||
}
|
||||
|
||||
@ -561,9 +568,10 @@ public class Panel : Base
|
||||
|
||||
//处理界面关闭按钮
|
||||
public void ClickCloseBtn()
|
||||
{
|
||||
transform.gameObject.SetActive(false);
|
||||
}
|
||||
{
|
||||
transform.gameObject.SetActive(false);
|
||||
SceneManager.LoadScene(1);
|
||||
}
|
||||
|
||||
//获取鼠标点击位置的信息
|
||||
public void GetData()
|
||||
@ -828,6 +836,7 @@ public class Panel : Base
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//确定的按钮图片修改
|
||||
public void ChangeImage(bool isSure)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ using UnityEngine.Networking.Types;
|
||||
using UnityEngine.UI;
|
||||
using static System.Collections.Specialized.BitVector32;
|
||||
|
||||
public class EvacuationPanel : MonoBehaviour
|
||||
public class EvacuationPanel : Base
|
||||
{
|
||||
public List<PersonnelItem> personnelItems;//左侧区域
|
||||
public Transform personnelContent;
|
||||
@ -37,6 +37,7 @@ public class EvacuationPanel : MonoBehaviour
|
||||
|
||||
public JueseChoicePop jc = new JueseChoicePop();
|
||||
public JSONReader js;
|
||||
public WarningPopPanel warningPopPanel;
|
||||
|
||||
[Header("总按钮")]
|
||||
public Button redistributeBtn;
|
||||
@ -90,6 +91,7 @@ public class EvacuationPanel : MonoBehaviour
|
||||
panel.panelToggle[3].gameObject.transform.GetComponent<Image>().sprite = panel.toggleImage[1];
|
||||
panel.panelToggle[4].interactable = true; // 启用第三个Toggle
|
||||
panel.panelToggle[4].gameObject.transform.GetComponent<Image>().sprite = panel.toggleImage[1];
|
||||
warningPopPanel.OpenPanel("提交成功");
|
||||
}
|
||||
|
||||
//设置Npc类型
|
||||
@ -432,7 +434,6 @@ public class EvacuationPanel : MonoBehaviour
|
||||
{
|
||||
if (selectScene.difficultyId > 3)
|
||||
{
|
||||
Debug.LogError("+++++++++++++++++++++¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·¡·");
|
||||
classCount.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
|
@ -14,6 +14,7 @@ public class MaterialPanel : MonoBehaviour
|
||||
// 用于存储所有生成的物品项
|
||||
private List<MaterialItem> materialItems = new List<MaterialItem>();
|
||||
public JSONReader jsonReader1;
|
||||
public WarningPopPanel warningPopPanel1;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -50,5 +51,6 @@ public class MaterialPanel : MonoBehaviour
|
||||
materialList.num = materialItem.materialNum;
|
||||
createTemplateInfo.Instance.auth_CreateTemplate.materialList.Add(materialList);
|
||||
}
|
||||
warningPopPanel1.OpenPanel("提交成功");
|
||||
}
|
||||
}
|
||||
|
35
xiaofang/Assets/Script/UI/PanelUI/WarningPopPanel.cs
Normal file
35
xiaofang/Assets/Script/UI/PanelUI/WarningPopPanel.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class WarningPopPanel : MonoBehaviour
|
||||
{
|
||||
[Header("关闭")]
|
||||
public Button closeBtn;
|
||||
[Header("显示文本")]
|
||||
public Text showText;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
closeBtn.onClick.AddListener(() => { ClosePanel(); });
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
//打开面板
|
||||
public void OpenPanel(string needText)
|
||||
{
|
||||
transform.gameObject.SetActive(true);
|
||||
showText.text = needText;
|
||||
}
|
||||
//关闭面板
|
||||
public void ClosePanel()
|
||||
{
|
||||
showText.text = "";
|
||||
transform.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
11
xiaofang/Assets/Script/UI/PanelUI/WarningPopPanel.cs.meta
Normal file
11
xiaofang/Assets/Script/UI/PanelUI/WarningPopPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d22682848613f4488467b1f6b3f402b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user