From 48a02ab3551074014f3f24b9a7ad9513742eb650 Mon Sep 17 00:00:00 2001 From: Icaro Magalhaes Date: Tue, 4 Aug 2015 12:19:35 -0300 Subject: [PATCH] Corrige problemas de UI e de legenda. Release BUILD --- Assets/Prefabs/Avatar.prefab.meta | 2 +- Assets/Scenes/Main.unity | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- Assets/Scripts/PlayerManager.cs | 18 +++++++++++++----- 3 files changed, 229 insertions(+), 7 deletions(-) diff --git a/Assets/Prefabs/Avatar.prefab.meta b/Assets/Prefabs/Avatar.prefab.meta index 709cfdc..03f3694 100644 --- a/Assets/Prefabs/Avatar.prefab.meta +++ b/Assets/Prefabs/Avatar.prefab.meta @@ -4,5 +4,5 @@ timeCreated: 1434075139 licenseType: Pro NativeFormatImporter: userData: - assetBundleName: + assetBundleName: avatar assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 5e16914..9bf129d 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -201,6 +201,12 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: cd81d95d2fa8dc448b18a415b9009d43, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1839061338 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 11427452, guid: cd81d95d2fa8dc448b18a415b9009d43, + type: 2} + m_PrefabInternal: {fileID: 1610759364} + m_Script: {fileID: 11500000, guid: eeb6a455eb0dfd94aa6bc3484e5fecff, type: 3} --- !u!1001 &1943160035 Prefab: m_ObjectHideFlags: 0 @@ -306,7 +312,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 22465524, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} propertyPath: m_AnchoredPosition.x - value: -196 + value: -178 objectReference: {fileID: 0} - target: {fileID: 22465524, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} propertyPath: m_SizeDelta.x @@ -332,6 +338,214 @@ Prefab: propertyPath: m_AnchorMax.y value: .5 objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.y + value: 21.75 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_SizeDelta.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_SizeDelta.y + value: 43.5 + objectReference: {fileID: 0} + - target: {fileID: 11421050, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_PreserveAspect + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 165578, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 193898, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 119688, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 170998, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 107366, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 143508, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 130142, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 132472, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 117460, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 102362, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 173336, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 131276, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_StaticEditorFlags + value: 4294967295 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMin.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMax.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: 172 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMin.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMax.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_SizeDelta.x + value: 25 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_SizeDelta.y + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22474902, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22483228, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11487552, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_PreserveAspect + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11487614, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_PreserveAspect + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11402004, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_PreserveAspect + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22452620, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: 137 + objectReference: {fileID: 0} + - target: {fileID: 22458334, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: -103 + objectReference: {fileID: 0} + - target: {fileID: 22481960, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: -138 + objectReference: {fileID: 0} + - target: {fileID: 22465894, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 177790, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11436708, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1839061338} + - target: {fileID: 11436708, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: start_inputfield_web_play + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.x + value: 57.2999992 + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchoredPosition.y + value: -137.100006 + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMin.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_AnchorMax.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22483792, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_SizeDelta.y + value: 31.3999939 + objectReference: {fileID: 0} + - target: {fileID: 11460436, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1839061338} + - target: {fileID: 11460436, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: setSlider + objectReference: {fileID: 0} + - target: {fileID: 11415218, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1839061338} + - target: {fileID: 11415218, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: stop_animations + objectReference: {fileID: 0} + - target: {fileID: 11451458, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1839061338} + - target: {fileID: 11451458, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: start_web_play + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a310db7b56d86974ca7dc72c28f6a7f6, type: 2} m_IsPrefabParent: 0 diff --git a/Assets/Scripts/PlayerManager.cs b/Assets/Scripts/PlayerManager.cs index 85b497c..7b45e7f 100644 --- a/Assets/Scripts/PlayerManager.cs +++ b/Assets/Scripts/PlayerManager.cs @@ -45,7 +45,9 @@ public class PlayerManager : MonoBehaviour { } void Update(){ - foreach(AnimationState anim in COMPONENT_ANIMATION){ anim.speed = hSliderValue;} + if(COMPONENT_ANIMATION.isPlaying) + foreach(AnimationState anim in COMPONENT_ANIMATION) + anim.speed = hSliderValue; } //define a velocidade das animacoes com base no slider da GUI @@ -61,8 +63,6 @@ public class PlayerManager : MonoBehaviour { foreach( char letter in alphabet ){ - Subtitles.WORDS.Add(""+letter); - aniClip = Resources.Load ("ANIMS/"+letter); if( aniClip ) COMPONENT_ANIMATION.AddClip(aniClip, ""+letter); @@ -104,7 +104,14 @@ public class PlayerManager : MonoBehaviour { IEnumerator webPlay(String glosa, int version) { + + stop_animations( ); + + Subtitles.WORDS.Clear(); + foreach( char letter in alphabet ) Subtitles.WORDS.Add(""+letter); + + stringPos = glosa.Split(' '); String BaseURL = "http://150.165.205.9/anims/WEBGL/"; @@ -123,6 +130,7 @@ public class PlayerManager : MonoBehaviour { // Se ja estiver carregado: reproduz animaƧao if (loadedAssetBundles.Contains(aniName)){ + Subtitles.WORDS.Add(aniName); COMPONENT_ANIMATION.CrossFadeQueued(aniName, 0.6F, QueueMode.CompleteOthers); }else if (nonexistentAssetBundles.Contains(aniName)){//se nao estiver, soletra @@ -137,7 +145,7 @@ public class PlayerManager : MonoBehaviour { if (www.error != null){//soletra se o ww inexistir //throw new Exception("Erro no WWW: " + www.error); - Debug.Log("Sinal nao disponivel em banco de sinais. SOLETRANDO!"); + Debug.Log("Sinal nao disponivel em banco de sinais. SOLETRANDO "+aniName); foreach (char letter in aniName) COMPONENT_ANIMATION.CrossFadeQueued(""+letter, 0.6F, QueueMode.CompleteOthers); @@ -156,7 +164,7 @@ public class PlayerManager : MonoBehaviour { COMPONENT_ANIMATION.CrossFadeQueued(aniName, 0.6F, QueueMode.CompleteOthers); // 0.4 - Subtitles.WORDS.Add(aniName.ToUpper( )); loadedAssetBundles.Add(aniName); + Subtitles.WORDS.Add(aniName); loadedAssetBundles.Add(aniName); }else{ foreach (char letter in aniName) -- libgit2 0.21.2