diff --git a/Assets/Fungus/Narrative/Scripts/Dialog.cs b/Assets/Fungus/Narrative/Scripts/Dialog.cs index 3b0a5181..beb73fb9 100644 --- a/Assets/Fungus/Narrative/Scripts/Dialog.cs +++ b/Assets/Fungus/Narrative/Scripts/Dialog.cs @@ -7,8 +7,8 @@ using System.Collections.Generic; namespace Fungus { - - public class Dialog : MonoBehaviour + + public class Dialog : MonoBehaviour, IDialogInputListener { public static Character speakingCharacter; public static string prevStoryText; @@ -30,10 +30,7 @@ namespace Fungus protected Vector2 endPosition; public float moveSpeed = 1000f; public LeanTweenType moveEaseType; - - [Tooltip("Click anywhere on screen to continue when set to true, or only on dialog when false.")] - public bool clickAnywhere = true; - + public Canvas dialogCanvas; public Text nameText; public Text storyText; @@ -46,7 +43,6 @@ namespace Fungus protected bool italicActive; protected bool colorActive; protected string colorText; - protected float clickCooldownTimer; protected bool wasPointerClicked; @@ -55,20 +51,6 @@ namespace Fungus protected virtual void LateUpdate() { wasPointerClicked = false; - - if (clickCooldownTimer > 0f) - { - clickCooldownTimer -= Time.deltaTime; - clickCooldownTimer = Mathf.Max(0, clickCooldownTimer); - } - - if (clickCooldownTimer == 0f && - clickAnywhere && - Input.GetMouseButtonDown(0)) - { - wasPointerClicked = true; - clickCooldownTimer = 0.2f; - } } public virtual void ShowDialog(bool visible) @@ -88,7 +70,6 @@ namespace Fungus // A new dialog is often shown as the result of a mouse click, so we need // to make sure the previous click doesn't register on the new dialogue wasPointerClicked = false; - clickCooldownTimer = 0.2f; } } @@ -585,7 +566,7 @@ namespace Fungus Portrait.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position); if (c.state.dimmed == true) { - c.state.portraitImage.color = new Color(0.5f,0.5f,0.5f,1f); + c.state.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f); } else { @@ -613,13 +594,15 @@ namespace Fungus protected virtual void OnWaitForInputTag(bool waiting) {} - public virtual void OnPointerClick() + // + // IDialogInput implementation + // + + public virtual void OnNextLineEvent() { - if (clickCooldownTimer == 0f) - { - wasPointerClicked = true; - } + wasPointerClicked = true; } + } } diff --git a/Assets/Fungus/Narrative/Scripts/DialogInput.cs b/Assets/Fungus/Narrative/Scripts/DialogInput.cs new file mode 100644 index 00000000..41bff3ec --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/DialogInput.cs @@ -0,0 +1,131 @@ +using UnityEngine; +using UnityEngine.EventSystems; +using System.Collections; + +namespace Fungus +{ + public interface IDialogInputListener + { + void OnNextLineEvent(); + } + + public class DialogInput : MonoBehaviour + { + public enum ClickMode + { + Disabled, + ClickAnywhere, + ClickOnDialog + } + + public enum KeyPressMode + { + Disabled, + AnyKey, + KeyPressed + } + + public ClickMode clickMode; + + public KeyPressMode keyPressMode; + + public float nextClickDelay = 0.2f; + + [Tooltip("Keycode of the key to activate on")] + public KeyCode[] keyList; + + protected bool dialogClickedFlag; + + protected bool nextLineInputFlag; + + protected float ignoreClickTimer; + + /** + * Trigger next line input event from script. + */ + public void SetNextLineFlag() + { + nextLineInputFlag = true; + } + + /** + * Set the dialog clicked flag (usually from an Event Trigger component in the dialog UI) + */ + public void SetDialogClickedFlag() + { + // Ignore repeat clicks for a short time to prevent accidentally clicking through the character dialogue + if (ignoreClickTimer > 0f) + { + return; + } + ignoreClickTimer = nextClickDelay; + + // Only applies in Click On Dialog mode + if (clickMode == ClickMode.ClickOnDialog) + { + dialogClickedFlag = true; + } + } + + protected virtual void Update() + { + switch (keyPressMode) + { + case KeyPressMode.Disabled: + break; + case KeyPressMode.AnyKey: + if (Input.anyKeyDown) + { + SetNextLineFlag(); + } + break; + case KeyPressMode.KeyPressed: + foreach (KeyCode keyCode in keyList) + { + if (Input.GetKeyDown(keyCode)) + { + SetNextLineFlag(); + } + } + break; + } + + switch (clickMode) + { + case ClickMode.Disabled: + break; + case ClickMode.ClickAnywhere: + if (Input.GetMouseButtonDown(0)) + { + SetNextLineFlag(); + } + break; + case ClickMode.ClickOnDialog: + if (dialogClickedFlag) + { + SetNextLineFlag(); + dialogClickedFlag = false; + } + break; + } + + if (ignoreClickTimer > 0f) + { + ignoreClickTimer = Mathf.Max (ignoreClickTimer - Time.deltaTime, 0f); + } + + // Tell any listeners to move to the next line + if (nextLineInputFlag) + { + IDialogInputListener[] inputListeners = gameObject.GetComponentsInChildren(); + foreach (IDialogInputListener inputListener in inputListeners) + { + inputListener.OnNextLineEvent(); + } + nextLineInputFlag = false; + } + } + } + +} + \ No newline at end of file diff --git a/Assets/Fungus/Narrative/Scripts/DialogInput.cs.meta b/Assets/Fungus/Narrative/Scripts/DialogInput.cs.meta new file mode 100644 index 00000000..be1ed200 --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/DialogInput.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 43b85556abd314f3f870c18c013fdcef +timeCreated: 1439996546 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Narrative/Scripts/SayDialog.cs b/Assets/Fungus/Narrative/Scripts/SayDialog.cs index 4161aee9..5963ffbb 100644 --- a/Assets/Fungus/Narrative/Scripts/SayDialog.cs +++ b/Assets/Fungus/Narrative/Scripts/SayDialog.cs @@ -45,7 +45,11 @@ namespace Fungus public virtual void Say(string text, bool waitForInput, AudioClip voiceOverClip, Action onComplete) { - Clear(); + Writer writer = GetComponent(); + if (writer == null) + { + writer = gameObject.AddComponent(); + } Action onWritingComplete = delegate { if (waitForInput) @@ -85,7 +89,9 @@ namespace Fungus } }; - StartCoroutine(WriteText(text, voiceOverClip, onWritingComplete, onExitTag)); + ShowContinueImage(false); + + writer.Write(text, true, onWritingComplete, onExitTag); } public override void Clear() diff --git a/Assets/Fungus/UI/Scripts/Commands/Write.cs b/Assets/Fungus/UI/Scripts/Commands/Write.cs index 122d45e3..05f3290e 100644 --- a/Assets/Fungus/UI/Scripts/Commands/Write.cs +++ b/Assets/Fungus/UI/Scripts/Commands/Write.cs @@ -73,12 +73,15 @@ namespace Fungus if (!waitUntilFinished) { - writer.Write(newText, clearText); + writer.Write(newText, clearText, null, null); Continue(); } else { - writer.Write(newText, clearText, () => { Continue (); } ); + writer.Write(newText, clearText, + () => { Continue (); }, + () => { Continue (); } + ); } } diff --git a/Assets/Fungus/UI/Scripts/Writer.cs b/Assets/Fungus/UI/Scripts/Writer.cs index 316dd81b..56047518 100644 --- a/Assets/Fungus/UI/Scripts/Writer.cs +++ b/Assets/Fungus/UI/Scripts/Writer.cs @@ -7,8 +7,9 @@ using System; namespace Fungus { - public class Writer : MonoBehaviour + public class Writer : MonoBehaviour, IDialogInputListener { + public GameObject targetTextObject; public float writingSpeed = 60; public float punctuationPause = 0.25f; public Color hiddenTextColor = new Color(1,1,1,0); @@ -63,9 +64,15 @@ namespace Fungus protected virtual void Awake() { - textUI = GetComponent(); - inputField = GetComponent(); - textMesh = GetComponent(); + GameObject go = targetTextObject; + if (go == null) + { + go = gameObject; + } + + textUI = go.GetComponent(); + inputField = go.GetComponent(); + textMesh = go.GetComponent(); } public virtual bool HasTextObject() @@ -135,15 +142,7 @@ namespace Fungus return closeText; } - - protected virtual void Update() - { - if (Input.anyKeyDown) - { - SetInputFlag(); - } - } - + public virtual void SetTextColor(Color textColor) { if (textUI != null) @@ -188,7 +187,7 @@ namespace Fungus } } - public virtual void Write(string content, bool clear, Action onComplete = null) + public virtual void Write(string content, bool clear, Action onComplete, Action onExit) { if (clear) { @@ -203,10 +202,10 @@ namespace Fungus TextTagParser tagParser = new TextTagParser(); List tokens = tagParser.Tokenize(content); - StartCoroutine(ProcessTokens(tokens, onComplete)); + StartCoroutine(ProcessTokens(tokens, onComplete, onExit)); } - protected virtual IEnumerator ProcessTokens(List tokens, Action onComplete) + protected virtual IEnumerator ProcessTokens(List tokens, Action onComplete, Action onExit) { text = ""; @@ -290,6 +289,10 @@ namespace Fungus break; case TextTagParser.TokenType.Exit: + if (onExit != null) + { + onExit(); + } yield break; case TextTagParser.TokenType.Message: @@ -333,44 +336,44 @@ namespace Fungus break; case TextTagParser.TokenType.Audio: - { - AudioSource audioSource = FindAudio(token.param); - if (audioSource != null) { - audioSource.PlayOneShot(audioSource.clip); + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.PlayOneShot(audioSource.clip); + } } - } break; case TextTagParser.TokenType.AudioLoop: - { - AudioSource audioSource = FindAudio(token.param); - if (audioSource != null) { - audioSource.Play(); - audioSource.loop = true; + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.Play(); + audioSource.loop = true; + } } - } break; case TextTagParser.TokenType.AudioPause: - { - AudioSource audioSource = FindAudio(token.param); - if (audioSource != null) { - audioSource.Pause(); + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.Pause(); + } } - } break; case TextTagParser.TokenType.AudioStop: - { - AudioSource audioSource = FindAudio(token.param); - if (audioSource != null) { - audioSource.Stop(); + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.Stop(); + } } - } break; } @@ -536,6 +539,14 @@ namespace Fungus return go.GetComponent(); } + + // + // IDialogInputListener implementation + // + public virtual void OnNextLineEvent() + { + SetInputFlag(); + } } } diff --git a/Assets/Tests/Narrative/NarrativeTests.unity b/Assets/Tests/Narrative/NarrativeTests.unity index 7dbb3557..55f3e49d 100644 --- a/Assets/Tests/Narrative/NarrativeTests.unity +++ b/Assets/Tests/Narrative/NarrativeTests.unity @@ -139,6 +139,14 @@ GameObject: - 114: {fileID: 24983357} - 114: {fileID: 24983356} - 114: {fileID: 24983355} + - 114: {fileID: 24983361} + - 114: {fileID: 24983363} + - 114: {fileID: 24983362} + - 114: {fileID: 24983360} + - 114: {fileID: 24983365} + - 114: {fileID: 24983364} + - 114: {fileID: 24983367} + - 114: {fileID: 24983366} m_Layer: 0 m_Name: Flowchart m_TagString: Untagged @@ -148,7 +156,7 @@ GameObject: m_IsActive: 1 --- !u!114 &24983355 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 24983354} @@ -160,7 +168,9 @@ MonoBehaviour: itemId: 1 errorMessage: indentLevel: 0 - storyText: Write out some say text + storyText: 'Wait for input and continue{wi}Wait for input and clear{wc} + + More text after a wc tag' description: character: {fileID: 0} portrait: {fileID: 0} @@ -204,7 +214,7 @@ MonoBehaviour: width: 120 height: 40 itemId: 0 - blockName: New Block + blockName: Start description: eventHandler: {fileID: 24983356} commandList: @@ -225,17 +235,17 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} variablesScrollPos: {x: 0, y: 0} variablesExpanded: 1 - blockViewHeight: 400 + blockViewHeight: 280 zoom: 1 scrollViewRect: serializedVersion: 2 - x: -343 - y: -340 - width: 1114 - height: 859 - selectedBlock: {fileID: 24983357} + x: -350 + y: -350 + width: 1121 + height: 869 + selectedBlock: {fileID: 24983361} selectedCommands: - - {fileID: 24983355} + - {fileID: 24983362} variables: [] description: stepPause: 0 @@ -255,6 +265,172 @@ Transform: m_Children: [] m_Father: {fileID: 1731000812} m_RootOrder: 0 +--- !u!114 &24983360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + errorMessage: + indentLevel: 0 + duration: 2 +--- !u!114 &24983361 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 211 + y: 71 + width: 120 + height: 40 + itemId: 3 + blockName: Do Input + description: + eventHandler: {fileID: 24983363} + commandList: + - {fileID: 24983360} + - {fileID: 24983362} + - {fileID: 24983365} + - {fileID: 24983364} + - {fileID: 24983367} + - {fileID: 24983366} +--- !u!114 &24983362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 688e35811870d403f9e2b1ab2a699d98, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + errorMessage: + indentLevel: 0 + targetObject: {fileID: 1066357890} + targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + targetComponentFullname: UnityEngine.Component[] + targetComponentText: DialogInput + targetMethod: SetDialogClickedFlag + targetMethodText: 'SetDialogClickedFlag (): Void' + methodParameters: [] + saveReturnValue: 0 + returnValueVariableKey: + returnValueType: System.Void + showInherited: 0 + callMode: 0 +--- !u!114 &24983363 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 24983361} +--- !u!114 &24983364 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 688e35811870d403f9e2b1ab2a699d98, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 7 + errorMessage: + indentLevel: 0 + targetObject: {fileID: 1066357890} + targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + targetComponentFullname: UnityEngine.Component[] + targetComponentText: DialogInput + targetMethod: SetDialogClickedFlag + targetMethodText: 'SetDialogClickedFlag (): Void' + methodParameters: [] + saveReturnValue: 0 + returnValueVariableKey: + returnValueType: System.Void + showInherited: 0 + callMode: 0 +--- !u!114 &24983365 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 + errorMessage: + indentLevel: 0 + duration: 2 +--- !u!114 &24983366 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 688e35811870d403f9e2b1ab2a699d98, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + errorMessage: + indentLevel: 0 + targetObject: {fileID: 1066357890} + targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + targetComponentFullname: UnityEngine.Component[] + targetComponentText: DialogInput + targetMethod: SetDialogClickedFlag + targetMethodText: 'SetDialogClickedFlag (): Void' + methodParameters: [] + saveReturnValue: 0 + returnValueVariableKey: + returnValueType: System.Void + showInherited: 0 + callMode: 0 +--- !u!114 &24983367 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 24983354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 8 + errorMessage: + indentLevel: 0 + duration: 2 --- !u!1 &41636568 GameObject: m_ObjectHideFlags: 0 @@ -437,6 +613,249 @@ MonoBehaviour: - {fileID: 21300000, guid: b498a62f179e149be9515ba5614ccfa3, type: 3} portraitsFace: 2 description: +--- !u!1 &527730228 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188898, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 527730229} + - 222: {fileID: 527730231} + - 114: {fileID: 527730230} + m_Layer: 5 + m_Name: NameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &527730229 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 527730228} + 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_Children: [] + m_Father: {fileID: 1111691353} + m_RootOrder: 1 + m_AnchorMin: {x: .0131249959, y: 1} + m_AnchorMax: {x: .785268068, y: 1} + m_AnchoredPosition: {x: -22.25, y: -914} + m_SizeDelta: {x: -68.5, y: 71} + m_Pivot: {x: .5, y: .5} +--- !u!114 &527730230 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488900, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 527730228} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .258823544, g: .254901975, b: .262745112, a: 1} + m_FontData: + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} + m_FontSize: 50 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Character Name +--- !u!222 &527730231 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22288898, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 527730228} +--- !u!1 &618248552 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 618248553} + - 222: {fileID: 618248556} + - 114: {fileID: 618248555} + - 114: {fileID: 618248554} + m_Layer: 5 + m_Name: StoryText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &618248553 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488896, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 618248552} + 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_Children: + - {fileID: 1450485987} + m_Father: {fileID: 1704217017} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!114 &618248554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11439138, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 618248552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 1150 + m_PreferredHeight: 200 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 +--- !u!114 &618248555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488896, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 618248552} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FontData: + m_Font: {fileID: 12800000, guid: 79197ecfbc3a4294a89ce589dac02cf2, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Story text +--- !u!222 &618248556 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22288894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 618248552} +--- !u!1 &623638068 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 148914, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 623638072} + - 222: {fileID: 623638071} + - 114: {fileID: 623638070} + - 114: {fileID: 623638069} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &623638069 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11439142, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 623638068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 350 + m_PreferredHeight: 350 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &623638070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11448914, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 623638068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &623638071 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22248914, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 623638068} +--- !u!224 &623638072 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22448914, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 623638068} + 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_Children: [] + m_Father: {fileID: 1704217017} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} --- !u!1 &891159641 GameObject: m_ObjectHideFlags: 0 @@ -1248,6 +1667,251 @@ RectTransform: m_PrefabParentObject: {fileID: 22410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2} m_PrefabInternal: {fileID: 1450066430} +--- !u!1 &1066357890 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188902, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1066357891} + - 223: {fileID: 1066357897} + - 114: {fileID: 1066357896} + - 225: {fileID: 1066357895} + - 114: {fileID: 1066357899} + - 114: {fileID: 1066357894} + - 114: {fileID: 1066357893} + - 114: {fileID: 1066357898} + - 82: {fileID: 1066357892} + m_Layer: 5 + m_Name: SayDialog + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1066357891 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488902, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1111691353} + m_Father: {fileID: 1731000812} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!82 &1066357892 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8294266, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 +--- !u!114 &1066357893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a676940fce6344af1a70043b089a6c14, type: 3} + m_Name: + m_EditorClassIdentifier: + targetTextObject: {fileID: 618248552} + writingSpeed: 60 + punctuationPause: .25 + hiddenTextColor: {r: 1, g: 1, b: 1, a: 0} + writeWholeWords: 0 +--- !u!114 &1066357894 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a0bbe22c246e4c78ad8e9816cbae9d5, type: 3} + m_Name: + m_EditorClassIdentifier: + writingSpeed: 30 + writingSound: {fileID: 8300000, guid: f637c5ce9d10e45c7855ed89bfc6b97e, type: 3} + writingVolume: 1 + loopWritingSound: 1 + beepPerCharacter: 0 + slowBeepsAt: 10 + fastBeepsAt: 30 + punctuationPause: .200000003 + alwaysFadeDialog: 0 + fadeDuration: .25 + fadeEaseType: 0 + alwaysMoveDialog: 0 + startPosition: {x: 0, y: 0} + moveSpeed: 1000 + moveEaseType: 0 + dialogCanvas: {fileID: 1066357897} + nameText: {fileID: 527730230} + storyText: {fileID: 618248555} + characterImage: {fileID: 623638070} + characterTypingSound: {fileID: 0} + continueImage: {fileID: 1450485988} + continueSound: {fileID: 0} +--- !u!225 &1066357895 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22588896, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!114 &1066357896 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488906, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 32 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1600, y: 1200} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1066357897 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22388894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 1 +--- !u!114 &1066357898 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 43b85556abd314f3f870c18c013fdcef, type: 3} + m_Name: + m_EditorClassIdentifier: + clickMode: 2 + keyPressMode: 2 + nextClickDelay: .200000003 + keyList: 0900000020000000 +--- !u!114 &1066357899 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1066357890} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 --- !u!1 &1083481054 GameObject: m_ObjectHideFlags: 0 @@ -1288,6 +1952,116 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 +--- !u!1 &1111691352 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188900, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1111691353} + - 222: {fileID: 1111691358} + - 114: {fileID: 1111691357} + - 225: {fileID: 1111691356} + - 114: {fileID: 1111691355} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1111691353 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488900, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1111691352} + 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_Children: + - {fileID: 1704217017} + - {fileID: 527730229} + m_Father: {fileID: 1066357891} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: -800, y: -600} + m_SizeDelta: {x: 1600, y: 1200} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1111691355 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1111691352} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1066357898} + m_MethodName: SetDialogClickedFlag + 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 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + delegates: [] +--- !u!225 &1111691356 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22588894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1111691352} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!114 &1111691357 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488904, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1111691352} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: eeb00f6cd27e9ef4d9174551b3342dec, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 0 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1111691358 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22288900, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1111691352} --- !u!4 &1155926874 stripped Transform: m_PrefabParentObject: {fileID: 410270, guid: c6289d5f8fa843145a2355af9cb09719, type: 2} @@ -1343,6 +2117,182 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: c6289d5f8fa843145a2355af9cb09719, type: 2} m_IsPrefabParent: 0 +--- !u!1 &1450485986 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 188896, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1450485987} + - 222: {fileID: 1450485991} + - 114: {fileID: 1450485988} + - 212: {fileID: 1450485990} + - 95: {fileID: 1450485989} + m_Layer: 5 + m_Name: Continue + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1450485987 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22488898, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450485986} + 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_Children: [] + m_Father: {fileID: 618248553} + m_RootOrder: 0 + m_AnchorMin: {x: .942586243, y: .0550000034} + m_AnchorMax: {x: .988172412, y: .0550000034} + m_AnchoredPosition: {x: -.400008023, y: 21.6499996} + m_SizeDelta: {x: -.400001526, y: 43.2999992} + m_Pivot: {x: .500000417, y: .5} +--- !u!114 &1450485988 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11488898, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450485986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 226248ac6f184e448af731df91b91958, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!95 &1450485989 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 9588894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450485986} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 1 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!212 &1450485990 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 21288894, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450485986} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_ImportantGI: 0 + m_AutoUVMaxDistance: .5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 226248ac6f184e448af731df91b91958, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} +--- !u!222 &1450485991 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22288896, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1450485986} +--- !u!1 &1704217016 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139138, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1704217017} + - 222: {fileID: 1704217019} + - 114: {fileID: 1704217018} + m_Layer: 5 + m_Name: Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1704217017 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22439138, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1704217016} + 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_Children: + - {fileID: 618248553} + - {fileID: 623638072} + m_Father: {fileID: 1111691353} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -2, y: -381} + m_SizeDelta: {x: -90, y: -846} + m_Pivot: {x: .5, y: .5} +--- !u!114 &1704217018 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11439140, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1704217016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 7 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 +--- !u!222 &1704217019 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22239138, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1704217016} --- !u!1 &1731000811 GameObject: m_ObjectHideFlags: 0 @@ -1370,6 +2320,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 24983359} + - {fileID: 1066357891} m_Father: {fileID: 0} m_RootOrder: 4 --- !u!114 &1731000813 @@ -1383,7 +2334,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3} m_Name: m_EditorClassIdentifier: - timeout: 5 + timeout: 10 ignored: 0 succeedAfterAllAssertionsAreExecuted: 1 expectException: 0 diff --git a/Assets/Tests/TestTrigger.meta b/Assets/Tests/TestTrigger.meta new file mode 100644 index 00000000..af79a2c6 --- /dev/null +++ b/Assets/Tests/TestTrigger.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4708739fb4a0e4f25af06df99328b01b +folderAsset: yes +timeCreated: 1440059125 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/TestTrigger/TestTrigger.cs b/Assets/Tests/TestTrigger/TestTrigger.cs new file mode 100644 index 00000000..27db07d9 --- /dev/null +++ b/Assets/Tests/TestTrigger/TestTrigger.cs @@ -0,0 +1,12 @@ +using UnityEngine; +using System.Collections; + +public class TestTrigger : MonoBehaviour +{ + + public void DoSomething() + { + Debug.Log("Ok"); + } + +} diff --git a/Assets/Tests/TestTrigger/TestTrigger.cs.meta b/Assets/Tests/TestTrigger/TestTrigger.cs.meta new file mode 100644 index 00000000..96e1a025 --- /dev/null +++ b/Assets/Tests/TestTrigger/TestTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 601e94f67065d433db0aa94d418e6b3c +timeCreated: 1440059156 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/TestTrigger/TestTrigger.unity b/Assets/Tests/TestTrigger/TestTrigger.unity new file mode 100644 index 00000000..09a2c04f --- /dev/null +++ b/Assets/Tests/TestTrigger/TestTrigger.unity @@ -0,0 +1,482 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: .25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_Fog: 0 + m_FogColor: {r: .5, g: .5, b: .5, a: 1} + m_FogMode: 3 + m_FogDensity: .00999999978 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1} + m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1} + m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: .5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} +--- !u!127 &3 +LevelGameManager: + m_ObjectHideFlags: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_GIWorkflowMode: 1 + m_LightmapsMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 3 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AOMaxDistance: 1 + m_Padding: 2 + m_CompAOExponent: 0 + m_LightmapParameters: {fileID: 0} + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_LightmapSnapshot: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: .5 + agentHeight: 2 + agentSlope: 45 + agentClimb: .400000006 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: .166666672 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &656533674 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 656533678} + - 223: {fileID: 656533677} + - 114: {fileID: 656533676} + - 114: {fileID: 656533675} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &656533675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 656533674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &656533676 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 656533674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &656533677 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 656533674} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!224 &656533678 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 656533674} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1807499706} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1537142071 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1537142075} + - 114: {fileID: 1537142074} + - 114: {fileID: 1537142073} + - 114: {fileID: 1537142072} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1537142072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537142071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AllowActivationOnStandalone: 0 +--- !u!114 &1537142073 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537142071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: .5 + m_AllowActivationOnMobileDevice: 0 +--- !u!114 &1537142074 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537142071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1537142075 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537142071} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1 &1807499705 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1807499706} + - 222: {fileID: 1807499708} + - 114: {fileID: 1807499707} + - 114: {fileID: 1807499709} + - 114: {fileID: 1807499710} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1807499706 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1807499705} + 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_Children: [] + m_Father: {fileID: 656533678} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 190, y: -142} + m_SizeDelta: {x: -381, y: -285} + m_Pivot: {x: .5, y: .5} +--- !u!114 &1807499707 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1807499705} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .39199999} + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1807499708 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1807499705} +--- !u!114 &1807499709 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1807499705} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 4 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1807499710} + m_MethodName: DoSomething + 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 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + delegates: [] +--- !u!114 &1807499710 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1807499705} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 601e94f67065d433db0aa94d418e6b3c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1943158623 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1943158625} + - 114: {fileID: 1943158624} + m_Layer: 0 + m_Name: _FungusState + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1943158624 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943158623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} + m_Name: + m_EditorClassIdentifier: + selectedFlowchart: {fileID: 0} +--- !u!4 &1943158625 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943158623} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &1943551259 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1943551264} + - 20: {fileID: 1943551263} + - 92: {fileID: 1943551262} + - 124: {fileID: 1943551261} + - 81: {fileID: 1943551260} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1943551260 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943551259} + m_Enabled: 1 +--- !u!124 &1943551261 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943551259} + m_Enabled: 1 +--- !u!92 &1943551262 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943551259} + m_Enabled: 1 +--- !u!20 &1943551263 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943551259} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: .300000012 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: .0219999999 + m_StereoMirrorMode: 0 +--- !u!4 &1943551264 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1943551259} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 diff --git a/Assets/Tests/TestTrigger/TestTrigger.unity.meta b/Assets/Tests/TestTrigger/TestTrigger.unity.meta new file mode 100644 index 00000000..2cd179f6 --- /dev/null +++ b/Assets/Tests/TestTrigger/TestTrigger.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3bc2d2d350881426fae66779da42860f +timeCreated: 1440059125 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: