Added functional dialogue window
This commit is contained in:
parent
40b94dee92
commit
bd7c9056c5
@ -51,6 +51,7 @@
|
||||
<Compile Include="Assets\Scripts\Enemies' Scprits\Enemy.cs" />
|
||||
<Compile Include="Assets\Scripts\QuitGame.cs" />
|
||||
<Compile Include="Assets\Scripts\Inventory\InventoryManager.cs" />
|
||||
<Compile Include="Assets\Scripts\Dialogue.cs" />
|
||||
<Compile Include="Assets\Scripts\Item\Item.cs" />
|
||||
<Compile Include="Assets\Scripts\CamerFollow.cs" />
|
||||
<Compile Include="Assets\Scripts\SaveSoundSettings.cs" />
|
||||
@ -62,6 +63,7 @@
|
||||
<Compile Include="Assets\Scripts\DoorBehaviour.cs" />
|
||||
<Compile Include="Assets\Scripts\Enemies' Scprits\PatrollingEnemy.cs" />
|
||||
<Compile Include="Assets\Scripts\ChangeScene.cs" />
|
||||
<Compile Include="Assets\NPCDialogue.cs" />
|
||||
<Compile Include="Assets\Scripts\Player.cs" />
|
||||
<None Include="Assets\TextMesh Pro\Shaders\TMPro.cginc" />
|
||||
<None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile Overlay.shader" />
|
||||
@ -652,94 +654,94 @@
|
||||
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.3.32f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Animation.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.InternalAPIEngineBridge.001">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.VSCode.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.PixelPerfect">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Tilemap.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PsdPlugin">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.VisualStudio.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Timeline">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.IK.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Sprite.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Psdimporter.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Path.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.InternalAPIEditorBridge.001">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.UI">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.PlasticSCM.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Rider.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Mathematics">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.IK.Runtime">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Animation.Triangle.Runtime">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Animation.Runtime">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.PixelPerfect.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Timeline.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Mathematics.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Common.Runtime">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.SpriteShape.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Common.Editor">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.SpriteShape.Runtime">
|
||||
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll</HintPath>
|
||||
<HintPath>C:/Users/alicj/Desktop/new/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
94
Assets/NPCDialogue.cs
Normal file
94
Assets/NPCDialogue.cs
Normal file
@ -0,0 +1,94 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class NPCDialogue : MonoBehaviour
|
||||
{
|
||||
|
||||
public Text nameText;
|
||||
public Text dialogueText;
|
||||
public Dialogue dialogue;
|
||||
|
||||
private Queue<string> sentences;
|
||||
public GameObject Panel;
|
||||
|
||||
bool triggered = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
sentences = new Queue<string>();
|
||||
|
||||
}
|
||||
|
||||
public void TriggerDialogue()
|
||||
{
|
||||
StartDialogue(dialogue);
|
||||
}
|
||||
|
||||
void OnTriggerExit2D(Collider2D collision)
|
||||
{
|
||||
if (Panel != null)
|
||||
{
|
||||
|
||||
Panel.SetActive(false);
|
||||
}
|
||||
triggered = false;
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
if (collision.tag == "Player")
|
||||
{
|
||||
triggered = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (triggered)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
if (Panel != null)
|
||||
{
|
||||
Panel.SetActive(true);
|
||||
}
|
||||
StartDialogue(dialogue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void StartDialogue(Dialogue dialogue)
|
||||
{
|
||||
nameText.text = dialogue.name;
|
||||
|
||||
sentences.Clear();
|
||||
|
||||
foreach(string sentence in dialogue.sentences)
|
||||
{
|
||||
sentences.Enqueue(sentence);
|
||||
}
|
||||
|
||||
DisplayNextSentence();
|
||||
}
|
||||
|
||||
public void DisplayNextSentence()
|
||||
{
|
||||
if (sentences.Count == 0)
|
||||
{
|
||||
EndDialogue();
|
||||
return;
|
||||
}
|
||||
|
||||
string sentence = sentences.Dequeue();
|
||||
dialogueText.text = sentence;
|
||||
}
|
||||
|
||||
void EndDialogue()
|
||||
{
|
||||
Panel.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
11
Assets/NPCDialogue.cs.meta
Normal file
11
Assets/NPCDialogue.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81223f4044aba464faed4fa279d6c9b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -778,6 +778,84 @@ BoxCollider2D:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.95, y: 0.9}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &163167163
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 163167164}
|
||||
- component: {fileID: 163167166}
|
||||
- component: {fileID: 163167165}
|
||||
m_Layer: 5
|
||||
m_Name: DialoguePanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &163167164
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 163167163}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.9499999, y: 0.2, z: 4.799999}
|
||||
m_Children:
|
||||
- {fileID: 1081484091}
|
||||
- {fileID: 1736078184}
|
||||
- {fileID: 379044510}
|
||||
m_Father: {fileID: 184083800}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -127.5}
|
||||
m_SizeDelta: {x: 0, y: 255}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &163167165
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 163167163}
|
||||
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: 1}
|
||||
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: 99ef742ea21894b4d995d1bc6209bd91, 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 &163167166
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 163167163}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &166697417
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1106,6 +1184,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1327986482}
|
||||
- {fileID: 1427837626}
|
||||
- {fileID: 163167164}
|
||||
- {fileID: 1255147975}
|
||||
- {fileID: 1315339609}
|
||||
m_Father: {fileID: 0}
|
||||
@ -2051,6 +2130,108 @@ Tilemap:
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
--- !u!1 &379044509
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 379044510}
|
||||
- component: {fileID: 379044512}
|
||||
- component: {fileID: 379044511}
|
||||
m_Layer: 5
|
||||
m_Name: ContinueDialogue
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &379044510
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 379044509}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.2, y: 1.2, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 612814820}
|
||||
m_Father: {fileID: 163167164}
|
||||
m_RootOrder: 2
|
||||
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: 310, y: -200}
|
||||
m_SizeDelta: {x: 100, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &379044511
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 379044509}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 2019943}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2102416361}
|
||||
m_TargetAssemblyTypeName: NPCDialogue, Assembly-CSharp
|
||||
m_MethodName: DisplayNextSentence
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!222 &379044512
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 379044509}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &455987700
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2226,6 +2407,85 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &612814819
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 612814820}
|
||||
- component: {fileID: 612814822}
|
||||
- component: {fileID: 612814821}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &612814820
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 612814819}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.95, y: 4.5, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 379044510}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &612814821
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 612814819}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.63529414, g: 0.44705883, b: 0.2901961, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
|
||||
m_FontSize: 0
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: continue >>
|
||||
--- !u!222 &612814822
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 612814819}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &622865435
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -12711,6 +12971,85 @@ Transform:
|
||||
m_Father: {fileID: 166697418}
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1081484090
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1081484091}
|
||||
- component: {fileID: 1081484093}
|
||||
- component: {fileID: 1081484092}
|
||||
m_Layer: 5
|
||||
m_Name: NPC name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1081484091
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1081484090}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.2, y: 6, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 163167164}
|
||||
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: -260, y: 177.28549}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1081484092
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1081484090}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
|
||||
m_Color: {r: 0.63529414, g: 0.44705886, b: 0.2901961, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
|
||||
m_FontSize: 0
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: NPC NAME
|
||||
--- !u!222 &1081484093
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1081484090}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1143151250
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -12856,7 +13195,7 @@ RectTransform:
|
||||
- {fileID: 246924467}
|
||||
- {fileID: 810232843}
|
||||
m_Father: {fileID: 184083800}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@ -13043,7 +13382,7 @@ RectTransform:
|
||||
- {fileID: 913447033}
|
||||
- {fileID: 1320497048}
|
||||
m_Father: {fileID: 184083800}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@ -101180,6 +101519,85 @@ Tilemap:
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
--- !u!1 &1736078183
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1736078184}
|
||||
- component: {fileID: 1736078186}
|
||||
- component: {fileID: 1736078185}
|
||||
m_Layer: 5
|
||||
m_Name: DialogueText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1736078184
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1736078183}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 5, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 163167164}
|
||||
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}
|
||||
m_AnchoredPosition: {x: -6, y: -80}
|
||||
m_SizeDelta: {x: 700, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1736078185
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1736078183}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Here is what the dialogue says
|
||||
--- !u!222 &1736078186
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1736078183}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1782155984
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -101441,9 +101859,11 @@ GameObject:
|
||||
- component: {fileID: 2102416360}
|
||||
- component: {fileID: 2102416359}
|
||||
- component: {fileID: 2102416358}
|
||||
- component: {fileID: 2102416362}
|
||||
- component: {fileID: 2102416361}
|
||||
m_Layer: 0
|
||||
m_Name: BossThug
|
||||
m_TagString: Untagged
|
||||
m_TagString: NPC
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
@ -101560,6 +101980,42 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!114 &2102416361
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2102416356}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 81223f4044aba464faed4fa279d6c9b1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nameText: {fileID: 1081484092}
|
||||
dialogueText: {fileID: 1736078185}
|
||||
dialogue:
|
||||
name: Boss
|
||||
sentences:
|
||||
- Random dialogue 1
|
||||
- Even more random dialogue 2
|
||||
Panel: {fileID: 163167163}
|
||||
--- !u!58 &2102416362
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2102416356}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: -0.5}
|
||||
serializedVersion: 2
|
||||
m_Radius: 1.2
|
||||
--- !u!1 &2105401424
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
12
Assets/Scripts/Dialogue.cs
Normal file
12
Assets/Scripts/Dialogue.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[System.Serializable]
|
||||
|
||||
public class Dialogue
|
||||
{
|
||||
public string name;
|
||||
public string[] sentences;
|
||||
}
|
||||
|
11
Assets/Scripts/Dialogue.cs.meta
Normal file
11
Assets/Scripts/Dialogue.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efa34d7a9a640dd4e90f227b0f4f6748
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -129,11 +129,11 @@ PlayerSettings:
|
||||
vulkanEnableLateAcquireNextImage: 0
|
||||
vulkanEnableCommandBufferRecycling: 1
|
||||
m_SupportedAspectRatios:
|
||||
4:3: 1
|
||||
5:4: 1
|
||||
16:10: 1
|
||||
4:3: 0
|
||||
5:4: 0
|
||||
16:10: 0
|
||||
16:9: 1
|
||||
Others: 1
|
||||
Others: 0
|
||||
bundleVersion: 1.0
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
@ -464,7 +464,9 @@ PlayerSettings:
|
||||
switchPlayerConnectionEnabled: 1
|
||||
switchUseNewStyleFilepaths: 0
|
||||
switchUseMicroSleepForYield: 1
|
||||
switchEnableRamDiskSupport: 0
|
||||
switchMicroSleepForYieldTime: 25
|
||||
switchRamDiskSpaceSize: 12
|
||||
ps4NPAgeRating: 12
|
||||
ps4NPTitleSecret:
|
||||
ps4NPTrophyPackPath:
|
||||
@ -606,6 +608,7 @@ PlayerSettings:
|
||||
metroFTAName:
|
||||
metroFTAFileTypes: []
|
||||
metroProtocolName:
|
||||
vcxProjDefaultLanguage:
|
||||
XboxOneProductId:
|
||||
XboxOneUpdateKey:
|
||||
XboxOneSandboxId:
|
||||
|
@ -6,6 +6,7 @@ TagManager:
|
||||
tags:
|
||||
- Pickable
|
||||
- SceneTransition
|
||||
- NPC
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
@ -18,13 +18,13 @@ EditorUserSettings:
|
||||
value: 22424703114646680e0b0227036c72111f19352f223d667d6d1a1827f6e93a3ff1a923e7ee2e26
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
||||
value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-6:
|
||||
value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
|
||||
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
|
Loading…
Reference in New Issue
Block a user