forked from zxl/LaboratoryProtection
add dialogue ui data
parent
2eeaea88fc
commit
297bb51b43
|
@ -21,6 +21,10 @@ MonoBehaviour:
|
|||
m_Address: Assets/OtherProject/Artworks/MeiGongZiYuan/Animations/Materials/nanyisheng_diff.mat
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
- m_GUID: 5dfbd9fb7e178c948b13de0f47eab92a
|
||||
m_Address: Assets/UnityTest/ZXL/Assets/RT_L.renderTexture
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: ed913c58494404948976a29465fa0b05, type: 2}
|
||||
m_SchemaSet:
|
||||
|
|
|
@ -20,7 +20,13 @@ MonoBehaviour:
|
|||
- m_GUID: b50a816efe80fda46abf4d636eb2cc6e
|
||||
m_Address: Assets/Artworks/MeiGongZiYuan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
m_SerializedLabels:
|
||||
- default
|
||||
- m_GUID: 04bf0b3bc2664c5495c6dade6de3fcfb
|
||||
m_Address: Assets/UnityTest/ZXL/Assets
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- default
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: ed913c58494404948976a29465fa0b05, type: 2}
|
||||
m_SchemaSet:
|
||||
|
|
|
@ -17,8 +17,8 @@ MonoBehaviour:
|
|||
m_SerializedData: []
|
||||
m_GUID: f9bf57291b1f1e44fb644fb20ee1d242
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 8b3f91f6663080c43a7bc65517c6cfc7
|
||||
m_Address: Assets/Scenes/ShiYanShi2.unity
|
||||
- m_GUID: e57a377bbd0310c408cfe216203d5913
|
||||
m_Address: Assets/UnityTest/ZXL/Scene/Main.unity
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- default
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1efaef0b592319943a91db49f036c2ac
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!84 &8400000
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: RT_L
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 256
|
||||
m_Height: 256
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 94
|
||||
m_ColorFormat: 8
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 2
|
||||
m_VolumeDepth: 1
|
||||
m_ShadowSamplingMode: 2
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5dfbd9fb7e178c948b13de0f47eab92a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 8400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!84 &8400000
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: RT_R
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 256
|
||||
m_Height: 256
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 94
|
||||
m_ColorFormat: 8
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 2
|
||||
m_VolumeDepth: 1
|
||||
m_ShadowSamplingMode: 2
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1956287a0d4730b4a8778b1aea2bf80b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 8400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -9,6 +9,7 @@ namespace UnityTest.ZXL
|
|||
{
|
||||
public Dictionary<string, List<Animator>> dictionary = new Dictionary<string, List<Animator>>();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[Button("Add")]
|
||||
void AutoAdd()
|
||||
{
|
||||
|
@ -28,5 +29,6 @@ namespace UnityTest.ZXL
|
|||
dictionary.Add(animatorName, new List<Animator>() { animator });
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UnityTest.ZXL
|
||||
{
|
||||
public class DialogueUI : MonoBehaviour
|
||||
{
|
||||
public DialogueStr left;
|
||||
public DialogueStr right;
|
||||
|
||||
public void StartAnDialogue(DialogueData leftData, DialogueData rightData)
|
||||
{
|
||||
ShowARole(DialogueType.火警119, true); // 隐藏所有
|
||||
|
||||
left.role.text = leftData.dialogueType.ToString();
|
||||
left.content.text = leftData.content;
|
||||
ShowARole(leftData.dialogueType);
|
||||
|
||||
right.role.text = rightData.dialogueType.ToString();
|
||||
right.content.text = rightData.content;
|
||||
ShowARole(rightData.dialogueType);
|
||||
}
|
||||
|
||||
void ShowARole(DialogueType dialogueType, bool isHideAll = false)
|
||||
{
|
||||
if (isHideAll)
|
||||
{
|
||||
// 隐藏所有的人物
|
||||
return;
|
||||
}
|
||||
|
||||
switch (dialogueType)
|
||||
{
|
||||
case DialogueType.学校实验室管理处负责老师K:
|
||||
break;
|
||||
case DialogueType.学院安全总负责人H:
|
||||
break;
|
||||
case DialogueType.学院应急处置小组负责人J:
|
||||
break;
|
||||
case DialogueType.火警119:
|
||||
break;
|
||||
case DialogueType.实验负责老师F:
|
||||
break;
|
||||
case DialogueType.实验组安全负责人同学G:
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(dialogueType), dialogueType, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct DialogueStr
|
||||
{
|
||||
public TextMeshProUGUI role;
|
||||
public TextMeshProUGUI content;
|
||||
public RawImage dialogueType;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 410c143c96354285abf864ad1f7f28db
|
||||
timeCreated: 1694541637
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityTest.ZXL
|
||||
{
|
||||
public class ObjectDataComponent : SerializedMonoBehaviour
|
||||
{
|
||||
public List<UIObjectData> uiObjectData = new List<UIObjectData>();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct UIObjectData
|
||||
{
|
||||
public string uiName;
|
||||
public GameObject ui;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d684139e16274b6395be52b8284ba15f
|
||||
timeCreated: 1694541182
|
|
@ -1,7 +1,19 @@
|
|||
namespace UnityTest.ZXL
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace UnityTest.ZXL
|
||||
{
|
||||
public class SecondProcess : ProcessBase
|
||||
{
|
||||
void Logic()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
async UniTask Wait()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// 2-1
|
||||
// 实验组安全负责人同学G向实验负责老师F报告事故发生:“环工楼411实验室发生乙炔气瓶泄漏起火、进而引发原子吸收分光光度计发生爆炸。
|
||||
// 实验负责老师F回答:“好的,我知道了,现场情况如何?”
|
||||
|
|
|
@ -7,6 +7,8 @@ namespace UnityTest.ZXL
|
|||
{
|
||||
public class Test : SerializedMonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
|
||||
public List<DialogueData> dialogueData;
|
||||
|
||||
[Button("AddData")]
|
||||
|
@ -15,8 +17,7 @@ namespace UnityTest.ZXL
|
|||
this.dialogueData.Add(data);
|
||||
}
|
||||
|
||||
[ReadOnly] [FolderPath]
|
||||
public string folderPath;
|
||||
[ReadOnly] [FolderPath] public string folderPath;
|
||||
|
||||
public string assetName;
|
||||
|
||||
|
@ -30,5 +31,6 @@ namespace UnityTest.ZXL
|
|||
|
||||
AssetDatabase.CreateAsset(dialogueAsset, path);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue