diff --git a/Assets/Bundles/[IAE] b/Assets/Bundles/[IAE] new file mode 100644 index 0000000..47f2be5 Binary files /dev/null and b/Assets/Bundles/[IAE] differ diff --git a/Assets/Bundles/[OI] b/Assets/Bundles/[OI] new file mode 100644 index 0000000..3243dcc Binary files /dev/null and b/Assets/Bundles/[OI] differ diff --git a/Assets/Bundles/[OLA] b/Assets/Bundles/[OLA] new file mode 100644 index 0000000..799e4eb Binary files /dev/null and b/Assets/Bundles/[OLA] differ diff --git a/Assets/Scripts/AnimationReference.cs b/Assets/Scripts/AnimationReference.cs new file mode 100644 index 0000000..d6be4ba --- /dev/null +++ b/Assets/Scripts/AnimationReference.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +public class AnimationReference +{ + public string name; + public string subtitle; + public AnimationState state; + public short type; + public bool playing; + + public AnimationReference(string name, string subtitle, AnimationState state, short type) + { + this.name = name; + this.subtitle = subtitle; + this.state = state; + this.type = type; + this.playing = false; + } +} \ No newline at end of file diff --git a/Assets/Scripts/AnimationReference.cs.meta b/Assets/Scripts/AnimationReference.cs.meta new file mode 100644 index 0000000..d8c813e --- /dev/null +++ b/Assets/Scripts/AnimationReference.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0a79f85598da5e245b6beae9133a8a26 +timeCreated: 1452687065 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/DefaultSignSpeed.cs b/Assets/Scripts/DefaultSignSpeed.cs new file mode 100644 index 0000000..a53b310 --- /dev/null +++ b/Assets/Scripts/DefaultSignSpeed.cs @@ -0,0 +1,63 @@ +/** + * Configura a velocidade de reprodução de sinais com relação a uma + * velocidade padrão e a velocidade ajustada pelo usuário. + */ +public class DefaultSignSpeed +{ + public static float DEFAULT = 1.1F; + public static float DEFAULT_MAX = 2F; + + // Velocidade padrão + private float speed; + // Velocidade máxima + private float max; + // Relação entre a velocidade do tipo representado e a velocidade padrão (speed) + private float unit; + + public DefaultSignSpeed() + { + this.speed = DEFAULT; + this.max = DEFAULT_MAX; + this.unit = 1F; + } + + public DefaultSignSpeed(float defaultSpeed, float defaultMaxSpeed) + { + this.speed = defaultSpeed; + this.max = defaultMaxSpeed; + this.unit = (this.max - this.speed) / (DEFAULT_MAX - DEFAULT); + } + + public float Speed { + get { return this.speed; } + set { + this.speed = value; + this.unit = calculateUnit(); + } + } + public float Max { + get { return this.max; } + set { + this.speed = value; + this.unit = calculateUnit(); + } + } + public float Unit { + get { return this.unit; } + } + + + private float calculateUnit() + { + return (this.max - this.speed) / (DEFAULT_MAX - DEFAULT); + } + + /* + * Retorna velocidade em relação ao estado do slider. + * @param slider - estado do slider (valor entre "speed - max" e "max") + */ + public float getProportional(float slider) + { + return this.speed + (slider - DEFAULT) * this.unit; + } +} \ No newline at end of file diff --git a/Assets/Scripts/DefaultSignSpeed.cs.meta b/Assets/Scripts/DefaultSignSpeed.cs.meta new file mode 100644 index 0000000..db21209 --- /dev/null +++ b/Assets/Scripts/DefaultSignSpeed.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 65beafb116ad9fe4fbf6eee8d0253b39 +timeCreated: 1452687065 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/GenericPlayerManager.cs b/Assets/Scripts/GenericPlayerManager.cs index b44c1e1..91fd02b 100644 --- a/Assets/Scripts/GenericPlayerManager.cs +++ b/Assets/Scripts/GenericPlayerManager.cs @@ -6,82 +6,16 @@ using System; using System.IO; using System.Text; using System.Runtime.InteropServices; +using System.Diagnostics; using UnityEngine.UI; public abstract class GenericPlayerManager : MonoBehaviour { - private class AnimationReference - { - public string name; - public string subtitle; - public AnimationState state; - public short type; - public bool playing; - - public AnimationReference(string name, string subtitle, AnimationState state, short type) - { - this.name = name; - this.subtitle = subtitle; - this.state = state; - this.type = type; - this.playing = false; - } - } - - protected class DefaultSignSpeed - { - public static float DEFAULT = 1.1F; - public static float DEFAULT_MAX = 2F; - - public float speed; - public float max; - // Relação entre a velocidade do tipo representado e a velocidade DEFAULT. - public float unit; - - public DefaultSignSpeed() - { - this.speed = DEFAULT; - this.max = DEFAULT_MAX; - this.unit = 1F; - } - - public DefaultSignSpeed(float defaultSpeed, float defaultMaxSpeed) - { - this.speed = defaultSpeed; - this.max = defaultMaxSpeed; - this.unit = (this.max - this.speed) / (DEFAULT_MAX - DEFAULT); - } - - /* - * Retorna velocidade em relação ao estado do slider. - * @param slider - estado do slider (valor entre DefaultSignSpeed.DEFAULT e DefaultSignSpeed.DEFAULT_MAX) - */ - public float getProporcionalSpeed(float slider) - { - return this.speed + (slider - DEFAULT) * this.unit; - } - } - private const string DEFAULT_ANIMATION = "_default"; private const string NONE_ANIMATION = "_defaultWORD"; protected float fadeLength = 0.6F; - protected DefaultSignSpeed defaultWordSpeed = new DefaultSignSpeed(); - protected DefaultSignSpeed defaultFirstLetterSpeed = new DefaultSignSpeed(2.1F, 2.8F); - protected DefaultSignSpeed defaultLetterSpeed = new DefaultSignSpeed(3F, 4.3F); - protected DefaultSignSpeed defaultNumberSpeed = new DefaultSignSpeed(1.5F, 2.9F); - - private const short TYPE_NONE = -1; - private const short TYPE_WORD = 0; - private const short TYPE_LETTER = 1; - private const short TYPE_NUMBER = 2; - - private float hSlidersecond = DefaultSignSpeed.DEFAULT; - private float wordSpeed = DefaultSignSpeed.DEFAULT; - private float letterSpeed = DefaultSignSpeed.DEFAULT; - private float numberSpeed = DefaultSignSpeed.DEFAULT; - protected string glosa = ""; private static String[] stringPos = { DEFAULT_ANIMATION };//vetor que sera usado para quebrar a glosa @@ -89,7 +23,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { private Animation COMPONENT_ANIMATION; private BoxCollider AVATAR_COLLIDER; public Text SUBTITLES; - + // Guarda os nomes das palavras ja carregadas. private HashSet loadedAssetBundles = new HashSet(); // Guarda os nomes das palavras que nao tem assetbundle. @@ -104,15 +38,26 @@ public abstract class GenericPlayerManager : MonoBehaviour { private volatile bool playing = false; private volatile bool paused = false; + private Stopwatch watch = new Stopwatch(); + private string lastRandom = ""; + private int repeated = 0; + + private Subtitle subtitle; + public virtual void Start() { - wordSpeed = defaultWordSpeed.speed; - letterSpeed = defaultLetterSpeed.speed; - numberSpeed = defaultNumberSpeed.speed; + subtitle = new Subtitle(SUBTITLES); + subtitle.DefaultWordSpeed = new DefaultSignSpeed(); + subtitle.DefaultFirstLetterSpeed = new DefaultSignSpeed(2.1F, 2.8F); + subtitle.DefaultLetterSpeed = new DefaultSignSpeed(3F, 4.3F); + subtitle.DefaultNumberSpeed = new DefaultSignSpeed(1.5F, 2.9F); AVATAR = GameObject.FindGameObjectWithTag("avatar");//referencia para o avatar COMPONENT_ANIMATION = AVATAR.GetComponent();//referencia para o componente animador do avatar AVATAR_COLLIDER = GameObject.FindGameObjectWithTag("avatar").GetComponent(); + + watch.Start(); + Invoke("playRandomAnimation", 5); } public bool isLoadingSingleAnimation() { return loadingSingleAnimation; } @@ -120,6 +65,46 @@ public abstract class GenericPlayerManager : MonoBehaviour { public bool isPlaying() { return playing; } public bool isPaused() { return paused; } + + private void stopWatch() { + watch.Stop(); + watch.Reset(); + } + + private void continueWatch() { + watch.Start(); + } + + private void playRandomAnimation(string glosa) + { + stopWatch(); + + this.glosa = glosa; + this.play(); + } + + private void playRandomAnimation() + { + if (watch.Elapsed.Seconds >= 1) + { + int rand = new System.Random().Next(3); + + switch (rand) + { + case 0: playRandomAnimation("[OLA]"); + break; + + case 1: playRandomAnimation("[OI]"); + break; + + case 2: playRandomAnimation("[IAE]"); + break; + } + } + + Invoke("playRandomAnimation", 1); + } + public void SetAvatarCollider(bool isActive) { AVATAR_COLLIDER.enabled = isActive; @@ -131,17 +116,16 @@ public abstract class GenericPlayerManager : MonoBehaviour { } // Define a velocidade das animacões com base no slider da GUI - public void setSlider(float x) + public void setSlider(float sliderPosition) { - hSlidersecond = x; - - wordSpeed = defaultWordSpeed.getProporcionalSpeed(x); - letterSpeed = defaultLetterSpeed.getProporcionalSpeed(x); - numberSpeed = defaultNumberSpeed.getProporcionalSpeed(x); + subtitle.SliderPosition = sliderPosition; + subtitle.updateWordSpeed(); + subtitle.updateLetterSpeed(); + subtitle.updateNumberSpeed(); if ( ! paused) foreach (AnimationReference reference in animQueue) - if (reference.type != TYPE_NONE && reference.state != null) + if (reference.type != Subtitle.TYPE_NONE && reference.state != null) reference.state.speed = getSpeedByType(reference.type); } @@ -149,9 +133,9 @@ public abstract class GenericPlayerManager : MonoBehaviour { { switch (type) { - case TYPE_WORD: return wordSpeed; - case TYPE_LETTER: return letterSpeed; - case TYPE_NUMBER: return numberSpeed; + case Subtitle.TYPE_WORD: return subtitle.WordSpeed; + case Subtitle.TYPE_LETTER: return subtitle.LetterSpeed; + case Subtitle.TYPE_NUMBER: return subtitle.NumberSpeed; } return 2F; @@ -174,13 +158,13 @@ public abstract class GenericPlayerManager : MonoBehaviour { { try { StopCoroutine("handleStates"); - } catch (NullReferenceException nre) { Debug.Log("StopCoroutine handlestates nullreff::"+nre.ToString()); } + } catch (NullReferenceException nre) { UnityEngine.Debug.Log("StopCoroutine handlestates nullreff::"+nre.ToString()); } setSubtitle(""); try { animQueue.Clear(); - } catch (NullReferenceException nre) { Debug.Log("SetQueueList null reff::"+nre.ToString()); } + } catch (NullReferenceException nre) { UnityEngine.Debug.Log("SetQueueList null reff::"+nre.ToString()); } COMPONENT_ANIMATION.Stop(); COMPONENT_ANIMATION.CrossFade(DEFAULT_ANIMATION, fadeLength, PlayMode.StopAll); @@ -188,10 +172,6 @@ public abstract class GenericPlayerManager : MonoBehaviour { /* * Manda reproduzir animação e adiciona a file de animações a serem reproduzidas. - * - * Caso não haja SUBTITLE, name será utilizado como SUBTITLE. - * Caso não haja fadeLength, será atribuido fadeLength. - * Caso não haja velocidade, hSlidersecond será atribuída. */ private AnimationState playAnimation(short type, string name, string subtitle, float speed) { @@ -205,7 +185,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { } catch (NullReferenceException nre) { - Debug.Log("'" + name + "' não foi encontrado!\n" + nre.ToString()); + UnityEngine.Debug.Log("'" + name + "' não foi encontrado!\n" + nre.ToString()); } return null; @@ -285,40 +265,6 @@ public abstract class GenericPlayerManager : MonoBehaviour { return true; } - - /* - * Destaca caractere de uma string. - */ - private string highlight(string word, int index) - { - string subtitle = ""; - int last = 0; - - if (index == 0) - subtitle += "" + word[0] + ""; - else - subtitle += word[0]; - - for (int i = 1; i < word.Length; i++) - { - if ((word[i] >= 65 && word[i] <= 90) || (word[i] >= 48 && word[i] <= 57)) - subtitle += "-"; - - if (i == index || (last == index && word[i] == word[last])) - { - subtitle += "" + word[i] + ""; - if (i == index) last = i; - } - else - { - subtitle += word[i]; - last = i; - } - } - - return subtitle; - } - /** * Spells word. * @@ -330,24 +276,24 @@ public abstract class GenericPlayerManager : MonoBehaviour { bool defaultPlayed = false; // A reprodução da primeira letra deve ser longa para não ser cortada no fade - letterSpeed = defaultLetterSpeed.getProporcionalSpeed(hSlidersecond); + subtitle.updateLetterSpeed(); for (int i = 0; i < word.Length; i++) { char second = word[i]; - lastAnimationSubtitle = highlight(word, i); + lastAnimationSubtitle = Subtitle.highlight(word, i); // Se for uma letra if (second >= 65 && second <= 90) - playAnimation(TYPE_LETTER, second.ToString(), lastAnimationSubtitle, letterSpeed); + playAnimation(Subtitle.TYPE_LETTER, second.ToString(), lastAnimationSubtitle, subtitle.LetterSpeed); // Se for um número else if (second >= 48 && second <= 57) - playAnimation(TYPE_NUMBER, second.ToString(), lastAnimationSubtitle, numberSpeed); + playAnimation(Subtitle.TYPE_NUMBER, second.ToString(), lastAnimationSubtitle, subtitle.NumberSpeed); // Se for uma vírgula else if (second == 44) - playAnimation(TYPE_WORD, second.ToString(), lastAnimationSubtitle); + playAnimation(Subtitle.TYPE_WORD, second.ToString(), lastAnimationSubtitle); // Não há animação else @@ -356,18 +302,18 @@ public abstract class GenericPlayerManager : MonoBehaviour { if ( ! defaultPlayed) { defaultPlayed = true; - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle); + playAnimation(Subtitle.TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle); // A reprodução da próxima letra deve ser longa para não ser cortada no fade - letterSpeed = defaultLetterSpeed.getProporcionalSpeed(hSlidersecond); + subtitle.updateLetterSpeed(); } - Debug.Log("Animação \"" + second + "\" inexistente."); + UnityEngine.Debug.Log("Animação \"" + second + "\" inexistente."); continue; } defaultPlayed = false; - letterSpeed = defaultLetterSpeed.getProporcionalSpeed(hSlidersecond); + subtitle.updateLetterSpeed(); } return lastAnimationSubtitle; @@ -403,7 +349,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { loadedAssetBundles.Add(name); yield break; } - else Debug.Log ("Sinal \"" + name + "\" não carregado corretamente."); + else UnityEngine.Debug.Log ("Sinal \"" + name + "\" não carregado corretamente."); } } @@ -414,6 +360,16 @@ public abstract class GenericPlayerManager : MonoBehaviour { } + private bool isFlag(string animationName) + { + return animationName.Equals("[PONTO]") + || animationName.Equals("[INTERROGACAO]") + || animationName.Equals("[EXCLAMACAO]") + || animationName.Equals("[OLA]") + || animationName.Equals("[OI]") + || animationName.Equals("[IAE]"); + } + private IEnumerator loadAndPlay() { loading = true; @@ -423,7 +379,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { bool spelled = false; // Default - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, "", 2F); + playAnimation(Subtitle.TYPE_NONE, DEFAULT_ANIMATION, "", 2F); if ( ! playing) { @@ -438,7 +394,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { try { if (String.IsNullOrEmpty(aniName)) continue; } catch (Exception e) { - Debug.Log(e + " :: NotNullNotEmpty"); + UnityEngine.Debug.Log(e + " :: NotNullNotEmpty"); } bool nonexistent = nonexistentAssetBundles.Contains(aniName); @@ -470,7 +426,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { loadedAssetBundles.Add(aniName); loaded = true; } - else Debug.Log ("Sinal \"" + aniName + "\" não carregado corretamente."); + else UnityEngine.Debug.Log ("Sinal \"" + aniName + "\" não carregado corretamente."); } } } @@ -481,41 +437,31 @@ public abstract class GenericPlayerManager : MonoBehaviour { if (spelled) { // Default - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle); + playAnimation(Subtitle.TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle); spelled = false; } - bool isPunctuation = false; + //bool isFlag = false; - if (aniName[0] == '[') - { - if (aniName.Equals("[PONTO]")) + //if (aniName[0] == '[') + //{ + if (isFlag(aniName)) { - isPunctuation = true; - lastAnimationSubtitle = "."; - } - - else if (aniName.Equals("[INTERROGACAO]")) - { - isPunctuation = true; - lastAnimationSubtitle = "?"; - } - - else if (aniName.Equals("[EXCLAMACAO]")) - { - isPunctuation = true; - lastAnimationSubtitle = "!"; + //isFlag = true; + lastAnimationSubtitle = ""; + playAnimation(Subtitle.TYPE_WORD, aniName, ""); } else { lastAnimationSubtitle = aniName; + playAnimation(Subtitle.TYPE_WORD, aniName); } - } + //} - if (isPunctuation) - playAnimation(TYPE_WORD, aniName, lastAnimationSubtitle); + /*if (isFlag) + playAnimation(Subtitle.TYPE_WORD, aniName, ""); else - playAnimation(TYPE_WORD, aniName); + playAnimation(Subtitle.TYPE_WORD, aniName);*/ } // Soletra palavra else @@ -525,17 +471,17 @@ public abstract class GenericPlayerManager : MonoBehaviour { if ( ! nonexistent) nonexistentAssetBundles.Add(aniName); - Debug.Log("~~ To spell: " + aniName); + UnityEngine.Debug.Log("~~ To spell: " + aniName); - if (aniName.Equals("[PONTO]") || aniName.Equals("[INTERROGACAO]") || aniName.Equals("[EXCLAMACAO]")) + if (isFlag(aniName)) { - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, "", 1.6F); + playAnimation(Subtitle.TYPE_NONE, DEFAULT_ANIMATION, "", 1.6F); continue; } // Se já houve o soletramento de alguma palavra, reproduz animação default if (spelled) - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle, 1.6F); + playAnimation(Subtitle.TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle, 1.6F); else spelled = true; @@ -544,7 +490,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { } // Default - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle); + playAnimation(Subtitle.TYPE_NONE, DEFAULT_ANIMATION, ""); loading = false; onPlayingStateChange(); @@ -557,6 +503,8 @@ public abstract class GenericPlayerManager : MonoBehaviour { */ IEnumerator handleStates() { + stopWatch(); + // Enquanto estiver executando a rotina "loadAndPlay" // ou existir animações na fila de reprodução while (loading || animQueue.Count > 0) @@ -586,6 +534,8 @@ public abstract class GenericPlayerManager : MonoBehaviour { playing = false; paused = false; onPlayingStateChange(); + + continueWatch(); } } diff --git a/Assets/Scripts/Subtitle.cs b/Assets/Scripts/Subtitle.cs new file mode 100644 index 0000000..0ef851e --- /dev/null +++ b/Assets/Scripts/Subtitle.cs @@ -0,0 +1,134 @@ +using UnityEngine.UI; + +public class Subtitle { + + public const short TYPE_NONE = -1; + public const short TYPE_WORD = 0; + public const short TYPE_LETTER = 1; + public const short TYPE_NUMBER = 2; + + protected DefaultSignSpeed defaultWordSpeed = new DefaultSignSpeed(); + protected DefaultSignSpeed defaultFirstLetterSpeed = new DefaultSignSpeed(); + protected DefaultSignSpeed defaultLetterSpeed = new DefaultSignSpeed(); + protected DefaultSignSpeed defaultNumberSpeed = new DefaultSignSpeed(); + + private float sliderPosition = DefaultSignSpeed.DEFAULT; + + private float wordSpeed = DefaultSignSpeed.DEFAULT; + private float letterSpeed = DefaultSignSpeed.DEFAULT; + private float numberSpeed = DefaultSignSpeed.DEFAULT; + + public Text SUBTITLES; + + + public Subtitle(Text subtitles) + { + this.SUBTITLES = subtitles; + } + + public DefaultSignSpeed DefaultWordSpeed { + get { return this.defaultWordSpeed; } + set { + this.defaultWordSpeed = value; + this.wordSpeed = value.Speed; + } + } + + public DefaultSignSpeed DefaultFirstLetterSpeed { + get { return this.defaultFirstLetterSpeed; } + set { this.defaultFirstLetterSpeed = value; } + } + + public DefaultSignSpeed DefaultLetterSpeed { + get { return this.defaultLetterSpeed; } + set { + this.defaultLetterSpeed = value; + this.letterSpeed = value.Speed; + } + } + + public DefaultSignSpeed DefaultNumberSpeed { + get { return this.defaultNumberSpeed; } + set { + this.defaultNumberSpeed = value; + this.numberSpeed = value.Speed; + } + } + + public float WordSpeed { + get { return this.wordSpeed; } + set { this.wordSpeed = value; } + } + + public float LetterSpeed { + get { return this.letterSpeed; } + set { this.letterSpeed = value; } + } + + public float NumberSpeed { + get { return this.numberSpeed; } + set { this.numberSpeed = value; } + } + + public float SliderPosition { + get { return this.sliderPosition; } + set { this.sliderPosition = value; } + } + + + public void updateWordSpeed(float sliderPosition) { + this.WordSpeed = this.DefaultWordSpeed.getProportional(sliderPosition); + } + public void updateWordSpeed() { + this.WordSpeed = this.DefaultWordSpeed.getProportional(this.SliderPosition); + } + + public void updateLetterSpeed(float sliderPosition) { + this.LetterSpeed = this.DefaultLetterSpeed.getProportional(sliderPosition); + } + public void updateLetterSpeed() { + this.LetterSpeed = this.DefaultLetterSpeed.getProportional(this.SliderPosition); + } + + public void updateNumberSpeed(float sliderPosition) { + this.NumberSpeed = this.DefaultNumberSpeed.getProportional(sliderPosition); + } + public void updateNumberSpeed() { + this.NumberSpeed = this.DefaultNumberSpeed.getProportional(this.SliderPosition); + } + + + /* + * Destaca caractere de uma string. + */ + public static string highlight(string word, int index) + { + string subtitle = ""; + int last = 0; + + if (index == 0) + subtitle += "" + word[0] + ""; + else + subtitle += word[0]; + + for (int i = 1; i < word.Length; i++) + { + if ((word[i] >= 65 && word[i] <= 90) || (word[i] >= 48 && word[i] <= 57)) + subtitle += "-"; + + if (i == index || (last == index && word[i] == word[last])) + { + subtitle += "" + word[i] + ""; + if (i == index) last = i; + } + else + { + subtitle += word[i]; + last = i; + } + } + + return subtitle; + } + +} \ No newline at end of file diff --git a/Assets/Scripts/Subtitle.cs.meta b/Assets/Scripts/Subtitle.cs.meta new file mode 100644 index 0000000..d6777c1 --- /dev/null +++ b/Assets/Scripts/Subtitle.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f97b63181c1ec5f488126f3f9fd68141 +timeCreated: 1452687065 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- libgit2 0.21.2