Loading README.md +1 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ This package will be updated once I find another useful tool or someone suggest - Basic menu with **music and SFX sliders** as well as **resolution and quality dropdowns.** - An **object pooler** with the ability to create pools with an undetermined size. - A basic **scene manager** with a loading screen with progress bar. - A simple **timer** that is displayed inside a TextMeshPro object. All of that comes with some editor menu items for creating all of that as fast as possible. Loading Loading @@ -102,7 +101,6 @@ Text commands: <p:[tiny,short,normal,long,read]> --> Pauses during a period of time <anim:[wobble,wave,rainbow,shake]></anim> --> Reproduces an animation <sp:number></sp> --> Changes reveal speed <snd:soundname> --> Plays a sound from the Audio Manager ``` ### SceneManager Loading Tools/DialogueSystem/DialogueUtility.cs +19 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ namespace SimpleTools.DialogueSystem { const string REMAINDER_REGEX = "(.*?((?=>)|(/|$)))"; const string PAUSE_REGEX_STRING = "<p:(?<pause>" + REMAINDER_REGEX + ")>"; static readonly Regex pauseRegex = new Regex(PAUSE_REGEX_STRING); const string SOUND_REGEX_STRING = "<snd:(?<sound>" + REMAINDER_REGEX + ")>"; static readonly Regex soundRegex = new Regex(SOUND_REGEX_STRING); const string SPEED_REGEX_STRING = "<sp:(?<speed>" + REMAINDER_REGEX + ")>"; static readonly Regex speedRegex = new Regex(SPEED_REGEX_STRING); const string ANIM_START_REGEX_STRING = "<anim:(?<anim>" + REMAINDER_REGEX + ")>"; Loading @@ -31,6 +33,7 @@ namespace SimpleTools.DialogueSystem { processedMessage = message; processedMessage = HandlePauseTags(processedMessage, result); processedMessage = HandleSoundTags(processedMessage, result); processedMessage = HandleSpeedTags(processedMessage, result); processedMessage = HandleAnimStartTags(processedMessage, result); processedMessage = HandleAnimEndTags(processedMessage, result); Loading Loading @@ -96,6 +99,20 @@ namespace SimpleTools.DialogueSystem { processedMessage = Regex.Replace(processedMessage, PAUSE_REGEX_STRING, ""); return processedMessage; } static string HandleSoundTags(string processedMessage, List<DialogueCommand> result) { MatchCollection soundMatches = soundRegex.Matches(processedMessage); foreach (Match match in soundMatches) { string val = match.Groups["sound"].Value; string soundName = val; result.Add(new DialogueCommand { position = VisibleCharactersUpToIndex(processedMessage, match.Index), type = DialogueCommandType.Sound, stringValue = soundName }); } processedMessage = Regex.Replace(processedMessage, SOUND_REGEX_STRING, ""); return processedMessage; } static TextAnimationType GetTextAnimationType(string stringVal) { TextAnimationType result; Loading Loading @@ -139,7 +156,8 @@ namespace SimpleTools.DialogueSystem { Pause, TextSpeedChange, AnimStart, AnimEnd AnimEnd, Sound } public enum TextAnimationType { Loading Tools/DialogueSystem/DialogueVertexAnimator.cs +3 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,9 @@ namespace SimpleTools.DialogueSystem { case DialogueCommandType.TextSpeedChange: secondsPerCharacter = 1f / command.floatValue; break; case DialogueCommandType.Sound: AudioManager.AudioManager.instance.PlayOneShot(command.stringValue); break; } commands.RemoveAt(i); i--; Loading package.json +1 −1 Original line number Diff line number Diff line { "name": "com.geri.simpletools", "version": "1.2.1", "version": "1.2.2", "displayName": "Simple Tools", "description": "This package contains simple tools to use in your project.", "unity": "2018.4", Loading Loading
README.md +1 −3 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ This package will be updated once I find another useful tool or someone suggest - Basic menu with **music and SFX sliders** as well as **resolution and quality dropdowns.** - An **object pooler** with the ability to create pools with an undetermined size. - A basic **scene manager** with a loading screen with progress bar. - A simple **timer** that is displayed inside a TextMeshPro object. All of that comes with some editor menu items for creating all of that as fast as possible. Loading Loading @@ -102,7 +101,6 @@ Text commands: <p:[tiny,short,normal,long,read]> --> Pauses during a period of time <anim:[wobble,wave,rainbow,shake]></anim> --> Reproduces an animation <sp:number></sp> --> Changes reveal speed <snd:soundname> --> Plays a sound from the Audio Manager ``` ### SceneManager Loading
Tools/DialogueSystem/DialogueUtility.cs +19 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ namespace SimpleTools.DialogueSystem { const string REMAINDER_REGEX = "(.*?((?=>)|(/|$)))"; const string PAUSE_REGEX_STRING = "<p:(?<pause>" + REMAINDER_REGEX + ")>"; static readonly Regex pauseRegex = new Regex(PAUSE_REGEX_STRING); const string SOUND_REGEX_STRING = "<snd:(?<sound>" + REMAINDER_REGEX + ")>"; static readonly Regex soundRegex = new Regex(SOUND_REGEX_STRING); const string SPEED_REGEX_STRING = "<sp:(?<speed>" + REMAINDER_REGEX + ")>"; static readonly Regex speedRegex = new Regex(SPEED_REGEX_STRING); const string ANIM_START_REGEX_STRING = "<anim:(?<anim>" + REMAINDER_REGEX + ")>"; Loading @@ -31,6 +33,7 @@ namespace SimpleTools.DialogueSystem { processedMessage = message; processedMessage = HandlePauseTags(processedMessage, result); processedMessage = HandleSoundTags(processedMessage, result); processedMessage = HandleSpeedTags(processedMessage, result); processedMessage = HandleAnimStartTags(processedMessage, result); processedMessage = HandleAnimEndTags(processedMessage, result); Loading Loading @@ -96,6 +99,20 @@ namespace SimpleTools.DialogueSystem { processedMessage = Regex.Replace(processedMessage, PAUSE_REGEX_STRING, ""); return processedMessage; } static string HandleSoundTags(string processedMessage, List<DialogueCommand> result) { MatchCollection soundMatches = soundRegex.Matches(processedMessage); foreach (Match match in soundMatches) { string val = match.Groups["sound"].Value; string soundName = val; result.Add(new DialogueCommand { position = VisibleCharactersUpToIndex(processedMessage, match.Index), type = DialogueCommandType.Sound, stringValue = soundName }); } processedMessage = Regex.Replace(processedMessage, SOUND_REGEX_STRING, ""); return processedMessage; } static TextAnimationType GetTextAnimationType(string stringVal) { TextAnimationType result; Loading Loading @@ -139,7 +156,8 @@ namespace SimpleTools.DialogueSystem { Pause, TextSpeedChange, AnimStart, AnimEnd AnimEnd, Sound } public enum TextAnimationType { Loading
Tools/DialogueSystem/DialogueVertexAnimator.cs +3 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,9 @@ namespace SimpleTools.DialogueSystem { case DialogueCommandType.TextSpeedChange: secondsPerCharacter = 1f / command.floatValue; break; case DialogueCommandType.Sound: AudioManager.AudioManager.instance.PlayOneShot(command.stringValue); break; } commands.RemoveAt(i); i--; Loading
package.json +1 −1 Original line number Diff line number Diff line { "name": "com.geri.simpletools", "version": "1.2.1", "version": "1.2.2", "displayName": "Simple Tools", "description": "This package contains simple tools to use in your project.", "unity": "2018.4", Loading