diff --git a/AssetBundles/newClip b/AssetBundles/newClip new file mode 100644 index 0000000..82308c7 Binary files /dev/null and b/AssetBundles/newClip differ diff --git a/Assets/Avatar/Avatar.blend.meta b/Assets/Avatar/Avatar.blend.meta index 6235683..072ba19 100644 --- a/Assets/Avatar/Avatar.blend.meta +++ b/Assets/Avatar/Avatar.blend.meta @@ -208,7 +208,7 @@ ModelImporter: animationImportWarnings: animationRetargetingWarnings: animationDoRetargetingWarnings: 0 - animationCompression: 1 + animationCompression: 2 animationRotationError: .5 animationPositionError: .5 animationScaleError: .5 diff --git a/Assets/Bundles/[BOCEJAR] b/Assets/Bundles/[BOCEJAR] new file mode 100644 index 0000000..aea8939 Binary files /dev/null and b/Assets/Bundles/[BOCEJAR] differ diff --git a/Assets/Bundles/[BOCEJAR_01] b/Assets/Bundles/[BOCEJAR_01] new file mode 100644 index 0000000..2217a06 Binary files /dev/null and b/Assets/Bundles/[BOCEJAR_01] differ diff --git a/Assets/Bundles/[COCHILAR] b/Assets/Bundles/[COCHILAR] new file mode 100644 index 0000000..2c74702 Binary files /dev/null and b/Assets/Bundles/[COCHILAR] differ diff --git a/Assets/Bundles/[COCHILAR_01] b/Assets/Bundles/[COCHILAR_01] new file mode 100644 index 0000000..ad7d28b Binary files /dev/null and b/Assets/Bundles/[COCHILAR_01] differ diff --git a/Assets/Bundles/[IAE] b/Assets/Bundles/[IAE] deleted file mode 100644 index 47f2be5..0000000 Binary files a/Assets/Bundles/[IAE] and /dev/null differ diff --git a/Assets/Bundles/[OI] b/Assets/Bundles/[OI] deleted file mode 100644 index 3243dcc..0000000 Binary files a/Assets/Bundles/[OI] and /dev/null differ diff --git a/Assets/Bundles/[PISCADA] b/Assets/Bundles/[PISCADA] new file mode 100644 index 0000000..e72ff4f Binary files /dev/null and b/Assets/Bundles/[PISCADA] differ diff --git a/Assets/Bundles/[PISCADA_01] b/Assets/Bundles/[PISCADA_01] new file mode 100644 index 0000000..356d2de Binary files /dev/null and b/Assets/Bundles/[PISCADA_01] differ diff --git a/Assets/Bundles/[PISCADA_02] b/Assets/Bundles/[PISCADA_02] new file mode 100644 index 0000000..81c2612 Binary files /dev/null and b/Assets/Bundles/[PISCADA_02] differ diff --git a/Assets/Bundles/[PISCADA_03] b/Assets/Bundles/[PISCADA_03] new file mode 100644 index 0000000..224f520 Binary files /dev/null and b/Assets/Bundles/[PISCADA_03] differ diff --git a/Assets/Bundles/[RELAXAR] b/Assets/Bundles/[RELAXAR] new file mode 100644 index 0000000..6b2217d Binary files /dev/null and b/Assets/Bundles/[RELAXAR] differ diff --git a/Assets/Bundles/[RELAXAR_01] b/Assets/Bundles/[RELAXAR_01] new file mode 100644 index 0000000..3124b54 Binary files /dev/null and b/Assets/Bundles/[RELAXAR_01] differ diff --git a/Assets/Bundles/_[ESPREGUIÇADA] b/Assets/Bundles/_[ESPREGUIÇADA] deleted file mode 100644 index f31972e..0000000 Binary files a/Assets/Bundles/_[ESPREGUIÇADA] and /dev/null differ diff --git a/Assets/Materials.meta b/Assets/Materials.meta new file mode 100644 index 0000000..ae3a44b --- /dev/null +++ b/Assets/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 00f7fa573e5e1ce41876de36e0d1f4bf +folderAsset: yes +timeCreated: 1453731137 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Scene.unity b/Assets/Scenes/Scene.unity index 1b9acd5..2102ab6 100644 --- a/Assets/Scenes/Scene.unity +++ b/Assets/Scenes/Scene.unity @@ -347,6 +347,10 @@ Prefab: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 11171278, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_Animations.Array.size + value: 40 + objectReference: {fileID: 0} - target: {fileID: 491010, guid: 00197fc9877daa14c963e5917de36124, type: 2} propertyPath: m_LocalPosition.x value: 0 @@ -425,8 +429,40 @@ Prefab: objectReference: {fileID: 2100000, guid: 3e98fe09c9ac4ae4dbe731872ff7687a, type: 2} - target: {fileID: 11474732, guid: 00197fc9877daa14c963e5917de36124, type: 2} propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 13781646, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_BlendShapeWeights.Array.data[3] + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13781646, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_BlendShapeWeights.Array.data[14] value: 0 objectReference: {fileID: 0} + - target: {fileID: 13781646, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_BlendShapeWeights.Array.data[20] + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13781646, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_BlendShapeWeights.Array.data[18] + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13781646, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_BlendShapeWeights.Array.data[10] + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13781646, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_BlendShapeWeights.Array.data[4] + value: .0299999993 + objectReference: {fileID: 0} + - target: {fileID: 11171278, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_Animations.Array.data[40] + value: + objectReference: {fileID: 7400000, guid: bddeeddad8262394d836a5c042116341, type: 2} + - target: {fileID: 11171278, guid: 00197fc9877daa14c963e5917de36124, type: 2} + propertyPath: m_Animations.Array.data[41] + value: + objectReference: {fileID: 7400000, guid: d2d1cc8dbfcf80541b7a0d8614d76337, type: 2} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 00197fc9877daa14c963e5917de36124, type: 2} m_IsPrefabParent: 0 @@ -1398,23 +1434,23 @@ Prefab: objectReference: {fileID: 138791195} - target: {fileID: 22412692, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} propertyPath: m_AnchorMax.x - value: 0 + value: .444444448 objectReference: {fileID: 0} - target: {fileID: 22412692, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 22452678, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} propertyPath: m_AnchorMin.x - value: 0 + value: .444444448 objectReference: {fileID: 0} - target: {fileID: 22452678, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} propertyPath: m_AnchorMax.x - value: 0 + value: .444444448 objectReference: {fileID: 0} - target: {fileID: 22452678, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 131276, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} propertyPath: m_IsActive diff --git a/Assets/Scripts/Player Manager/GenericPlayerManager.cs b/Assets/Scripts/Player Manager/GenericPlayerManager.cs index 67d2eb1..0753908 100644 --- a/Assets/Scripts/Player Manager/GenericPlayerManager.cs +++ b/Assets/Scripts/Player Manager/GenericPlayerManager.cs @@ -59,6 +59,18 @@ public abstract class GenericPlayerManager : MonoBehaviour { "[INTERROGACAO]", "[EXCLAMACAO]" }); + + string[] toDuplicate = new string[] { + "A", "B", "C", "D", "E", "F", "G", "H", "I", + "J", "K", "L", "M", "N", "O", "P", "Q", "R", + "S", "T", "U", "V", "W", "X", "Y", "Z", + "0", "1", "2", "3", "4", + "5", "6", "7", "8", "9", + "," + }; + + foreach (string anim in toDuplicate) + COMPONENT_ANIMATION.AddClip(COMPONENT_ANIMATION[anim].clip, "d_" + anim); } public bool isLoadingSingleAnimation() { return loadingSingleAnimation; } @@ -259,23 +271,29 @@ public abstract class GenericPlayerManager : MonoBehaviour { // A reprodução da primeira letra deve ser longa para não ser cortada no fade subtitle.updateLetterSpeed(); + string lastAnim = ""; + for (int i = 0; i < word.Length; i++) { - char second = word[i]; lastAnimationSubtitle = Subtitle.highlight(word, i); + string anim = word[i].ToString(); + lastAnim = anim.Equals(lastAnim) ? "d_" + anim : anim; + + short type; + // Se for uma letra - if (second >= 65 && second <= 90) - playAnimation(Subtitle.TYPE_LETTER, second.ToString(), lastAnimationSubtitle, subtitle.LetterSpeed); + if (word[i] >= 65 && word[i] <= 90) + type = Subtitle.TYPE_LETTER; // Se for um número - else if (second >= 48 && second <= 57) - playAnimation(Subtitle.TYPE_NUMBER, second.ToString(), lastAnimationSubtitle, subtitle.NumberSpeed); - + else if (word[i] >= 48 && word[i] <= 57) + type = Subtitle.TYPE_NUMBER; + // Se for uma vírgula - else if (second == 44) - playAnimation(Subtitle.TYPE_WORD, second.ToString(), lastAnimationSubtitle); - + else if (word[i] == 44) + type = Subtitle.TYPE_WORD; + // Não há animação else { @@ -289,9 +307,11 @@ public abstract class GenericPlayerManager : MonoBehaviour { subtitle.updateLetterSpeed(); } - UnityEngine.Debug.Log("Animação \"" + second + "\" inexistente."); + UnityEngine.Debug.Log("Animação \"" + word[i] + "\" inexistente."); continue; } + + playAnimation(type, lastAnim, lastAnimationSubtitle); defaultPlayed = false; subtitle.updateLetterSpeed(); @@ -300,47 +320,6 @@ public abstract class GenericPlayerManager : MonoBehaviour { return lastAnimationSubtitle; } - - protected IEnumerator loadAnimation(string name) - { - loadingSingleAnimation = true; - - // Função loadAssetBundle é definida pela classe filha - WWW www = loadAssetBundle(name); - - if (www != null) - { - yield return www; - - AssetBundle bundle = null; - - if (www.error == null) - bundle = www.assetBundle; - - if (bundle != null && ! String.IsNullOrEmpty(bundle.mainAsset.name)) - { - AnimationClip aniClip = bundle.mainAsset as AnimationClip; - bundle.Unload(false); - - if (aniClip) - { - COMPONENT_ANIMATION.AddClip(aniClip, name); - - // Reproduz palavra - loadedAssetBundles.Add(name); - yield break; - } - else UnityEngine.Debug.Log ("Sinal \"" + name + "\" não carregado corretamente."); - } - } - - // Soletra palavra - nonexistentAssetBundles.Add(name); - - loadingSingleAnimation = false; - } - - private IEnumerator loadAndPlay() { loading = true; diff --git a/Assets/Scripts/Player Manager/RandomAnimations.cs b/Assets/Scripts/Player Manager/RandomAnimations.cs index 4674cd8..42a8b37 100644 --- a/Assets/Scripts/Player Manager/RandomAnimations.cs +++ b/Assets/Scripts/Player Manager/RandomAnimations.cs @@ -32,11 +32,6 @@ public class RandomAnimations { playerManager.Invoke("playRandomAnimations", this.time); } - private void playAnimation(string glosa) - { - this.playerManager.play(glosa); - } - public void playRandom() { if (running) @@ -48,7 +43,7 @@ public class RandomAnimations { if (index == lastIndex) index = sortIndex(); - playAnimation(this.names[index]); + this.playerManager.play(this.names[index]); } playerManager.Invoke("playRandomAnimations", this.time); diff --git a/Assets/Scripts/Player Manager/Subtitle.cs b/Assets/Scripts/Player Manager/Subtitle.cs index 0ef851e..019f6ba 100644 --- a/Assets/Scripts/Player Manager/Subtitle.cs +++ b/Assets/Scripts/Player Manager/Subtitle.cs @@ -104,28 +104,16 @@ public class Subtitle { 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++) + for (int i = 0; i < word.Length; i++) { - if ((word[i] >= 65 && word[i] <= 90) || (word[i] >= 48 && word[i] <= 57)) + if (i > 0 && ((word[i] >= 65 && word[i] <= 90) || (word[i] >= 48 && word[i] <= 57))) subtitle += "-"; - if (i == index || (last == index && word[i] == word[last])) - { + if (i == index) subtitle += "" + word[i] + ""; - if (i == index) last = i; - } else - { subtitle += word[i]; - last = i; - } } return subtitle; diff --git a/Assets/Scripts/PlayerManager.cs b/Assets/Scripts/PlayerManager.cs index 1f48ec4..05b3fc6 100644 --- a/Assets/Scripts/PlayerManager.cs +++ b/Assets/Scripts/PlayerManager.cs @@ -25,9 +25,18 @@ public class PlayerManager : GenericPlayerManager { private Color disabledAlpha = new Color(1F, 1F, 1F, 0.5F); private string[] randomAnimationNames = new string[] { - "[OLA]", + //"[OLA]", "[ESPREGUIÇADA]", - //"[IAE]" + //"[BOCEJAR]", + "[BOCEJAR_01]", + //"[COCHILAR]", + "[COCHILAR_01]", + //"[PISCADA]", + //"[PISCADA_01]", + //"[PISCADA_02]", + //"[PISCADA_03]", + //"[RELAXAR]", + //"[RELAXAR_01]" }; //InputField INFIELD; @@ -46,7 +55,7 @@ public class PlayerManager : GenericPlayerManager { stopButtonGraphic = stopButton.GetComponent(); stopButtonGraphic.color = disabledAlpha; - base.setRandomAnimations(new RandomAnimations(this, randomAnimationNames, 2, 1F), randomAnimationNames); + base.setRandomAnimations(new RandomAnimations(this, randomAnimationNames, 6, 0.5F), randomAnimationNames); base.Start(); } -- libgit2 0.21.2