diff --git a/Assets/Fungus/Dialog/Sprites.meta b/Assets/Fungus/Audio/Editor.meta similarity index 63% rename from Assets/Fungus/Dialog/Sprites.meta rename to Assets/Fungus/Audio/Editor.meta index cc27f5d7..ab75c12a 100644 --- a/Assets/Fungus/Dialog/Sprites.meta +++ b/Assets/Fungus/Audio/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8bbdbd776cccc4e1985aec1a2ee202b0 +guid: 5a4fe51b67cee49b28f6a0231dae2352 folderAsset: yes DefaultImporter: userData: diff --git a/Assets/Fungus/Dialog/Editor/CharacterEditor.cs b/Assets/Fungus/Dialog/Editor/CharacterEditor.cs index 2df987f0..ef7eb9fe 100644 --- a/Assets/Fungus/Dialog/Editor/CharacterEditor.cs +++ b/Assets/Fungus/Dialog/Editor/CharacterEditor.cs @@ -2,6 +2,7 @@ using UnityEditor; using UnityEngine; using System.Collections; using Rotorz.ReorderableList; +using System.Collections.Generic; namespace Fungus { @@ -9,14 +10,11 @@ namespace Fungus [CustomEditor (typeof(Character))] public class CharacterEditor : Editor { - protected Material spriteMaterial; - protected SerializedProperty nameTextProp; protected SerializedProperty nameColorProp; - protected SerializedProperty sayDialogBoxProp; - protected SerializedProperty chooseDialogBoxProp; protected SerializedProperty soundEffectProp; protected SerializedProperty portraitsProp; + protected SerializedProperty portraitsFaceProp; protected SerializedProperty notesProp; protected virtual void OnEnable() @@ -25,38 +23,20 @@ namespace Fungus nameColorProp = serializedObject.FindProperty ("nameColor"); soundEffectProp = serializedObject.FindProperty ("soundEffect"); portraitsProp = serializedObject.FindProperty ("portraits"); + portraitsFaceProp = serializedObject.FindProperty ("portraitsFace"); notesProp = serializedObject.FindProperty ("notes"); - - Shader shader = Shader.Find("Sprites/Default"); - if (shader != null) - { - spriteMaterial = new Material(shader); - spriteMaterial.hideFlags = HideFlags.DontSave; - } - } - - protected virtual void OnDisable() - { - DestroyImmediate(spriteMaterial); } public override void OnInspectorGUI() { serializedObject.Update(); + Character t = target as Character; + EditorGUILayout.PropertyField(nameTextProp, new GUIContent("Name Text", "Name of the character display in the dialog")); EditorGUILayout.PropertyField(nameColorProp, new GUIContent("Name Color", "Color of name text display in the dialog")); EditorGUILayout.PropertyField(soundEffectProp, new GUIContent("Sound Effect", "Sound to play when the character is talking. Overrides the setting in the Dialog.")); - - ReorderableListGUI.Title(new GUIContent("Portraits", "Character image sprites to display in the dialog")); - ReorderableListGUI.ListField(portraitsProp); - EditorGUILayout.PropertyField(notesProp, new GUIContent("Notes", "Notes about this story character (personality, attibutes, etc.)")); - - EditorGUILayout.Separator(); - - Character t = target as Character; - if (t.portraits != null && t.portraits.Count > 0) { @@ -66,29 +46,32 @@ namespace Fungus { t.profileSprite = null; } - - if (t.profileSprite != null && - spriteMaterial != null) + + if (t.profileSprite != null) { - float aspect = (float)t.profileSprite.texture.width / (float)t.profileSprite.texture.height; - Rect imagePreviewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); - - DrawPreview(imagePreviewRect, t.profileSprite.texture); + Texture2D characterTexture = t.profileSprite.texture; + float aspect = (float)characterTexture.width / (float)characterTexture.height; + Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); + if (characterTexture != null) + GUI.DrawTexture(previewRect,characterTexture,ScaleMode.ScaleToFit,true,aspect); } + ReorderableListGUI.Title(new GUIContent("Portraits", "Character image sprites to display in the dialog")); + ReorderableListGUI.ListField(portraitsProp); + string[] facingArrows = new string[] + { + "FRONT", + "<--", + "-->", + }; + portraitsFaceProp.enumValueIndex = EditorGUILayout.Popup("Portraits Face", (int)portraitsFaceProp.enumValueIndex, facingArrows); + + EditorGUILayout.Separator(); + + EditorUtility.SetDirty(t); serializedObject.ApplyModifiedProperties(); } - public virtual void DrawPreview(Rect previewRect, Texture2D texture) - { - if (texture == null) - { - return; - } - EditorGUI.DrawPreviewTexture(previewRect, - texture, - spriteMaterial); - } } } \ No newline at end of file diff --git a/Assets/Fungus/Dialog/Editor/DialogMenuItems.cs b/Assets/Fungus/Dialog/Editor/DialogMenuItems.cs index efa047cd..99c2257e 100644 --- a/Assets/Fungus/Dialog/Editor/DialogMenuItems.cs +++ b/Assets/Fungus/Dialog/Editor/DialogMenuItems.cs @@ -41,6 +41,29 @@ namespace Fungus spawnedGO.name = "MenuDialog"; } } + + [MenuItem("GameObject/Fungus/Dialog/Tag")] + static void CreateTagDialog() + { + GameObject go = Resources.Load("FungusTag"); + if (go != null) + { + GameObject spawnedGO = PrefabUtility.InstantiatePrefab(go) as GameObject; + spawnedGO.name = "Tag"; + } + } + + [MenuItem("GameObject/Fungus/Portrait/PortraitStage")] + static void CreatePortraitStage() + { + FungusScriptMenuItems.SpawnPrefab("Assets/Fungus/Portrait/Prefabs/PortraitStage.prefab"); + } + + [MenuItem("GameObject/Fungus/Portrait/PortraitPosition")] + static void CreatePortraitPosition() + { + FungusScriptMenuItems.SpawnPrefab("Assets/Fungus/Portrait/Prefabs/PortraitPosition.prefab"); + } } } \ No newline at end of file diff --git a/Assets/Fungus/Dialog/Editor/MenuEditor.cs b/Assets/Fungus/Dialog/Editor/MenuEditor.cs index cbe9425e..44e87af1 100644 --- a/Assets/Fungus/Dialog/Editor/MenuEditor.cs +++ b/Assets/Fungus/Dialog/Editor/MenuEditor.cs @@ -13,12 +13,14 @@ namespace Fungus protected SerializedProperty textProp; protected SerializedProperty targetSequenceProp; protected SerializedProperty hideIfVisitedProp; + protected SerializedProperty setMenuDialogProp; protected virtual void OnEnable() { textProp = serializedObject.FindProperty("text"); targetSequenceProp = serializedObject.FindProperty("targetSequence"); hideIfVisitedProp = serializedObject.FindProperty("hideIfVisited"); + setMenuDialogProp = serializedObject.FindProperty("setMenuDialog"); } public override void DrawCommandGUI() @@ -39,6 +41,7 @@ namespace Fungus fungusScript); EditorGUILayout.PropertyField(hideIfVisitedProp); + EditorGUILayout.PropertyField(setMenuDialogProp); serializedObject.ApplyModifiedProperties(); } diff --git a/Assets/Fungus/Dialog/Editor/SayEditor.cs b/Assets/Fungus/Dialog/Editor/SayEditor.cs index 6502f77b..e5aa8dea 100644 --- a/Assets/Fungus/Dialog/Editor/SayEditor.cs +++ b/Assets/Fungus/Dialog/Editor/SayEditor.cs @@ -12,63 +12,140 @@ namespace Fungus public class SayEditor : CommandEditor { static public bool showTagHelp; + public Texture2D blackTex; static public void DrawTagHelpLabel() { - string tagsText = "\t{b} Bold Text {/b}\n" + - "\t{i} Italic Text {/i}\n" + - "\t{color=red} Color Text {/color}\n" + - "\t{w}, {w=0.5} Wait \n" + + string tagsText = ""; + tagsText += "\n"; + tagsText += "\t-------- DEFAULT TAGS --------\n\n"; + tagsText += "" + + "\t{b} Bold Text {/b}\n" + + "\t{i} Italic Text {/i}\n" + + "\t{color=red} Color Text (color){/color}\n" + + "\n" + + "\t{s}, {s=60} Writing speed (chars per sec){/s}\n" + + "\t{w}, {w=0.5} Wait (seconds)\n" + "\t{wi} Wait for input\n" + "\t{wc} Wait for input and clear\n" + - "\t{wp}, {wp=0.5} Wait on punctuation\n" + + "\t{wp}, {wp=0.5} Wait on punctuation (seconds){/wp}\n" + "\t{c} Clear\n" + - "\t{s}, {s=60} Writing speed (chars per sec)\n" + - "\t{x} Exit\n" + + "\t{x} Exit, advance to the next command without waiting for input\n" + + "\n" + + "\t{vpunch=0.5} Vertically punch screen (intensity)\n" + + "\t{hpunch=0.5} Horizontally punch screen (intensity)\n" + + "\t{shake=1} Shake screen (intensity)\n" + + "\t{shiver=1} Shiver screen (intensity)\n" + + "\t{flash=0.5} Flash screen (duration)\n" + + "\n" + + "\t{audio=AudioObjectName} Play Audio Once\n" + + "\t{audioloop=AudioObjectName} Play Audio Loop\n" + + "\t{audiopause=AudioObjectName} Pause Audio\n" + + "\t{audiostop=AudioObjectName} Stop Audio\n" + + "\n" + "\t{m} Broadcast message\n" + "\t{$VarName} Substitute variable"; - + if (CustomTag.activeCustomTags.Count > 0) + { + tagsText += "\n\n\t-------- CUSTOM TAGS --------"; + List activeCustomTagGroup = new List(); + foreach (CustomTag ct in CustomTag.activeCustomTags) + { + if(ct.transform.parent != null) + { + if (!activeCustomTagGroup.Contains(ct.transform.parent.transform)) + { + activeCustomTagGroup.Add(ct.transform.parent.transform); + } + } + else + { + activeCustomTagGroup.Add(ct.transform); + } + } + foreach(Transform parent in activeCustomTagGroup) + { + string tagName = parent.name; + string tagStartSymbol = ""; + string tagEndSymbol = ""; + CustomTag parentTag = parent.GetComponent(); + if (parentTag != null) + { + tagName = parentTag.name; + tagStartSymbol = parentTag.tagStartSymbol; + tagEndSymbol = parentTag.tagEndSymbol; + } + tagsText += "\n\n\t" + tagStartSymbol + " " + tagName + " " + tagEndSymbol; + foreach(Transform child in parent) + { + tagName = child.name; + tagStartSymbol = ""; + tagEndSymbol = ""; + CustomTag childTag = child.GetComponent(); + if (childTag != null) + { + tagName = childTag.name; + tagStartSymbol = childTag.tagStartSymbol; + tagEndSymbol = childTag.tagEndSymbol; + } + tagsText += "\n\t " + tagStartSymbol + " " + tagName + " " + tagEndSymbol; + } + } + } + tagsText += "\n"; float pixelHeight = EditorStyles.miniLabel.CalcHeight(new GUIContent(tagsText), EditorGUIUtility.currentViewWidth); - EditorGUILayout.SelectableLabel(tagsText, EditorStyles.miniLabel, GUILayout.MinHeight(pixelHeight)); + EditorGUILayout.SelectableLabel(tagsText, GUI.skin.GetStyle("HelpBox"), GUILayout.MinHeight(pixelHeight)); } - + protected SerializedProperty characterProp; - protected SerializedProperty sayDialogProp; protected SerializedProperty portraitProp; protected SerializedProperty storyTextProp; protected SerializedProperty voiceOverClipProp; protected SerializedProperty showAlwaysProp; protected SerializedProperty showCountProp; - protected SerializedProperty waitForInputProp; + protected SerializedProperty extendPreviousProp; + protected SerializedProperty fadeInProp; + protected SerializedProperty fadeOutProp; + protected SerializedProperty waitForClickProp; + protected SerializedProperty setSayDialogProp; protected virtual void OnEnable() { characterProp = serializedObject.FindProperty("character"); - sayDialogProp = serializedObject.FindProperty("sayDialog"); portraitProp = serializedObject.FindProperty("portrait"); storyTextProp = serializedObject.FindProperty("storyText"); voiceOverClipProp = serializedObject.FindProperty("voiceOverClip"); showAlwaysProp = serializedObject.FindProperty("showAlways"); showCountProp = serializedObject.FindProperty("showCount"); - waitForInputProp = serializedObject.FindProperty("waitForInput"); + extendPreviousProp = serializedObject.FindProperty("extendPrevious"); + fadeInProp = serializedObject.FindProperty("fadeIn"); + fadeOutProp = serializedObject.FindProperty("fadeOut"); + waitForClickProp = serializedObject.FindProperty("waitForClick"); + setSayDialogProp = serializedObject.FindProperty("setSayDialog"); + if (blackTex == null) + { + blackTex = CustomGUI.CreateBlackTexture(); + } + } + + protected virtual void OnDisable() + { + DestroyImmediate(blackTex); } public override void DrawCommandGUI() { serializedObject.Update(); - Say t = target as Say; + bool showPortraits = false; CommandEditor.ObjectField(characterProp, - new GUIContent("Character", "Character to display in dialog"), + new GUIContent("Character", "Character that is speaking"), new GUIContent(""), Character.activeCharacters); - CommandEditor.ObjectField(sayDialogProp, - new GUIContent("Say Dialog", "Say Dialog object to use to display the story text"), - new GUIContent(""), - SayDialog.activeDialogs); - bool showPortraits = false; + Say t = target as Say; + // Only show portrait selection if... if (t.character != null && // Character is selected t.character.portraits != null && // Character has a portraits field @@ -80,22 +157,27 @@ namespace Fungus if (showPortraits) { CommandEditor.ObjectField(portraitProp, - new GUIContent("Portrait", "Portrait representing speaking character"), - new GUIContent(""), - t.character.portraits); + new GUIContent("Portrait", "Portrait representing speaking character"), + new GUIContent(""), + t.character.portraits); } else { - t.portrait = null; + if (!t.extendPrevious) + { + t.portrait = null; + } } EditorGUILayout.PropertyField(storyTextProp); EditorGUILayout.BeginHorizontal(); - + + EditorGUILayout.PropertyField(extendPreviousProp); + GUILayout.FlexibleSpace(); - - if (GUILayout.Button(new GUIContent("Tag Help", "Show help info for tags"), new GUIStyle(EditorStyles.miniButton))) + + if (GUILayout.Button(new GUIContent("Tag Help", "View available tags"), new GUIStyle(EditorStyles.miniButton))) { showTagHelp = !showTagHelp; } @@ -109,8 +191,8 @@ namespace Fungus EditorGUILayout.Separator(); EditorGUILayout.PropertyField(voiceOverClipProp, - new GUIContent("Voice Over Clip", "Voice over audio to play when the say text is displayed")); - + new GUIContent("Voice Over Clip", "Voice over audio to play when the text is displayed")); + EditorGUILayout.PropertyField(showAlwaysProp); if (showAlwaysProp.boolValue == false) @@ -118,19 +200,35 @@ namespace Fungus EditorGUILayout.PropertyField(showCountProp); } - EditorGUILayout.PropertyField(waitForInputProp); + GUIStyle centeredLabel = new GUIStyle(EditorStyles.label); + centeredLabel.alignment = TextAnchor.MiddleCenter; + GUIStyle leftButton = new GUIStyle(EditorStyles.miniButtonLeft); + leftButton.fontSize = 10; + leftButton.font = EditorStyles.toolbarButton.font; + GUIStyle rightButton = new GUIStyle(EditorStyles.miniButtonRight); + rightButton.fontSize = 10; + rightButton.font = EditorStyles.toolbarButton.font; + + EditorGUILayout.BeginHorizontal(); + + EditorGUILayout.PrefixLabel("Fade"); + t.fadeIn = GUILayout.Toggle(t.fadeIn, "In", leftButton, GUILayout.Width(80)); + t.fadeOut = GUILayout.Toggle(t.fadeOut, "Out", rightButton, GUILayout.Width(80)); + + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.PropertyField(waitForClickProp); + EditorGUILayout.PropertyField(setSayDialogProp); if (showPortraits && t.portrait != null) { Texture2D characterTexture = t.portrait.texture; - float aspect = (float)characterTexture.width / (float)characterTexture.height; - Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); - - CharacterEditor characterEditor = Editor.CreateEditor(t.character) as CharacterEditor; - characterEditor.DrawPreview(previewRect, characterTexture); - DestroyImmediate(characterEditor); + if (characterTexture != null) + { + GUI.DrawTexture(previewRect,characterTexture,ScaleMode.ScaleToFit,true,aspect); + } } serializedObject.ApplyModifiedProperties(); diff --git a/Assets/Fungus/Dialog/Resources/FungusMenuDialog.prefab b/Assets/Fungus/Dialog/Resources/FungusMenuDialog.prefab index bee5436f..9b372f28 100644 --- a/Assets/Fungus/Dialog/Resources/FungusMenuDialog.prefab +++ b/Assets/Fungus/Dialog/Resources/FungusMenuDialog.prefab @@ -1,17 +1,17 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &115092 +--- !u!1 &115094 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415092} - - 222: {fileID: 22215098} - - 114: {fileID: 11415066} - - 114: {fileID: 11415068} - - 114: {fileID: 11415070} + - 224: {fileID: 22415094} + - 222: {fileID: 22215100} + - 114: {fileID: 11415072} + - 114: {fileID: 11415074} + - 114: {fileID: 11415076} m_Layer: 5 m_Name: OptionButton5 m_TagString: Untagged @@ -19,251 +19,248 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115094 +--- !u!1 &115102 GameObject: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415094} - - 222: {fileID: 22215100} - - 114: {fileID: 11415072} - - 114: {fileID: 11415074} - - 114: {fileID: 11415076} + - 224: {fileID: 22415102} + - 223: {fileID: 22315124} + - 114: {fileID: 11415088} + - 225: {fileID: 22515124} + - 114: {fileID: 11415064} + - 114: {fileID: 11415124} m_Layer: 5 - m_Name: OptionButton0 + m_Name: FungusMenuDialog m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115096 +--- !u!1 &115108 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415096} - - 222: {fileID: 22215102} - - 114: {fileID: 11415078} + - 224: {fileID: 22415108} + - 222: {fileID: 22215112} + - 114: {fileID: 11415102} + - 114: {fileID: 11415104} + - 114: {fileID: 11404784} m_Layer: 5 - m_Name: Text + m_Name: TimeoutSlider m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115098 +--- !u!1 &115112 GameObject: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415098} - - 222: {fileID: 22215104} - - 114: {fileID: 11415080} - - 114: {fileID: 11415082} - - 114: {fileID: 11415084} - m_Layer: 5 - m_Name: OptionButton4 + - 224: {fileID: 22415112} + - 114: {fileID: 11404786} + - 114: {fileID: 11404782} + m_Layer: 0 + m_Name: ButtonGroup m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115100 +--- !u!1 &115116 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415100} - - 222: {fileID: 22215106} - - 114: {fileID: 11415086} + - 224: {fileID: 22415116} m_Layer: 5 - m_Name: Text + m_Name: Fill Area m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115102 +--- !u!1 &115120 GameObject: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415102} - - 223: {fileID: 22315124} - - 114: {fileID: 11415088} - - 225: {fileID: 22515124} - - 114: {fileID: 11415064} - - 114: {fileID: 11415124} + - 224: {fileID: 22415120} + - 222: {fileID: 22215120} + - 114: {fileID: 11415118} m_Layer: 5 - m_Name: FungusMenuDialog + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115104 +--- !u!1 &115122 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415104} - - 222: {fileID: 22215108} - - 114: {fileID: 11415090} - - 114: {fileID: 11415092} - - 114: {fileID: 11415094} + - 224: {fileID: 22415122} + - 222: {fileID: 22215122} + - 114: {fileID: 11415120} m_Layer: 5 - m_Name: OptionButton3 + m_Name: Fill m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115106 +--- !u!1 &172108 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415106} - - 222: {fileID: 22215110} - - 114: {fileID: 11415096} - - 114: {fileID: 11415098} - - 114: {fileID: 11415100} + - 224: {fileID: 22472108} + - 222: {fileID: 22272108} + - 114: {fileID: 11472108} m_Layer: 5 - m_Name: OptionButton1 + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115108 +--- !u!1 &172110 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415108} - - 222: {fileID: 22215112} - - 114: {fileID: 11415102} - - 114: {fileID: 11415104} - - 114: {fileID: 11404784} + - 224: {fileID: 22472110} + - 222: {fileID: 22272110} + - 114: {fileID: 11472114} + - 114: {fileID: 11472112} + - 114: {fileID: 11472110} m_Layer: 5 - m_Name: TimeoutSlider + m_Name: OptionButton4 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115110 +--- !u!1 &172112 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415110} - - 222: {fileID: 22215114} - - 114: {fileID: 11415106} + - 224: {fileID: 22472112} + - 222: {fileID: 22272112} + - 114: {fileID: 11472116} + - 114: {fileID: 11472118} + - 114: {fileID: 11472120} m_Layer: 5 - m_Name: Text + m_Name: OptionButton3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115112 +--- !u!1 &172114 GameObject: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415112} - - 114: {fileID: 11415108} - - 114: {fileID: 11404786} - - 114: {fileID: 11404782} - m_Layer: 0 - m_Name: ButtonGroup + - 224: {fileID: 22472114} + - 222: {fileID: 22272114} + - 114: {fileID: 11472122} + m_Layer: 5 + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115114 +--- !u!1 &172116 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415114} - - 222: {fileID: 22215116} - - 114: {fileID: 11415110} - - 114: {fileID: 11415112} - - 114: {fileID: 11415114} + - 224: {fileID: 22472116} + - 222: {fileID: 22272116} + - 114: {fileID: 11472124} m_Layer: 5 - m_Name: OptionButton2 + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115116 +--- !u!1 &172118 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415116} + - 224: {fileID: 22472118} + - 222: {fileID: 22272118} + - 114: {fileID: 11472130} + - 114: {fileID: 11472128} + - 114: {fileID: 11472126} m_Layer: 5 - m_Name: Fill Area + m_Name: OptionButton2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115118 +--- !u!1 &172120 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415118} - - 222: {fileID: 22215118} - - 114: {fileID: 11415116} + - 224: {fileID: 22472120} + - 222: {fileID: 22272120} + - 114: {fileID: 11472132} + - 114: {fileID: 11472134} + - 114: {fileID: 11472136} m_Layer: 5 - m_Name: Text + m_Name: OptionButton1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115120 +--- !u!1 &172122 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415120} - - 222: {fileID: 22215120} - - 114: {fileID: 11415118} + - 224: {fileID: 22472122} + - 222: {fileID: 22272122} + - 114: {fileID: 11472138} m_Layer: 5 m_Name: Text m_TagString: Untagged @@ -271,35 +268,37 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115122 +--- !u!1 &172124 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415122} - - 222: {fileID: 22215122} - - 114: {fileID: 11415120} + - 224: {fileID: 22472124} + - 222: {fileID: 22272124} + - 114: {fileID: 11472140} m_Layer: 5 - m_Name: Fill + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &115124 +--- !u!1 &172126 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 4 m_Component: - - 224: {fileID: 22415124} - - 222: {fileID: 22215124} - - 114: {fileID: 11415122} + - 224: {fileID: 22472126} + - 222: {fileID: 22272126} + - 114: {fileID: 11472146} + - 114: {fileID: 11472144} + - 114: {fileID: 11472142} m_Layer: 5 - m_Name: Text + m_Name: OptionButton0 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -372,12 +371,12 @@ MonoBehaviour: m_BlockingMask: serializedVersion: 2 m_Bits: 4294967295 ---- !u!114 &11415066 +--- !u!114 &11415072 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115092} + m_GameObject: {fileID: 115094} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -393,12 +392,12 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 ---- !u!114 &11415068 +--- !u!114 &11415074 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115092} + m_GameObject: {fileID: 115094} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -429,18 +428,18 @@ MonoBehaviour: m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 11415066} + m_TargetGraphic: {fileID: 11415072} m_OnClick: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---- !u!114 &11415070 +--- !u!114 &11415076 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115092} + m_GameObject: {fileID: 115094} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -453,20 +452,41 @@ MonoBehaviour: m_PreferredHeight: 100 m_FlexibleWidth: -1 m_FlexibleHeight: -1 ---- !u!114 &11415072 +--- !u!114 &11415088 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115094} + m_GameObject: {fileID: 115102} + 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!114 &11415102 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 115108} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} - m_Color: {r: 1, g: 1, b: 1, a: .862745106} - m_Sprite: {fileID: 21300000, guid: c207de86481ff7d48a2fba2fcc374723, type: 3} + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .588} + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 @@ -474,15 +494,15 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 ---- !u!114 &11415074 +--- !u!114 &11415104 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115094} + m_GameObject: {fileID: 115108} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: @@ -491,55 +511,43 @@ MonoBehaviour: m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} - m_Transition: 2 + m_Transition: 1 m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: .145098045, g: .75686276, b: .87843138, a: .698039234} - m_PressedColor: {r: .0784313753, g: .513725519, b: .600000024, a: 1} - m_DisabledColor: {r: .588235319, g: .647058845, b: .666666687, a: .501960814} + m_NormalColor: {r: .250980407, g: .250980407, b: .250980407, a: .501960814} + m_HighlightedColor: {r: .501960814, g: .501960814, b: .501960814, a: .698039234} + m_PressedColor: {r: .345098048, g: .345098048, b: .345098048, a: .698039234} + m_DisabledColor: {r: .250980407, g: .250980407, b: .250980407, a: .501960814} m_ColorMultiplier: 2 m_FadeDuration: .100000001 m_SpriteState: - m_HighlightedSprite: {fileID: 21300000, guid: 888feb4a32e3b564fb7e6f9b28cc8e10, - type: 3} - m_PressedSprite: {fileID: 21300000, guid: 2e33a3f531b6adc4f9d8a99c83e2ba2d, type: 3} - m_DisabledSprite: {fileID: 21300000, guid: 49d5ccdda7b99e24787c2abc3891294c, type: 3} + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 11415072} - m_OnClick: + m_Interactable: 0 + m_TargetGraphic: {fileID: 11415102} + m_FillRect: {fileID: 22415122} + m_HandleRect: {fileID: 0} + m_Direction: 1 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 1 + m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---- !u!114 &11415076 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115094} - 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: -1 - m_PreferredHeight: 100 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 ---- !u!114 &11415078 +--- !u!114 &11415118 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115096} + m_GameObject: {fileID: 115120} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -548,7 +556,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FontData: - m_Font: {fileID: 12800000, guid: 333ca057701a73249850670faef184dc, type: 3} + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 1 @@ -560,20 +568,20 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Continue ---- !u!114 &11415080 +--- !u!114 &11415120 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115098} + m_GameObject: {fileID: 115122} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} - m_Color: {r: 1, g: 1, b: 1, a: .862745106} - m_Sprite: {fileID: 21300000, guid: c207de86481ff7d48a2fba2fcc374723, type: 3} + m_Material: {fileID: 0} + m_Color: {r: .200000003, g: .709803939, b: .898039222, a: .945098042} + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 @@ -581,81 +589,32 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 ---- !u!114 &11415082 +--- !u!114 &11415124 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115098} + m_GameObject: {fileID: 115102} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: 11500000, guid: ee8371d2b2fe14a9ca0a9465140027de, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 2 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: .145098045, g: .75686276, b: .87843138, a: .698039234} - m_PressedColor: {r: .0784313753, g: .513725519, b: .600000024, a: 1} - m_DisabledColor: {r: .588235319, g: .647058845, b: .666666687, a: .501960814} - m_ColorMultiplier: 2 - m_FadeDuration: .100000001 - m_SpriteState: - m_HighlightedSprite: {fileID: 21300000, guid: 888feb4a32e3b564fb7e6f9b28cc8e10, - type: 3} - m_PressedSprite: {fileID: 21300000, guid: 2e33a3f531b6adc4f9d8a99c83e2ba2d, type: 3} - m_DisabledSprite: {fileID: 21300000, guid: 49d5ccdda7b99e24787c2abc3891294c, type: 3} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 11415080} - m_OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &11415084 +--- !u!114 &11472108 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115098} + m_GameObject: {fileID: 172108} 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: -1 - m_PreferredHeight: 100 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 ---- !u!114 &11415086 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + 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: 333ca057701a73249850670faef184dc, type: 3} + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 1 @@ -667,54 +626,30 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Continue ---- !u!114 &11415088 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115102} - 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!114 &11415090 +--- !u!114 &11472110 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115104} + m_GameObject: {fileID: 172110} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} - m_Color: {r: 1, g: 1, b: 1, a: .862745106} - m_Sprite: {fileID: 21300000, guid: c207de86481ff7d48a2fba2fcc374723, type: 3} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!114 &11415092 + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 100 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11472112 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115104} + m_GameObject: {fileID: 172110} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -745,36 +680,39 @@ MonoBehaviour: m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 11415090} + m_TargetGraphic: {fileID: 11472114} m_OnClick: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---- !u!114 &11415094 +--- !u!114 &11472114 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115104} + m_GameObject: {fileID: 172110} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: 100 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 ---- !u!114 &11415096 + m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Color: {r: 1, g: 1, b: 1, a: .862745106} + m_Sprite: {fileID: 21300000, guid: c207de86481ff7d48a2fba2fcc374723, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11472116 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115106} + m_GameObject: {fileID: 172112} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -790,12 +728,12 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 ---- !u!114 &11415098 +--- !u!114 &11472118 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115106} + m_GameObject: {fileID: 172112} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -826,18 +764,18 @@ MonoBehaviour: m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 11415096} + m_TargetGraphic: {fileID: 11472116} m_OnClick: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---- !u!114 &11415100 +--- !u!114 &11472120 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115106} + m_GameObject: {fileID: 172112} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -850,36 +788,85 @@ MonoBehaviour: m_PreferredHeight: 100 m_FlexibleWidth: -1 m_FlexibleHeight: -1 ---- !u!114 &11415102 +--- !u!114 &11472122 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115108} + m_GameObject: {fileID: 172114} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + 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: .588} - 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!114 &11415104 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FontData: + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 30 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Continue +--- !u!114 &11472124 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115108} + m_GameObject: {fileID: 172116} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + 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: bb145366ce7024469a5758b08d31802c, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 30 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Continue +--- !u!114 &11472126 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 172118} + 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: -1 + m_PreferredHeight: 100 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11472128 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 172118} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: @@ -888,92 +875,58 @@ MonoBehaviour: m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} m_SelectOnRight: {fileID: 0} - m_Transition: 1 + m_Transition: 2 m_Colors: - m_NormalColor: {r: .250980407, g: .250980407, b: .250980407, a: .501960814} - m_HighlightedColor: {r: .501960814, g: .501960814, b: .501960814, a: .698039234} - m_PressedColor: {r: .345098048, g: .345098048, b: .345098048, a: .698039234} - m_DisabledColor: {r: .250980407, g: .250980407, b: .250980407, a: .501960814} + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .145098045, g: .75686276, b: .87843138, a: .698039234} + m_PressedColor: {r: .0784313753, g: .513725519, b: .600000024, a: 1} + m_DisabledColor: {r: .588235319, g: .647058845, b: .666666687, a: .501960814} m_ColorMultiplier: 2 m_FadeDuration: .100000001 m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} + m_HighlightedSprite: {fileID: 21300000, guid: 888feb4a32e3b564fb7e6f9b28cc8e10, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: 2e33a3f531b6adc4f9d8a99c83e2ba2d, type: 3} + m_DisabledSprite: {fileID: 21300000, guid: 49d5ccdda7b99e24787c2abc3891294c, type: 3} m_AnimationTriggers: m_NormalTrigger: Normal m_HighlightedTrigger: Highlighted m_PressedTrigger: Pressed m_DisabledTrigger: Disabled - m_Interactable: 0 - m_TargetGraphic: {fileID: 11415102} - m_FillRect: {fileID: 22415122} - m_HandleRect: {fileID: 0} - m_Direction: 1 - m_MinValue: 0 - m_MaxValue: 1 - m_WholeNumbers: 0 - m_Value: 1 - m_OnValueChanged: + m_Interactable: 1 + m_TargetGraphic: {fileID: 11472130} + m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---- !u!114 &11415106 +--- !u!114 &11472130 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115110} + m_GameObject: {fileID: 172118} 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: 333ca057701a73249850670faef184dc, type: 3} - m_FontSize: 40 - m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 30 - m_MaxSize: 40 - m_Alignment: 4 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Continue ---- !u!114 &11415108 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115112} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 4 - m_StartCorner: 0 - m_StartAxis: 1 - m_CellSize: {x: 1300, y: 80} - m_Spacing: {x: 0, y: 10} - m_Constraint: 1 - m_ConstraintCount: 1 ---- !u!114 &11415110 + m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Color: {r: 1, g: 1, b: 1, a: .862745106} + m_Sprite: {fileID: 21300000, guid: c207de86481ff7d48a2fba2fcc374723, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11472132 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115114} + m_GameObject: {fileID: 172120} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -989,12 +942,12 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 ---- !u!114 &11415112 +--- !u!114 &11472134 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115114} + m_GameObject: {fileID: 172120} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -1025,18 +978,18 @@ MonoBehaviour: m_PressedTrigger: Pressed m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 11415110} + m_TargetGraphic: {fileID: 11472132} m_OnClick: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---- !u!114 &11415114 +--- !u!114 &11472136 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115114} + m_GameObject: {fileID: 172120} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -1049,12 +1002,12 @@ MonoBehaviour: m_PreferredHeight: 100 m_FlexibleWidth: -1 m_FlexibleHeight: -1 ---- !u!114 &11415116 +--- !u!114 &11472138 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115118} + m_GameObject: {fileID: 172122} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -1063,7 +1016,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FontData: - m_Font: {fileID: 12800000, guid: 333ca057701a73249850670faef184dc, type: 3} + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 1 @@ -1075,12 +1028,12 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Continue ---- !u!114 &11415118 +--- !u!114 &11472140 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115120} + m_GameObject: {fileID: 172124} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} @@ -1089,7 +1042,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FontData: - m_Font: {fileID: 12800000, guid: 333ca057701a73249850670faef184dc, type: 3} + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 1 @@ -1101,149 +1054,171 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Continue ---- !u!114 &11415120 +--- !u!114 &11472142 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115122} + m_GameObject: {fileID: 172126} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: .200000003, g: .709803939, b: .898039222, a: .945098042} - m_Sprite: {fileID: 10905, 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!114 &11415122 + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 100 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11472144 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115124} + m_GameObject: {fileID: 172126} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Script: {fileID: 1392445389, 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: 333ca057701a73249850670faef184dc, type: 3} - m_FontSize: 40 - m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 30 - m_MaxSize: 40 - m_Alignment: 4 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Continue ---- !u!114 &11415124 + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 2 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .145098045, g: .75686276, b: .87843138, a: .698039234} + m_PressedColor: {r: .0784313753, g: .513725519, b: .600000024, a: 1} + m_DisabledColor: {r: .588235319, g: .647058845, b: .666666687, a: .501960814} + m_ColorMultiplier: 2 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 21300000, guid: 888feb4a32e3b564fb7e6f9b28cc8e10, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: 2e33a3f531b6adc4f9d8a99c83e2ba2d, type: 3} + m_DisabledSprite: {fileID: 21300000, guid: 49d5ccdda7b99e24787c2abc3891294c, type: 3} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11472146} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11472146 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115102} + m_GameObject: {fileID: 172126} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ee8371d2b2fe14a9ca0a9465140027de, type: 3} + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - hasStarted: 0 ---- !u!222 &22215098 + m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Color: {r: 1, g: 1, b: 1, a: .862745106} + m_Sprite: {fileID: 21300000, guid: c207de86481ff7d48a2fba2fcc374723, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22215100 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115092} ---- !u!222 &22215100 + m_GameObject: {fileID: 115094} +--- !u!222 &22215112 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115094} ---- !u!222 &22215102 + m_GameObject: {fileID: 115108} +--- !u!222 &22215120 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115096} ---- !u!222 &22215104 + m_GameObject: {fileID: 115120} +--- !u!222 &22215122 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115098} ---- !u!222 &22215106 + m_GameObject: {fileID: 115122} +--- !u!222 &22272108 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115100} ---- !u!222 &22215108 + m_GameObject: {fileID: 172108} +--- !u!222 &22272110 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115104} ---- !u!222 &22215110 + m_GameObject: {fileID: 172110} +--- !u!222 &22272112 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115106} ---- !u!222 &22215112 + m_GameObject: {fileID: 172112} +--- !u!222 &22272114 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115108} ---- !u!222 &22215114 + m_GameObject: {fileID: 172114} +--- !u!222 &22272116 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115110} ---- !u!222 &22215116 + m_GameObject: {fileID: 172116} +--- !u!222 &22272118 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115114} ---- !u!222 &22215118 + m_GameObject: {fileID: 172118} +--- !u!222 &22272120 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115118} ---- !u!222 &22215120 + m_GameObject: {fileID: 172120} +--- !u!222 &22272122 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115120} ---- !u!222 &22215122 + m_GameObject: {fileID: 172122} +--- !u!222 &22272124 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115122} ---- !u!222 &22215124 + m_GameObject: {fileID: 172124} +--- !u!222 &22272126 CanvasRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115124} + m_GameObject: {fileID: 172126} --- !u!223 &22315124 Canvas: m_ObjectHideFlags: 1 @@ -1261,17 +1236,17 @@ Canvas: m_OverridePixelPerfect: 0 m_SortingLayerID: 0 m_SortingOrder: 1 ---- !u!224 &22415092 +--- !u!224 &22415094 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115092} + m_GameObject: {fileID: 115094} 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: 22415110} + - {fileID: 22415120} m_Father: {fileID: 22415112} m_RootOrder: 5 m_AnchorMin: {x: 0, y: 0} @@ -1279,200 +1254,216 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: .5, y: .5} ---- !u!224 &22415094 +--- !u!224 &22415102 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115094} + m_GameObject: {fileID: 115102} 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_LocalScale: {x: 0, y: 0, z: 0} m_Children: - - {fileID: 22415120} - m_Father: {fileID: 22415112} + - {fileID: 22415112} + m_Father: {fileID: 0} 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!224 &22415096 + m_Pivot: {x: 0, y: 0} +--- !u!224 &22415108 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115096} + m_GameObject: {fileID: 115108} 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: 22415104} - m_RootOrder: 0 + m_LocalScale: {x: .899999976, y: 1, z: 1} + m_Children: + - {fileID: 22415116} + m_Father: {fileID: 22415112} + m_RootOrder: 6 m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + 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!224 &22415098 +--- !u!224 &22415112 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115098} + m_GameObject: {fileID: 115112} 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: 22415100} - m_Father: {fileID: 22415112} - m_RootOrder: 4 + - {fileID: 22472126} + - {fileID: 22472120} + - {fileID: 22472118} + - {fileID: 22472112} + - {fileID: 22472110} + - {fileID: 22415094} + - {fileID: 22415108} + m_Father: {fileID: 22415102} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: -1.84769997e-05, y: 191} + m_SizeDelta: {x: 1300, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22415116 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 115116} + 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: 22415122} + m_Father: {fileID: 22415108} + m_RootOrder: 0 m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -10} m_Pivot: {x: .5, y: .5} ---- !u!224 &22415100 +--- !u!224 &22415120 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115100} + m_GameObject: {fileID: 115120} 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: 22415098} + m_Father: {fileID: 22415094} m_RootOrder: 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: .5, y: .5} ---- !u!224 &22415102 +--- !u!224 &22415122 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115102} + m_GameObject: {fileID: 115122} 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: 22415112} - m_Father: {fileID: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22415116} 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: 0, y: 0} ---- !u!224 &22415104 + m_SizeDelta: {x: 10, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22472108 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115104} + m_GameObject: {fileID: 172108} 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: 22415096} - m_Father: {fileID: 22415112} - m_RootOrder: 3 + m_Children: [] + m_Father: {fileID: 22472110} + m_RootOrder: 0 m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {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: .5, y: .5} ---- !u!224 &22415106 +--- !u!224 &22472110 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115106} + m_GameObject: {fileID: 172110} 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: 22415118} + - {fileID: 22472108} m_Father: {fileID: 22415112} - m_RootOrder: 1 + m_RootOrder: 4 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!224 &22415108 +--- !u!224 &22472112 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115108} + m_GameObject: {fileID: 172112} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: .899999976, y: 1, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 22415116} + - {fileID: 22472114} m_Father: {fileID: 22415112} - m_RootOrder: 6 + m_RootOrder: 3 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!224 &22415110 +--- !u!224 &22472114 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115110} + m_GameObject: {fileID: 172114} 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: 22415092} + m_Father: {fileID: 22472112} m_RootOrder: 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: .5, y: .5} ---- !u!224 &22415112 +--- !u!224 &22472116 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115112} + m_GameObject: {fileID: 172116} 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: 22415094} - - {fileID: 22415106} - - {fileID: 22415114} - - {fileID: 22415104} - - {fileID: 22415098} - - {fileID: 22415092} - - {fileID: 22415108} - m_Father: {fileID: 22415102} + m_Children: [] + m_Father: {fileID: 22472118} m_RootOrder: 0 - m_AnchorMin: {x: .5, y: .5} - m_AnchorMax: {x: .5, y: .5} - m_AnchoredPosition: {x: -1.84769997e-05, y: 191} - m_SizeDelta: {x: 1300, y: 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: .5, y: .5} ---- !u!224 &22415114 +--- !u!224 &22472118 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115114} + m_GameObject: {fileID: 172118} 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: 22415124} + - {fileID: 22472116} m_Father: {fileID: 22415112} m_RootOrder: 2 m_AnchorMin: {x: 0, y: 0} @@ -1480,90 +1471,74 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: .5, y: .5} ---- !u!224 &22415116 +--- !u!224 &22472120 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115116} + m_GameObject: {fileID: 172120} 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: 22415122} - m_Father: {fileID: 22415108} - m_RootOrder: 0 + - {fileID: 22472122} + m_Father: {fileID: 22415112} + m_RootOrder: 1 m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: -10} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: .5, y: .5} ---- !u!224 &22415118 +--- !u!224 &22472122 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115118} + m_GameObject: {fileID: 172122} 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: 22415106} + m_Father: {fileID: 22472120} m_RootOrder: 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: .5, y: .5} ---- !u!224 &22415120 +--- !u!224 &22472124 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115120} + m_GameObject: {fileID: 172124} 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: 22415094} + m_Father: {fileID: 22472126} m_RootOrder: 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: .5, y: .5} ---- !u!224 &22415122 +--- !u!224 &22472126 RectTransform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115122} + m_GameObject: {fileID: 172126} 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: 22415116} + m_Children: + - {fileID: 22472124} + m_Father: {fileID: 22415112} m_RootOrder: 0 m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 10, y: 0} - m_Pivot: {x: .5, y: .5} ---- !u!224 &22415124 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 115124} - 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: 22415114} - m_RootOrder: 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: .5, y: .5} --- !u!225 &22515124 diff --git a/Assets/Fungus/Dialog/Resources/FungusSayDialog.prefab b/Assets/Fungus/Dialog/Resources/FungusSayDialog.prefab index a8531ba6..e66ca312 100644 --- a/Assets/Fungus/Dialog/Resources/FungusSayDialog.prefab +++ b/Assets/Fungus/Dialog/Resources/FungusSayDialog.prefab @@ -232,7 +232,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Sprite: {fileID: 0} + m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} m_Type: 0 m_PreserveAspect: 1 m_FillCenter: 1 @@ -254,7 +254,17 @@ MonoBehaviour: writingSpeed: 30 writingSound: {fileID: 8300000, guid: 5a3c8e205638142dcb8227abe5f14f1f, type: 3} loopWritingSound: 1 + beepPerCharacter: 0 + slowBeepsAt: 10 + fastBeepsAt: 30 punctuationPause: .200000003 + alwaysFadeDialog: 1 + fadeDuration: .25 + fadeEaseType: 0 + alwaysMoveDialog: 0 + startPosition: {x: 0, y: 0} + moveSpeed: 1000 + moveEaseType: 0 clickAnywhere: 1 dialogCanvas: {fileID: 22388894} nameText: {fileID: 11488900} @@ -276,7 +286,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FontData: - m_Font: {fileID: 12800000, guid: 333ca057701a73249850670faef184dc, type: 3} + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 1 @@ -323,7 +333,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: .258823544, g: .254901975, b: .262745112, a: 1} m_FontData: - m_Font: {fileID: 12800000, guid: ee3a4060b74a7fd45b0cc411c99fd8f2, type: 3} + m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3} m_FontSize: 50 m_FontStyle: 0 m_BestFit: 0 diff --git a/Assets/Fungus/Dialog/Resources/FungusTag.prefab b/Assets/Fungus/Dialog/Resources/FungusTag.prefab new file mode 100644 index 00000000..edb0c35d --- /dev/null +++ b/Assets/Fungus/Dialog/Resources/FungusTag.prefab @@ -0,0 +1,57 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &177196 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 477196} + - 114: {fileID: 11477196} + m_Layer: 0 + m_Name: FungusTag + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &477196 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 177196} + 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!114 &11477196 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 177196} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 335e04fbdd5260043abb299a991dcbe8, type: 3} + m_Name: + m_EditorClassIdentifier: + tagStartSymbol: '{customName}' + tagEndSymbol: '{/customName}' + replaceTagStartWith: '{color=blue}' + replaceTagEndWith: '{/color}' +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 177196} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/Assets/Fungus/Dialog/Resources/FungusTag.prefab.meta b/Assets/Fungus/Dialog/Resources/FungusTag.prefab.meta new file mode 100644 index 00000000..74bb9cb4 --- /dev/null +++ b/Assets/Fungus/Dialog/Resources/FungusTag.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 8345c33c7c8ada64083f41d452b315eb +NativeFormatImporter: + userData: diff --git a/Assets/Fungus/Dialog/Scripts/Character.cs b/Assets/Fungus/Dialog/Scripts/Character.cs index 0ff20e66..a4abf6af 100644 --- a/Assets/Fungus/Dialog/Scripts/Character.cs +++ b/Assets/Fungus/Dialog/Scripts/Character.cs @@ -12,7 +12,9 @@ namespace Fungus public Color nameColor = Color.white; public AudioClip soundEffect; public Sprite profileSprite; - public List portraits; + public List portraits; + public FacingDirection portraitsFace; + public PortraitState state; [TextArea(5,10)] public string notes; diff --git a/Assets/Fungus/Dialog/Scripts/Commands/Menu.cs b/Assets/Fungus/Dialog/Scripts/Commands/Menu.cs index 2f9aafd6..19fc59b2 100644 --- a/Assets/Fungus/Dialog/Scripts/Commands/Menu.cs +++ b/Assets/Fungus/Dialog/Scripts/Commands/Menu.cs @@ -17,34 +17,36 @@ namespace Fungus // Menu Timeout executes a sequence if the timeout expires // The 'Hide If Visited' option checks the execution count of the target sequence // Hide Say dialog when finished? Let Say command handle that - // Can wrap in an If statement if you need a conditional option - public string text = "Option"; + public string text = "Option Text"; public Sequence targetSequence; public bool hideIfVisited; + public MenuDialog setMenuDialog; + protected static bool eventSystemPresent; public override void OnEnter() { CheckEventSystem(); - MenuDialog menuDialog = SetMenuDialog.GetActiveMenuDialog(); - - if (menuDialog != null) + if (setMenuDialog != null) { - menuDialog.gameObject.SetActive(true); + // Override the active menu dialog + MenuDialog.activeMenuDialog = setMenuDialog; + } - if (hideIfVisited && - targetSequence != null && - targetSequence.GetExecutionCount() > 0) - { - // Don't show this option - } - else + bool hideOption = (hideIfVisited && targetSequence != null && targetSequence.GetExecutionCount() > 0); + + if (!hideOption) + { + MenuDialog menuDialog = MenuDialog.GetMenuDialog(); + if (menuDialog != null) { - menuDialog.AddOption(text, targetSequence); + menuDialog.gameObject.SetActive(true); + string displayText = text; + menuDialog.AddOption(displayText, targetSequence); } } diff --git a/Assets/Fungus/Dialog/Scripts/Commands/MenuTimer.cs b/Assets/Fungus/Dialog/Scripts/Commands/MenuTimer.cs index 3c6ddf9e..e1300509 100644 --- a/Assets/Fungus/Dialog/Scripts/Commands/MenuTimer.cs +++ b/Assets/Fungus/Dialog/Scripts/Commands/MenuTimer.cs @@ -17,7 +17,8 @@ namespace Fungus public override void OnEnter() { - MenuDialog menuDialog = SetMenuDialog.GetActiveMenuDialog(); + MenuDialog menuDialog = MenuDialog.GetMenuDialog(); + if (menuDialog != null && targetSequence != null) { diff --git a/Assets/Fungus/Dialog/Scripts/Commands/Say.cs b/Assets/Fungus/Dialog/Scripts/Commands/Say.cs index 99d9d356..89e35ed8 100644 --- a/Assets/Fungus/Dialog/Scripts/Commands/Say.cs +++ b/Assets/Fungus/Dialog/Scripts/Commands/Say.cs @@ -7,23 +7,21 @@ namespace Fungus { [CommandInfo("Dialog", "Say", - "Writes a line of story text to a Say Dialog. " + - "Select [Game Object > Fungus > Dialog > Say Dialog] to create a new Say Dialog in your scene. " + - "Select [Game Object > Fungus > Dialog > Character] to create a new selectable speaking character.")] + "Writes text in a dialog box.")] [AddComponentMenu("")] public class Say : Command { - [Tooltip("Story text to display to the player")] + [Tooltip("Text to display")] [TextArea(5,10)] public string storyText; - [Tooltip("Speaking character to use when writing the story text")] + [Tooltip("Character that is speaking")] public Character character; [Tooltip("Portrait that represents speaking character")] public Sprite portrait; - [Tooltip("Voiceover audio to play when writing the story text")] + [Tooltip("Voiceover audio to play when writing the text")] public AudioClip voiceOverClip; [Tooltip("Always show this Say text when the command is executed multiple times")] @@ -32,8 +30,20 @@ namespace Fungus [Tooltip("Number of times to show this Say text when the command is executed multiple times")] public int showCount = 1; - [Tooltip("Wait for player input before hiding the dialog and continuing. If false then the dialog will display and execution will continue.")] - public bool waitForInput = true; + [Tooltip("Type this text in the previous dialog box.")] + public bool extendPrevious = false; + + [Tooltip("Fade in this dialog box.")] + public bool fadeIn = false; + + [Tooltip("Fade out this dialog box.")] + public bool fadeOut = false; + + [Tooltip("Wait for player to click before hiding the dialog and continuing. If false then the dialog will display and execution will continue immediately.")] + public bool waitForClick = true; + + [Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")] + public SayDialog setSayDialog; protected int executionCount; @@ -47,7 +57,13 @@ namespace Fungus executionCount++; - SayDialog sayDialog = SetSayDialog.GetActiveSayDialog(); + // Override the active say dialog if needed + if (setSayDialog != null) + { + SayDialog.activeSayDialog = setSayDialog; + } + + SayDialog sayDialog = SayDialog.GetSayDialog(); if (sayDialog == null) { @@ -59,19 +75,65 @@ namespace Fungus sayDialog.SetCharacter(character, fungusScript); sayDialog.SetCharacterImage(portrait); - sayDialog.ShowDialog(true); + bool fadingIn = false; + bool movingIn = false; + if (sayDialog.alwaysFadeDialog || fadeIn) + { + sayDialog.FadeInDialog(); + fadingIn = true; + } + if (sayDialog.alwaysMoveDialog) + { + sayDialog.MoveInDialog(); + movingIn = true; + } + if (!fadingIn && !movingIn) + { + sayDialog.ShowDialog(true); + } if (voiceOverClip != null) { sayDialog.PlayVoiceOver(voiceOverClip); } - string subbedText = fungusScript.SubstituteVariables(storyText); + string displayText = storyText; + + foreach (CustomTag ct in CustomTag.activeCustomTags) + { + displayText = displayText.Replace(ct.tagStartSymbol,ct.replaceTagStartWith); + if (ct.tagEndSymbol != "" && ct.replaceTagEndWith != "") + { + displayText = displayText.Replace(ct.tagEndSymbol,ct.replaceTagEndWith); + } + } + + if (extendPrevious) + { + displayText = "{s=0}" + Dialog.prevStoryText + "{/s}" + displayText; + } + + string subbedText = fungusScript.SubstituteVariables(displayText); - sayDialog.Say(subbedText, waitForInput, delegate { - if (waitForInput) + sayDialog.Say(subbedText, waitForClick, delegate { + if (waitForClick) { - sayDialog.ShowDialog(false); + bool fadingOut = false; + bool movingOut = false; + if (sayDialog.alwaysFadeDialog || fadeOut) + { + sayDialog.FadeOutDialog(); + fadingOut = true; + } + if (sayDialog.alwaysMoveDialog) + { + sayDialog.MoveOutDialog(); + movingOut = true; + } + if (!fadingOut && !movingOut) + { + sayDialog.ShowDialog(false); + } } Continue(); }); @@ -84,6 +146,10 @@ namespace Fungus { namePrefix = character.nameText + ": "; } + if (extendPrevious) + { + namePrefix = "EXTEND" + ": "; + } return namePrefix + "\"" + storyText + "\""; } diff --git a/Assets/Fungus/Dialog/Scripts/Commands/SetMenuDialog.cs b/Assets/Fungus/Dialog/Scripts/Commands/SetMenuDialog.cs index 4b551990..f1037f00 100644 --- a/Assets/Fungus/Dialog/Scripts/Commands/SetMenuDialog.cs +++ b/Assets/Fungus/Dialog/Scripts/Commands/SetMenuDialog.cs @@ -10,43 +10,15 @@ namespace Fungus [AddComponentMenu("")] public class SetMenuDialog : Command { - public static MenuDialog activeMenuDialog; - public MenuDialog menuDialog; - public static MenuDialog GetActiveMenuDialog() - { - if (activeMenuDialog == null) - { - activeMenuDialog = GameObject.FindObjectOfType(); - } - - if (activeMenuDialog == null) - { - // Auto spawn a menu object from the prefab - GameObject go = Resources.Load("FungusMenuDialog"); - if (go != null) - { - GameObject spawnedGO = Instantiate(go) as GameObject; - spawnedGO.name = "MenuDialog"; - spawnedGO.SetActive(false); - activeMenuDialog = spawnedGO.GetComponent(); - } - } - - return activeMenuDialog; - } - public override void OnEnter() { if (menuDialog != null) { - activeMenuDialog = menuDialog; + MenuDialog.activeMenuDialog = menuDialog; } - // Populate the static cached dialog - GetActiveMenuDialog(); - Continue(); } @@ -62,7 +34,7 @@ namespace Fungus public override Color GetButtonColor() { - return new Color32(170, 204, 169, 255); + return new Color32(184, 210, 235, 255); } } diff --git a/Assets/Fungus/Dialog/Scripts/Commands/SetSayDialog.cs b/Assets/Fungus/Dialog/Scripts/Commands/SetSayDialog.cs index 9ddc3961..2e5d4b10 100644 --- a/Assets/Fungus/Dialog/Scripts/Commands/SetSayDialog.cs +++ b/Assets/Fungus/Dialog/Scripts/Commands/SetSayDialog.cs @@ -10,43 +10,15 @@ namespace Fungus [AddComponentMenu("")] public class SetSayDialog : Command { - public static SayDialog activeDialog; - public SayDialog sayDialog; - public static SayDialog GetActiveSayDialog() - { - if (activeDialog == null) - { - activeDialog = GameObject.FindObjectOfType(); - } - - if (activeDialog == null) - { - // Auto spawn a say dialog from the prefab - GameObject go = Resources.Load("FungusSayDialog"); - if (go != null) - { - GameObject spawnedGO = Instantiate(go) as GameObject; - spawnedGO.name = "SayDialog"; - spawnedGO.SetActive(false); - activeDialog = spawnedGO.GetComponent(); - } - } - - return activeDialog; - } - public override void OnEnter() { if (sayDialog != null) { - activeDialog = sayDialog; + SayDialog.activeSayDialog = sayDialog; } - // Populate the static cached dialog - GetActiveSayDialog(); - Continue(); } diff --git a/Assets/Fungus/Dialog/Scripts/CustomTag.cs b/Assets/Fungus/Dialog/Scripts/CustomTag.cs new file mode 100644 index 00000000..ebef3c13 --- /dev/null +++ b/Assets/Fungus/Dialog/Scripts/CustomTag.cs @@ -0,0 +1,33 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using System.Collections; +using System.Collections.Generic; + +namespace Fungus +{ + [ExecuteInEditMode] + public class CustomTag : MonoBehaviour + { + public string tagStartSymbol; + public string tagEndSymbol; + public string replaceTagStartWith; + public string replaceTagEndWith; + + static public List activeCustomTags = new List(); + + protected virtual void OnEnable() + { + if (!activeCustomTags.Contains(this)) + { + activeCustomTags.Add(this); + } + } + + protected virtual void OnDisable() + { + activeCustomTags.Remove(this); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Dialog/Scripts/CustomTag.cs.meta b/Assets/Fungus/Dialog/Scripts/CustomTag.cs.meta new file mode 100644 index 00000000..6ca7e394 --- /dev/null +++ b/Assets/Fungus/Dialog/Scripts/CustomTag.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 335e04fbdd5260043abb299a991dcbe8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Dialog/Scripts/Dialog.cs b/Assets/Fungus/Dialog/Scripts/Dialog.cs index 545d726e..4bc76a70 100644 --- a/Assets/Fungus/Dialog/Scripts/Dialog.cs +++ b/Assets/Fungus/Dialog/Scripts/Dialog.cs @@ -10,11 +10,25 @@ namespace Fungus public class Dialog : MonoBehaviour { + public static Character speakingCharacter; + public static string prevStoryText; + public float writingSpeed = 60; public AudioClip writingSound; public bool loopWritingSound = true; + public bool beepPerCharacter = false; + public float slowBeepsAt = 10f; + public float fastBeepsAt = 30f; public float punctuationPause = 0.25f; - + public bool alwaysFadeDialog = false; + public float fadeDuration = 1f; + public LeanTweenType fadeEaseType; + public bool alwaysMoveDialog = false; + public Vector2 startPosition; + 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; @@ -59,9 +73,10 @@ namespace Fungus { if (dialogCanvas != null) { + LeanTween.cancel(dialogCanvas.gameObject); + dialogCanvas.GetComponent().alpha = 1; dialogCanvas.gameObject.SetActive(visible); } - if (visible) { // A new dialog is often shown as the result of a mouse click, so we need @@ -71,6 +86,71 @@ namespace Fungus } } + public virtual void FadeInDialog() + { + LeanTween.cancel(dialogCanvas.gameObject); + dialogCanvas.GetComponent().alpha = 0; + dialogCanvas.gameObject.SetActive(true); + if (fadeDuration == 0) fadeDuration = float.Epsilon; + LeanTween.value(dialogCanvas.gameObject,0,1,fadeDuration).setEase(fadeEaseType).setOnUpdate( + (float fadeAmount)=>{ + dialogCanvas.GetComponent().alpha = fadeAmount; + } + ).setOnComplete( + ()=>{ + dialogCanvas.GetComponent().alpha = 1; + } + ); + } + + public virtual void MoveInDialog() + { + endPosition = this.transform.position; + float moveDuration = (Vector3.Distance(startPosition,this.transform.position)/moveSpeed); + if (moveSpeed == 0) moveDuration = float.Epsilon; + LeanTween.value(this.gameObject,(Vector2)startPosition,(Vector2)endPosition,moveDuration).setEase(moveEaseType).setOnUpdate( + (Vector3 updatePosition)=>{ + this.transform.position = updatePosition; + } + ).setOnComplete( + ()=>{ + this.transform.position = endPosition; + } + ); + } + + public virtual void FadeOutDialog() + { + LeanTween.cancel(dialogCanvas.gameObject); + if (fadeDuration == 0) fadeDuration = float.Epsilon; + LeanTween.value(dialogCanvas.gameObject,1,0,fadeDuration).setEase(fadeEaseType).setOnUpdate( + (float fadeAmount)=>{ + dialogCanvas.GetComponent().alpha = fadeAmount; + } + ).setOnComplete( + ()=>{ + dialogCanvas.gameObject.SetActive(false); + dialogCanvas.GetComponent().alpha = 1; + } + ); + } + + public virtual void MoveOutDialog() + { + endPosition = this.transform.position; + float moveDuration = (Vector3.Distance(startPosition,this.transform.position)/moveSpeed); + if (moveSpeed == 0) moveDuration = float.Epsilon; + LeanTween.value(this.gameObject,(Vector2)endPosition,(Vector2)startPosition,moveDuration).setEase(moveEaseType).setOnUpdate( + (Vector3 updatePosition)=>{ + this.transform.position = updatePosition; + } + ).setOnComplete( + ()=>{ + this.transform.position = endPosition; + } + ); + } + public virtual void SetCharacter(Character character, FungusScript fungusScript = null) { if (character == null) @@ -83,24 +163,48 @@ namespace Fungus } else { - + Character prevSpeakingCharacter = speakingCharacter; + speakingCharacter = character; + + // Dim portraits of non-speaking characters + foreach (PortraitStage ps in PortraitStage.activePortraitStages) + { + if (ps.dimPortraits) + { + foreach (Character c in ps.charactersOnStage) + { + if (prevSpeakingCharacter != speakingCharacter) + { + if (c != speakingCharacter) + { + Portrait.Dim(c,ps); + } + else + { + Portrait.Undim(c,ps); + } + } + } + } + } + string characterName = character.nameText; + if (characterName == "") { // Use game object name as default characterName = character.name; } - + if (fungusScript != null) { characterName = fungusScript.SubstituteVariables(characterName); } - + characterTypingSound = character.soundEffect; - + SetCharacterName(characterName, character.nameColor); } - } public virtual void SetCharacterImage(Sprite image) @@ -148,13 +252,17 @@ namespace Fungus DialogText dialogText = new DialogText(); dialogText.writingSpeed = writingSpeed; dialogText.punctuationPause = punctuationPause; - + dialogText.beepPerCharacter = beepPerCharacter; + dialogText.slowBeepsAt = slowBeepsAt; + dialogText.fastBeepsAt = fastBeepsAt; + GameObject typingAudio = null; if (characterTypingSound != null || writingSound != null) { typingAudio = new GameObject("WritingSound"); typingAudio.AddComponent(); - + typingAudio.hideFlags = HideFlags.HideInHierarchy; + if (characterTypingSound != null) { typingAudio.audio.clip = characterTypingSound; @@ -226,21 +334,24 @@ namespace Fungus dialogText.Clear(); StopVoiceOver(); break; - - case TokenType.WaitOnPunctuation: + + case TokenType.WaitOnPunctuationStart: float newPunctuationPause = 0f; if (!Single.TryParse(token.param, out newPunctuationPause)) { - newPunctuationPause = punctuationPause; + newPunctuationPause = 0f; } dialogText.punctuationPause = newPunctuationPause; break; - + case TokenType.WaitOnPunctuationEnd: + dialogText.punctuationPause = punctuationPause; + break; + case TokenType.Clear: dialogText.Clear(); break; - case TokenType.Speed: + case TokenType.SpeedStart: float newSpeed = 0; if (!Single.TryParse(token.param, out newSpeed)) { @@ -249,19 +360,99 @@ namespace Fungus dialogText.writingSpeed = newSpeed; break; - case TokenType.Exit: + case TokenType.SpeedEnd: + dialogText.writingSpeed = writingSpeed; + break; + case TokenType.Exit: if (onExitTag != null) { + prevStoryText = storyText.text; Destroy(typingAudio); onExitTag(); } - yield break; - + case TokenType.Message: FungusScript.BroadcastFungusMessage(token.param); break; + case TokenType.VerticalPunch: + float vPunchIntensity = 0; + if (!Single.TryParse(token.param, out vPunchIntensity)) + { + vPunchIntensity = 0f; + } + VerticalPunch(vPunchIntensity); + break; + case TokenType.HorizontalPunch: + float hPunchIntensity = 0; + if (!Single.TryParse(token.param, out hPunchIntensity)) + { + hPunchIntensity = 0f; + } + HorizontalPunch(hPunchIntensity); + break; + case TokenType.Shake: + float shakeIntensity = 0; + if (!Single.TryParse(token.param, out shakeIntensity)) + { + shakeIntensity = 0f; + } + Shake(shakeIntensity); + break; + case TokenType.Shiver: + float shiverIntensity = 0; + if (!Single.TryParse(token.param, out shiverIntensity)) + { + shiverIntensity = 0f; + } + Shiver(shiverIntensity); + break; + case TokenType.Flash: + float flashDuration = 0; + if (!Single.TryParse(token.param, out flashDuration)) + { + flashDuration = 0f; + } + Flash(flashDuration); + break; + case TokenType.Audio: + { + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.PlayOneShot(audioSource.clip); + } + } + break; + case TokenType.AudioLoop: + { + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.Play(); + audioSource.loop = true; + } + } + break; + case TokenType.AudioPause: + { + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.Pause (); + } + } + break; + case TokenType.AudioStop: + { + AudioSource audioSource = FindAudio(token.param); + if (audioSource != null) + { + audioSource.Pause (); + } + } + break; } // Update text writing @@ -276,6 +467,8 @@ namespace Fungus // Now process next token } + prevStoryText = storyText.text; + Destroy(typingAudio); if (onWritingComplete != null) @@ -285,7 +478,48 @@ namespace Fungus yield break; } - + + protected virtual AudioSource FindAudio(string audioObjectName) + { + GameObject go = GameObject.Find(audioObjectName); + if (go == null) + { + return null; + } + + return go.audio; + } + + protected virtual void VerticalPunch(float intensity) + { + iTween.ShakePosition(this.gameObject, new Vector3(0f, intensity, 0f), 0.5f); + } + + protected virtual void HorizontalPunch(float intensity) + { + iTween.ShakePosition(this.gameObject, new Vector3(intensity, 0f, 0f), 0.5f); + } + + protected virtual void Shake(float intensity) + { + iTween.ShakePosition(this.gameObject, new Vector3(intensity, intensity, 0f), 0.5f); + } + + protected virtual void Shiver(float intensity) + { + iTween.ShakePosition(this.gameObject, new Vector3(intensity, intensity, 0f), 1f); + } + + protected virtual void Flash(float duration) + { + CameraController cameraController = CameraController.GetInstance(); + cameraController.screenFadeTexture = CameraController.CreateColorTexture(new Color(1f,1f,1f,1f), 32, 32); + cameraController.Fade(1f, duration, delegate { + cameraController.screenFadeTexture = CameraController.CreateColorTexture(new Color(1f,1f,1f,1f), 32, 32); + cameraController.Fade(0f, duration, delegate {Destroy(cameraController);}); + }); + } + public virtual void Clear() { ClearStoryText(); @@ -316,11 +550,31 @@ namespace Fungus { yield return null; } - wasPointerClicked = false; if (onInput != null) { + // Stop all tweening portraits + foreach( Character c in Character.activeCharacters ) + { + if (c.state.portraitImage != null) + { + if (LeanTween.isTweening(c.state.portraitObj)) + { + LeanTween.cancel(c.state.portraitObj, true); + c.state.portraitImage.material.SetFloat( "_Fade", 1 ); + Portrait.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position); + if (c.state.dimmed == true) + { + c.state.portraitImage.material.SetColor("_Color", new Color(0.5f,0.5f,0.5f,1f)); + } + else + { + c.state.portraitImage.material.SetColor("_Color", new Color(1f,1f,1f,1f)); + } + } + } + } onInput(); } } diff --git a/Assets/Fungus/Dialog/Scripts/DialogParser.cs b/Assets/Fungus/Dialog/Scripts/DialogParser.cs index 3f77986b..e63b2715 100644 --- a/Assets/Fungus/Dialog/Scripts/DialogParser.cs +++ b/Assets/Fungus/Dialog/Scripts/DialogParser.cs @@ -17,11 +17,22 @@ namespace Fungus Wait, // w, w=0.5 WaitForInputNoClear, // wi WaitForInputAndClear, // wc - WaitOnPunctuation, // wp, wp=0.5 + WaitOnPunctuationStart, // wp, wp=0.5 + WaitOnPunctuationEnd, // /wp Clear, // c - Speed, // s, s=60 + SpeedStart, // s, s=60 + SpeedEnd, // /s Exit, // x - Message // m=MessageName + Message, // m=MessageName + VerticalPunch, // {vpunch=0.5} + HorizontalPunch, // {hpunch=0.5} + Shake, // {shake=0.5} + Shiver, // {shiver=0.5} + Flash, // {flash=0.5} + Audio, // {audio=Sound} + AudioLoop, // {audioloop=Sound} + AudioPause, // {audiopause=Sound} + AudioStop // {audiostop=Sound} } public class Token @@ -121,12 +132,16 @@ namespace Fungus } else if (tag.StartsWith("wp=")) { - type = TokenType.WaitOnPunctuation; + type = TokenType.WaitOnPunctuationStart; paramText = tag.Substring(3, tag.Length - 3); } else if (tag == "wp") { - type = TokenType.WaitOnPunctuation; + type = TokenType.WaitOnPunctuationStart; + } + else if (tag == "/wp") + { + type = TokenType.WaitOnPunctuationEnd; } else if (tag.StartsWith("w=")) { @@ -143,12 +158,16 @@ namespace Fungus } else if (tag.StartsWith("s=")) { - type = TokenType.Speed; + type = TokenType.SpeedStart; paramText = tag.Substring(2, tag.Length - 2); } else if (tag == "s") { - type = TokenType.Speed; + type = TokenType.SpeedStart; + } + else if (tag == "/s") + { + type = TokenType.SpeedEnd; } else if (tag == "x") { @@ -159,7 +178,41 @@ namespace Fungus type = TokenType.Message; paramText = tag.Substring(2, tag.Length - 2); } - + else if (tag.StartsWith("vpunch=")) + { + type = TokenType.VerticalPunch; + paramText = tag.Substring(7, tag.Length - 7); + } + else if (tag.StartsWith("hpunch=")) + { + type = TokenType.HorizontalPunch; + paramText = tag.Substring(7, tag.Length - 7); + } + else if (tag.StartsWith("shake=")) + { + type = TokenType.Shake; + paramText = tag.Substring(6, tag.Length - 6); + } + else if (tag.StartsWith("shiver=")) + { + type = TokenType.Shiver; + paramText = tag.Substring(7, tag.Length - 7); + } + else if (tag.StartsWith("flash=")) + { + type = TokenType.Flash; + paramText = tag.Substring(6, tag.Length - 6); + } + else if (tag.StartsWith("audio=")) + { + type = TokenType.Audio; + paramText = tag.Substring(6, tag.Length - 6); + } + else if (tag.StartsWith("audioloop=")) + { + type = TokenType.AudioLoop; + paramText = tag.Substring(10, tag.Length - 10); + } Token token = new Token(); token.type = type; token.param = paramText.Trim(); diff --git a/Assets/Fungus/Dialog/Scripts/DialogText.cs b/Assets/Fungus/Dialog/Scripts/DialogText.cs index 9dc1ccba..ba126cdb 100644 --- a/Assets/Fungus/Dialog/Scripts/DialogText.cs +++ b/Assets/Fungus/Dialog/Scripts/DialogText.cs @@ -18,7 +18,8 @@ namespace Fungus public class DialogText { protected List glyphs = new List(); - + protected bool oneBeep = false; + public bool boldActive { get; set; } public bool italicActive { get; set; } public bool colorActive { get; set; } @@ -26,7 +27,10 @@ namespace Fungus public float writingSpeed { get; set; } public float punctuationPause { get; set; } public AudioSource typingAudio { get; set; } - + public float slowBeepsAt { get; set; } + public float fastBeepsAt { get; set; } + public bool beepPerCharacter { get; set; } + public virtual void Clear() { glyphs.Clear(); @@ -34,10 +38,15 @@ namespace Fungus public virtual void Append(string words) { + if (beepPerCharacter && (writingSpeed <= slowBeepsAt || writingSpeed >= fastBeepsAt)) // beeps match character speed at these speeds + oneBeep = true; + else + oneBeep = false; if (typingAudio != null) { typingAudio.Stop(); - typingAudio.Play(); + if (!oneBeep) + typingAudio.Play(); } float hideTimer = 0f; @@ -59,7 +68,7 @@ namespace Fungus Glyph glyph = new Glyph(); glyph.hideTimer = hideTimer; - if (doPunctuationPause) + if (doPunctuationPause && writingSpeed != 0) { glyph.hasPunctuationPause = true; glyph.hideTimer += punctuationPause; @@ -72,13 +81,12 @@ namespace Fungus glyph.colorActive = colorActive; glyph.colorText = colorText; glyphs.Add(glyph); - - if (i < words.Length - 1 && - IsPunctuation(c)) // No punctuation pause on last character, or if next character is also punctuation + + if (IsPunctuation(c)) // If punctuation, do punctuation pause { doPunctuationPause = true; } - + // Special case: pause just before open parentheses if (i < words.Length - 2) { @@ -94,20 +102,20 @@ namespace Fungus { return character == '.' || character == '?' || - character == '!' || - character == ',' || - character == ':' || - character == ';' || - character == ')'; + character == '!' || + character == ',' || + character == ':' || + character == ';' || + character == ')'; } - + /** * Returns true when all glyphs are visible. */ public virtual bool UpdateGlyphs(bool instantComplete) { float elapsedTime = Time.deltaTime; - + foreach (Glyph glyph in glyphs) { if (instantComplete) @@ -130,6 +138,14 @@ namespace Fungus elapsedTime -= glyph.hideTimer; glyph.hideTimer = 0f; // Some elapsed time left over, so carry on to next glyph + if ((oneBeep && typingAudio != null)) + { + if(!typingAudio.isPlaying && + (glyph.character != " " && glyph.character != "\t" && glyph.character != "\n" ) ) + { + typingAudio.PlayOneShot(typingAudio.clip); + } + } } else { diff --git a/Assets/Fungus/Dialog/Scripts/MenuDialog.cs b/Assets/Fungus/Dialog/Scripts/MenuDialog.cs index 4354087d..4014a546 100644 --- a/Assets/Fungus/Dialog/Scripts/MenuDialog.cs +++ b/Assets/Fungus/Dialog/Scripts/MenuDialog.cs @@ -10,9 +10,40 @@ namespace Fungus public class MenuDialog : MonoBehaviour { + // Currently active Menu Dialog used to display Menu options + public static MenuDialog activeMenuDialog; + protected Button[] cachedButtons; protected Slider cachedSlider; + public static MenuDialog GetMenuDialog() + { + if (activeMenuDialog == null) + { + // Use first Menu Dialog found in the scene (if any) + MenuDialog md = GameObject.FindObjectOfType(); + if (md != null) + { + activeMenuDialog = md; + } + + if (activeMenuDialog == null) + { + // Auto spawn a menu dialog object from the prefab + GameObject go = Resources.Load("FungusMenuDialog"); + if (go != null) + { + GameObject spawnedGO = Instantiate(go) as GameObject; + spawnedGO.name = "DialogMenu"; + spawnedGO.SetActive(false); + activeMenuDialog = spawnedGO.GetComponent(); + } + } + } + + return activeMenuDialog; + } + public virtual void Awake() { Button[] optionButtons = GetComponentsInChildren