From 5a1114fc79e9f42d0a5c9925239fb4e5803a1ffc Mon Sep 17 00:00:00 2001 From: Mateus Pires Date: Thu, 10 Mar 2016 15:43:08 -0300 Subject: [PATCH] Novas funcoes para play; Arquivo sinais.txt pego do servidor; Correcao do icone do dicionario na tela de tutorial; ... --- Assets/Scenes/Main.unity | 257 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------- Assets/Scripts/Animation List/ListManager.cs | 86 +++++++++++++++++++++++++++++++++++++------------------------------------------------- Assets/Scripts/Player Manager/GenericPlayerManager.cs | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------ Assets/Scripts/Player Manager/RandomAnimations.cs | 6 +++++- Assets/Scripts/PlayerManager.cs | 48 ++++++++++++++++++------------------------------ 5 files changed, 278 insertions(+), 295 deletions(-) diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index cd00158..5158506 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -119,7 +119,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 88.85714} m_Pivot: {x: 1, y: 0} --- !u!114 &2381751 MonoBehaviour: @@ -244,10 +244,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1558347736} m_RootOrder: 2 - 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 83.384995, y: -26.657143} + m_SizeDelta: {x: 27.589996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &12516339 MonoBehaviour: @@ -460,12 +460,12 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1798565573} + m_Father: {fileID: 1357627304} m_RootOrder: 0 m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 45.8, y: -29.657143} - m_SizeDelta: {x: 31.599998, y: 49.314285} + m_AnchoredPosition: {x: 13.235998, y: -26.657143} + m_SizeDelta: {x: 26.471996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &45157147 MonoBehaviour: @@ -1222,10 +1222,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1558347736} 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 152.97499, y: -26.657143} + m_SizeDelta: {x: 27.589996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &159189991 MonoBehaviour: @@ -2186,10 +2186,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1558347736} 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 222.56499, y: -26.657143} + m_SizeDelta: {x: 27.589996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &221470249 MonoBehaviour: @@ -3073,7 +3073,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 79.74359} m_Pivot: {x: 1, y: 0} --- !u!222 &302697591 CanvasRenderer: @@ -4051,7 +4051,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 98.85714} + m_SizeDelta: {x: 0, y: 88.85714} m_Pivot: {x: 1, y: 0} --- !u!114 &389535984 MonoBehaviour: @@ -4103,12 +4103,12 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1798565573} + m_Father: {fileID: 1357627304} m_RootOrder: 2 m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 173, y: -29.657143} - m_SizeDelta: {x: 31.599998, y: 49.314285} + m_AnchoredPosition: {x: 118.17999, y: -26.657143} + m_SizeDelta: {x: 26.471996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &395548683 MonoBehaviour: @@ -4130,7 +4130,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 9d4cc4cb9b7a7e44ab610fb91451883b, type: 3} + m_Sprite: {fileID: 21300000, guid: 9b387c328ab4e4a4f8aca6779732d2d6, type: 3} m_Type: 0 m_PreserveAspect: 1 m_FillCenter: 1 @@ -4676,10 +4676,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1558347736} 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 13.794998, y: -26.657143} + m_SizeDelta: {x: 27.589996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &477001116 MonoBehaviour: @@ -4820,7 +4820,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 27.012568, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &486636723 MonoBehaviour: @@ -5179,12 +5179,12 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1798565573} + m_Father: {fileID: 1357627304} m_RootOrder: 1 m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 109.399994, y: -29.657143} - m_SizeDelta: {x: 31.599998, y: 49.314285} + m_AnchoredPosition: {x: 65.70799, y: -26.657143} + m_SizeDelta: {x: 26.471996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &510126320 MonoBehaviour: @@ -6285,10 +6285,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 702185295} m_RootOrder: 5 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 223.12398, y: -26.657143} - m_SizeDelta: {x: 26.471996, y: 43.314285} + 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.5, y: 0.5} --- !u!114 &582478960 MonoBehaviour: @@ -6409,7 +6409,7 @@ RectTransform: m_Father: {fileID: 342633403} m_RootOrder: 0 m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0.5, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 10, y: -1.9} m_Pivot: {x: 0.5, y: 0.5} @@ -6514,7 +6514,7 @@ RectTransform: m_AnchorMin: {x: 0.1, y: 0.5} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: -31.450012} + m_SizeDelta: {x: 0, y: -35.674988} m_Pivot: {x: 0.5, y: 1} --- !u!114 &613136922 MonoBehaviour: @@ -6558,12 +6558,12 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1798565573} + m_Father: {fileID: 1357627304} m_RootOrder: 3 m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 236.59999, y: -29.657143} - m_SizeDelta: {x: 31.599998, y: 49.314285} + m_AnchoredPosition: {x: 170.65198, y: -26.657143} + m_SizeDelta: {x: 26.471996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &630366172 MonoBehaviour: @@ -8123,9 +8123,9 @@ RectTransform: m_Father: {fileID: 861767965} m_RootOrder: 0 m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1.7} + m_AnchorMax: {x: 1, y: 1.6} m_AnchoredPosition: {x: -10, y: 10} - m_SizeDelta: {x: -225.20001, y: -10} + m_SizeDelta: {x: -267.6857, y: -10} m_Pivot: {x: 1, y: 0} --- !u!114 &813876603 MonoBehaviour: @@ -8153,7 +8153,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 0.416} + m_Color: {r: 0, g: 0, b: 0, a: 0.159} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -8888,7 +8888,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 76.85714} + m_SizeDelta: {x: 0, y: 88.85714} m_Pivot: {x: 1, y: 0} --- !u!114 &861767966 MonoBehaviour: @@ -9593,10 +9593,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 702185295} m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 13.235998, y: -26.657143} - m_SizeDelta: {x: 26.471996, y: 43.314285} + 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.5, y: 0.5} --- !u!114 &930426944 MonoBehaviour: @@ -10042,7 +10042,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 88.85714} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!114 &954173494 MonoBehaviour: @@ -10465,10 +10465,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 702185295} m_RootOrder: 3 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 118.17999, y: -26.657143} - m_SizeDelta: {x: 26.471996, y: 43.314285} + 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.5, y: 0.5} --- !u!114 &1021427529 MonoBehaviour: @@ -10886,12 +10886,12 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1798565573} + m_Father: {fileID: 1357627304} m_RootOrder: 4 m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 300.19998, y: -29.657143} - m_SizeDelta: {x: 31.599998, y: 49.314285} + m_AnchoredPosition: {x: 223.12398, y: -26.657143} + m_SizeDelta: {x: 26.471996, y: 43.314285} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1048863674 MonoBehaviour: @@ -13467,6 +13467,76 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1357009035} +--- !u!1 &1357627303 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1357627304} + - 114: {fileID: 1357627306} + - 114: {fileID: 1357627305} + m_Layer: 5 + m_Name: group + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1357627304 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1357627303} + 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: 45157146} + - {fileID: 510126319} + - {fileID: 395548682} + - {fileID: 630366171} + - {fileID: 1048863673} + m_Father: {fileID: 1798565573} + m_RootOrder: 0 + m_AnchorMin: {x: 0.12, y: 0} + m_AnchorMax: {x: 0.88, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1357627305 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1357627303} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cc684fd2c599912419e723a09bee71eb, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1357627306 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1357627303} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 4 + m_Spacing: 26 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 --- !u!1 &1361202118 GameObject: m_ObjectHideFlags: 0 @@ -13870,7 +13940,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 88.85714} m_Pivot: {x: 1, y: 0} --- !u!114 &1388025417 MonoBehaviour: @@ -14081,7 +14151,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1414104007 RectTransform: m_ObjectHideFlags: 0 @@ -14725,10 +14795,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 702185295} m_RootOrder: 4 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 170.65198, y: -26.657143} - m_SizeDelta: {x: 26.471996, y: 43.314285} + 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.5, y: 0.5} --- !u!114 &1445490041 MonoBehaviour: @@ -15527,7 +15597,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 79.74359} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!1 &1537204752 GameObject: @@ -15990,7 +16060,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 27.012568, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1591478068 MonoBehaviour: @@ -17419,7 +17489,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.9, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: -31.450016} + m_SizeDelta: {x: 0, y: -35.67499} m_Pivot: {x: 0.5, y: 1} --- !u!114 &1763761725 MonoBehaviour: @@ -17710,10 +17780,8 @@ GameObject: serializedVersion: 4 m_Component: - 224: {fileID: 1798565573} - - 114: {fileID: 1798565577} - 222: {fileID: 1798565576} - 114: {fileID: 1798565575} - - 114: {fileID: 1798565574} m_Layer: 5 m_Name: bottom m_TagString: Untagged @@ -17732,11 +17800,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 45157146} - - {fileID: 510126319} - - {fileID: 395548682} - - {fileID: 630366171} - - {fileID: 1048863673} + - {fileID: 1357627304} m_Father: {fileID: 389535983} m_RootOrder: 1 m_AnchorMin: {x: 0, y: 0} @@ -17744,18 +17808,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1798565574 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11459920, guid: 5ccb0ba277304a14b9bb8d4e34161675, - type: 2} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1798565572} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cc684fd2c599912419e723a09bee71eb, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1798565575 MonoBehaviour: m_ObjectHideFlags: 0 @@ -17790,27 +17842,6 @@ CanvasRenderer: type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1798565572} ---- !u!114 &1798565577 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11484352, guid: 5ccb0ba277304a14b9bb8d4e34161675, - type: 2} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1798565572} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 30 - m_Right: 30 - m_Top: 5 - m_Bottom: 5 - m_ChildAlignment: 4 - m_Spacing: 32 - m_ChildForceExpandWidth: 0 - m_ChildForceExpandHeight: 0 --- !u!1 &1803052181 GameObject: m_ObjectHideFlags: 0 @@ -18464,7 +18495,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1900832963 MonoBehaviour: m_ObjectHideFlags: 0 @@ -20461,10 +20492,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 702185295} m_RootOrder: 2 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 65.70799, y: -26.657143} - m_SizeDelta: {x: 26.471996, y: 43.314285} + 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.5, y: 0.5} --- !u!114 &2099411280 MonoBehaviour: @@ -20585,7 +20616,7 @@ RectTransform: m_Father: {fileID: 717229341} m_RootOrder: 0 m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 10, y: -1.9} m_Pivot: {x: 0.5, y: 0.5} @@ -21057,8 +21088,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: playerManager: {fileID: 578311381} - time: 12 - probability: 0.8 + time: 6 + probability: 1 --- !u!4 &2111966983 Transform: m_ObjectHideFlags: 0 @@ -21105,7 +21136,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 88.85714} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!114 &2119336825 MonoBehaviour: diff --git a/Assets/Scripts/Animation List/ListManager.cs b/Assets/Scripts/Animation List/ListManager.cs index 7cc7ad9..97c993a 100644 --- a/Assets/Scripts/Animation List/ListManager.cs +++ b/Assets/Scripts/Animation List/ListManager.cs @@ -45,50 +45,57 @@ public class ListManager : MonoBehaviour { this.scrollView.onValueChanged.AddListener(checkScrollPosition); this.input.onValueChanged.AddListener(inputChanged); - // Load TrieST - { - this.trie = new TrieST(); - - TextAsset file = Resources.Load("sinais") as TextAsset; - string[] lines = file.text.Split("\n"[0]); - - foreach (string line in lines) - { - string word = line.Trim(); - - if ( ! String.IsNullOrEmpty(word)) - this.trie.put(word, word); - } - } - - this.itemList = getNamesByPrefix(""); - this.index = 0; - this.size = itemList.Length; - - //this.loadingItem = Instantiate (sampleLoadingItemObject) as GameObject; - if (Screen.dpi < 140) this.itemHeight = 36; - else if (Screen.dpi < 280) this.itemHeight = 50; - else if (Screen.dpi < 400) this.itemHeight = 90; - else if (Screen.dpi < 500) this.itemHeight = 120; - else this.itemHeight = 90; - StartCoroutine("populateList"); + StartCoroutine(load()); + } + + public IEnumerator load() + { + string[] lines; + WWW www = new WWW("http://vlibras.lavid.ufpb.br/sinais.txt"); + yield return www; + + if (www.error != null) + { + TextAsset file = Resources.Load("sinais") as TextAsset; + lines = file.text.Split("\n"[0]); + } + else + { + lines = www.text.Split("\n"[0]); + } + + this.trie = new TrieST(); + + foreach (string line in lines) + { + string word = line.Trim(); + + if ( ! String.IsNullOrEmpty(word)) + this.trie.put(word, word); + } + + this.itemList = getNamesByPrefix(""); + this.index = 0; + this.size = itemList.Length; + + populateList(); } public void checkScrollPosition(Vector2 scrollPosition) { if (scrollPosition.y <= 0.05F && ! this.isLoading) - StartCoroutine("populateList"); + populateList(); } public void inputChanged(string text) @@ -101,14 +108,11 @@ public class ListManager : MonoBehaviour { foreach(GameObject go in GameObject.FindGameObjectsWithTag("clone")) Destroy(go); - StartCoroutine("populateList"); + populateList(); } - private IEnumerator populateList() + private void populateList() { - changeLoadingState(true); - yield return new WaitForSeconds(0); - int last = this.index + OFFSET; if (last > size) last = this.size; @@ -126,7 +130,6 @@ public class ListManager : MonoBehaviour { sampleItem.GetComponent