Commit 3437a483728b1879c7e8de4109826c33623b8150

Authored by Mateus Lustosa
1 parent 470ec4ee

Terminando pause menu

@@ -2,6 +2,9 @@ @@ -2,6 +2,9 @@
2 /[Tt]emp/ 2 /[Tt]emp/
3 /[Oo]bj/ 3 /[Oo]bj/
4 /[Bb]uild/ 4 /[Bb]uild/
  5 +BUILDS/
  6 +DESIGN/
  7 +
5 8
6 # Autogenerated VS/MD solution and project files 9 # Autogenerated VS/MD solution and project files
7 *.csproj 10 *.csproj
Assets/Resources/GUI/b_pause.png 0 → 100644

1.91 KB

Assets/Resources/GUI/b_pause.png.meta 0 → 100644
@@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
  1 +fileFormatVersion: 2
  2 +guid: e80dac29e3ea8be489d3260b48c99a15
  3 +timeCreated: 1455582769
  4 +licenseType: Pro
  5 +TextureImporter:
  6 + fileIDToRecycleName: {}
  7 + serializedVersion: 2
  8 + mipmaps:
  9 + mipMapMode: 0
  10 + enableMipMap: 1
  11 + linearTexture: 0
  12 + correctGamma: 0
  13 + fadeOut: 0
  14 + borderMipMap: 0
  15 + mipMapFadeDistanceStart: 1
  16 + mipMapFadeDistanceEnd: 3
  17 + bumpmap:
  18 + convertToNormalMap: 0
  19 + externalNormalMap: 0
  20 + heightScale: .25
  21 + normalMapFilter: 0
  22 + isReadable: 0
  23 + grayScaleToAlpha: 0
  24 + generateCubemap: 0
  25 + cubemapConvolution: 0
  26 + cubemapConvolutionSteps: 8
  27 + cubemapConvolutionExponent: 1.5
  28 + seamlessCubemap: 0
  29 + textureFormat: -1
  30 + maxTextureSize: 2048
  31 + textureSettings:
  32 + filterMode: -1
  33 + aniso: -1
  34 + mipBias: -1
  35 + wrapMode: 1
  36 + nPOTScale: 0
  37 + lightmap: 0
  38 + rGBM: 0
  39 + compressionQuality: 50
  40 + allowsAlphaSplitting: 0
  41 + spriteMode: 1
  42 + spriteExtrude: 1
  43 + spriteMeshType: 1
  44 + alignment: 0
  45 + spritePivot: {x: .5, y: .5}
  46 + spriteBorder: {x: 0, y: 0, z: 0, w: 0}
  47 + spritePixelsToUnits: 100
  48 + alphaIsTransparency: 1
  49 + textureType: 8
  50 + buildTargetSettings: []
  51 + spriteSheet:
  52 + sprites: []
  53 + spritePackingTag:
  54 + userData:
  55 + assetBundleName:
  56 + assetBundleVariant:
Assets/Scenes/Main.unity
@@ -959,10 +959,10 @@ RectTransform: @@ -959,10 +959,10 @@ RectTransform:
959 m_Children: [] 959 m_Children: []
960 m_Father: {fileID: 1024302432} 960 m_Father: {fileID: 1024302432}
961 m_RootOrder: 2 961 m_RootOrder: 2
962 - m_AnchorMin: {x: .5, y: .5}  
963 - m_AnchorMax: {x: .5, y: .5}  
964 - m_AnchoredPosition: {x: 100, y: 0}  
965 - m_SizeDelta: {x: 47, y: 56} 962 + m_AnchorMin: {x: .675000012, y: .100000001}
  963 + m_AnchorMax: {x: .975000024, y: .899999976}
  964 + m_AnchoredPosition: {x: 0, y: 0}
  965 + m_SizeDelta: {x: 0, y: -16}
966 m_Pivot: {x: .5, y: .5} 966 m_Pivot: {x: .5, y: .5}
967 --- !u!114 &112837685 967 --- !u!114 &112837685
968 MonoBehaviour: 968 MonoBehaviour:
@@ -1026,7 +1026,7 @@ MonoBehaviour: @@ -1026,7 +1026,7 @@ MonoBehaviour:
1026 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1026 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
1027 m_Sprite: {fileID: 21300000, guid: fbf55ea1f2e12da4799c1ac527f37b6e, type: 3} 1027 m_Sprite: {fileID: 21300000, guid: fbf55ea1f2e12da4799c1ac527f37b6e, type: 3}
1028 m_Type: 0 1028 m_Type: 0
1029 - m_PreserveAspect: 0 1029 + m_PreserveAspect: 1
1030 m_FillCenter: 1 1030 m_FillCenter: 1
1031 m_FillMethod: 4 1031 m_FillMethod: 4
1032 m_FillAmount: 1 1032 m_FillAmount: 1
@@ -3785,6 +3785,136 @@ CanvasRenderer: @@ -3785,6 +3785,136 @@ CanvasRenderer:
3785 type: 2} 3785 type: 2}
3786 m_PrefabInternal: {fileID: 0} 3786 m_PrefabInternal: {fileID: 0}
3787 m_GameObject: {fileID: 434826652} 3787 m_GameObject: {fileID: 434826652}
  3788 +--- !u!1 &440527253
  3789 +GameObject:
  3790 + m_ObjectHideFlags: 0
  3791 + m_PrefabParentObject: {fileID: 143932, guid: 6506218ed7927bf45b508ebbec0c1222, type: 2}
  3792 + m_PrefabInternal: {fileID: 0}
  3793 + serializedVersion: 4
  3794 + m_Component:
  3795 + - 224: {fileID: 440527254}
  3796 + - 222: {fileID: 440527258}
  3797 + - 114: {fileID: 440527257}
  3798 + - 114: {fileID: 440527256}
  3799 + - 114: {fileID: 440527255}
  3800 + m_Layer: 5
  3801 + m_Name: b_pause
  3802 + m_TagString: Untagged
  3803 + m_Icon: {fileID: 0}
  3804 + m_NavMeshLayer: 0
  3805 + m_StaticEditorFlags: 0
  3806 + m_IsActive: 0
  3807 +--- !u!224 &440527254
  3808 +RectTransform:
  3809 + m_ObjectHideFlags: 0
  3810 + m_PrefabParentObject: {fileID: 22461782, guid: 6506218ed7927bf45b508ebbec0c1222,
  3811 + type: 2}
  3812 + m_PrefabInternal: {fileID: 0}
  3813 + m_GameObject: {fileID: 440527253}
  3814 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  3815 + m_LocalPosition: {x: 0, y: 0, z: 0}
  3816 + m_LocalScale: {x: 1, y: 1, z: 1}
  3817 + m_Children: []
  3818 + m_Father: {fileID: 2045088296}
  3819 + m_RootOrder: 1
  3820 + m_AnchorMin: {x: 0, y: 1}
  3821 + m_AnchorMax: {x: 0, y: 1}
  3822 + m_AnchoredPosition: {x: 12.0960007, y: -25.3714294}
  3823 + m_SizeDelta: {x: 24.1920013, y: 40.7428589}
  3824 + m_Pivot: {x: .5, y: .5}
  3825 +--- !u!114 &440527255
  3826 +MonoBehaviour:
  3827 + m_ObjectHideFlags: 0
  3828 + m_PrefabParentObject: {fileID: 0}
  3829 + m_PrefabInternal: {fileID: 0}
  3830 + m_GameObject: {fileID: 440527253}
  3831 + m_Enabled: 1
  3832 + m_EditorHideFlags: 0
  3833 + m_Script: {fileID: 11500000, guid: 5ea7adaac15fb3545b8ae42d73c16908, type: 3}
  3834 + m_Name:
  3835 + m_EditorClassIdentifier:
  3836 + image: {fileID: 440527257}
  3837 + isEnabled: 0
  3838 + updateReference: {fileID: 0}
  3839 + enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1}
  3840 + disabledColor: {r: .666666687, g: .666666687, b: .666666687, a: 1}
  3841 +--- !u!114 &440527256
  3842 +MonoBehaviour:
  3843 + m_ObjectHideFlags: 0
  3844 + m_PrefabParentObject: {fileID: 11446444, guid: 6506218ed7927bf45b508ebbec0c1222,
  3845 + type: 2}
  3846 + m_PrefabInternal: {fileID: 0}
  3847 + m_GameObject: {fileID: 440527253}
  3848 + m_Enabled: 1
  3849 + m_EditorHideFlags: 0
  3850 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  3851 + m_Name:
  3852 + m_EditorClassIdentifier:
  3853 + m_Navigation:
  3854 + m_Mode: 3
  3855 + m_SelectOnUp: {fileID: 0}
  3856 + m_SelectOnDown: {fileID: 0}
  3857 + m_SelectOnLeft: {fileID: 0}
  3858 + m_SelectOnRight: {fileID: 0}
  3859 + m_Transition: 1
  3860 + m_Colors:
  3861 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
  3862 + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
  3863 + m_PressedColor: {r: .572549045, g: .752941251, b: .811764777, a: 1}
  3864 + m_DisabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1}
  3865 + m_ColorMultiplier: 1
  3866 + m_FadeDuration: .100000001
  3867 + m_SpriteState:
  3868 + m_HighlightedSprite: {fileID: 0}
  3869 + m_PressedSprite: {fileID: 0}
  3870 + m_DisabledSprite: {fileID: 0}
  3871 + m_AnimationTriggers:
  3872 + m_NormalTrigger: Normal
  3873 + m_HighlightedTrigger: Highlighted
  3874 + m_PressedTrigger: Pressed
  3875 + m_DisabledTrigger: Disabled
  3876 + m_Interactable: 1
  3877 + m_TargetGraphic: {fileID: 440527257}
  3878 + m_OnClick:
  3879 + m_PersistentCalls:
  3880 + m_Calls: []
  3881 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
  3882 + Culture=neutral, PublicKeyToken=null
  3883 +--- !u!114 &440527257
  3884 +MonoBehaviour:
  3885 + m_ObjectHideFlags: 0
  3886 + m_PrefabParentObject: {fileID: 11458508, guid: 6506218ed7927bf45b508ebbec0c1222,
  3887 + type: 2}
  3888 + m_PrefabInternal: {fileID: 0}
  3889 + m_GameObject: {fileID: 440527253}
  3890 + m_Enabled: 1
  3891 + m_EditorHideFlags: 0
  3892 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
  3893 + m_Name:
  3894 + m_EditorClassIdentifier:
  3895 + m_Material: {fileID: 0}
  3896 + m_Color: {r: .666666687, g: .666666687, b: .666666687, a: 1}
  3897 + m_RaycastTarget: 1
  3898 + m_OnCullStateChanged:
  3899 + m_PersistentCalls:
  3900 + m_Calls: []
  3901 + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
  3902 + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  3903 + m_Sprite: {fileID: 21300000, guid: e80dac29e3ea8be489d3260b48c99a15, type: 3}
  3904 + m_Type: 0
  3905 + m_PreserveAspect: 1
  3906 + m_FillCenter: 1
  3907 + m_FillMethod: 4
  3908 + m_FillAmount: 1
  3909 + m_FillClockwise: 1
  3910 + m_FillOrigin: 0
  3911 +--- !u!222 &440527258
  3912 +CanvasRenderer:
  3913 + m_ObjectHideFlags: 0
  3914 + m_PrefabParentObject: {fileID: 22296198, guid: 6506218ed7927bf45b508ebbec0c1222,
  3915 + type: 2}
  3916 + m_PrefabInternal: {fileID: 0}
  3917 + m_GameObject: {fileID: 440527253}
3788 --- !u!1 &460696035 3918 --- !u!1 &460696035
3789 GameObject: 3919 GameObject:
3790 m_ObjectHideFlags: 0 3920 m_ObjectHideFlags: 0
@@ -5366,7 +5496,7 @@ RectTransform: @@ -5366,7 +5496,7 @@ RectTransform:
5366 m_AnchorMin: {x: .0500000007, y: .699999988} 5496 m_AnchorMin: {x: .0500000007, y: .699999988}
5367 m_AnchorMax: {x: .949999988, y: .879999995} 5497 m_AnchorMax: {x: .949999988, y: .879999995}
5368 m_AnchoredPosition: {x: 0, y: 0} 5498 m_AnchoredPosition: {x: 0, y: 0}
5369 - m_SizeDelta: {x: 0, y: 0} 5499 + m_SizeDelta: {x: 0, y: -61.4925079}
5370 m_Pivot: {x: .5, y: 1} 5500 m_Pivot: {x: .5, y: 1}
5371 --- !u!114 &568220611 5501 --- !u!114 &568220611
5372 MonoBehaviour: 5502 MonoBehaviour:
@@ -5507,6 +5637,9 @@ MonoBehaviour: @@ -5507,6 +5637,9 @@ MonoBehaviour:
5507 loading_snippet: {fileID: 1439902017} 5637 loading_snippet: {fileID: 1439902017}
5508 INFIELD: {fileID: 1886290661} 5638 INFIELD: {fileID: 1886290661}
5509 canvas_connection_error: {fileID: 1164416490} 5639 canvas_connection_error: {fileID: 1164416490}
  5640 + textButton: {fileID: 0}
  5641 + pauseButton: {fileID: 0}
  5642 + pauseMenu: {fileID: 1024302431}
5510 --- !u!114 &578311383 5643 --- !u!114 &578311383
5511 MonoBehaviour: 5644 MonoBehaviour:
5512 m_ObjectHideFlags: 0 5645 m_ObjectHideFlags: 0
@@ -8051,7 +8184,7 @@ MonoBehaviour: @@ -8051,7 +8184,7 @@ MonoBehaviour:
8051 isEnabled: 0 8184 isEnabled: 0
8052 updateReference: {fileID: 0} 8185 updateReference: {fileID: 0}
8053 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1} 8186 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1}
8054 - disabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 8187 + disabledColor: {r: .666666687, g: .666666687, b: .666666687, a: 1}
8055 --- !u!114 &930426945 8188 --- !u!114 &930426945
8056 MonoBehaviour: 8189 MonoBehaviour:
8057 m_ObjectHideFlags: 0 8190 m_ObjectHideFlags: 0
@@ -8072,7 +8205,7 @@ MonoBehaviour: @@ -8072,7 +8205,7 @@ MonoBehaviour:
8072 m_SelectOnRight: {fileID: 0} 8205 m_SelectOnRight: {fileID: 0}
8073 m_Transition: 1 8206 m_Transition: 1
8074 m_Colors: 8207 m_Colors:
8075 - m_NormalColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 8208 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
8076 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} 8209 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
8077 m_PressedColor: {r: .572549045, g: .752941251, b: .811764777, a: 1} 8210 m_PressedColor: {r: .572549045, g: .752941251, b: .811764777, a: 1}
8078 m_DisabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 8211 m_DisabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1}
@@ -8129,7 +8262,7 @@ MonoBehaviour: @@ -8129,7 +8262,7 @@ MonoBehaviour:
8129 m_Name: 8262 m_Name:
8130 m_EditorClassIdentifier: 8263 m_EditorClassIdentifier:
8131 m_Material: {fileID: 0} 8264 m_Material: {fileID: 0}
8132 - m_Color: {r: .904411793, g: .904411793, b: .904411793, a: 1} 8265 + m_Color: {r: .666666687, g: .666666687, b: .666666687, a: 1}
8133 m_RaycastTarget: 1 8266 m_RaycastTarget: 1
8134 m_OnCullStateChanged: 8267 m_OnCullStateChanged:
8135 m_PersistentCalls: 8268 m_PersistentCalls:
@@ -8609,7 +8742,7 @@ GameObject: @@ -8609,7 +8742,7 @@ GameObject:
8609 m_Icon: {fileID: 0} 8742 m_Icon: {fileID: 0}
8610 m_NavMeshLayer: 0 8743 m_NavMeshLayer: 0
8611 m_StaticEditorFlags: 0 8744 m_StaticEditorFlags: 0
8612 - m_IsActive: 1 8745 + m_IsActive: 0
8613 --- !u!224 &951727302 8746 --- !u!224 &951727302
8614 RectTransform: 8747 RectTransform:
8615 m_ObjectHideFlags: 0 8748 m_ObjectHideFlags: 0
@@ -9247,17 +9380,17 @@ RectTransform: @@ -9247,17 +9380,17 @@ RectTransform:
9247 m_GameObject: {fileID: 1024302431} 9380 m_GameObject: {fileID: 1024302431}
9248 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 9381 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
9249 m_LocalPosition: {x: 0, y: 0, z: 0} 9382 m_LocalPosition: {x: 0, y: 0, z: 0}
9250 - m_LocalScale: {x: .800000012, y: .800000012, z: 0} 9383 + m_LocalScale: {x: 1, y: 1, z: 0}
9251 m_Children: 9384 m_Children:
9252 - {fileID: 1525727530} 9385 - {fileID: 1525727530}
9253 - {fileID: 1085279172} 9386 - {fileID: 1085279172}
9254 - {fileID: 112837684} 9387 - {fileID: 112837684}
9255 m_Father: {fileID: 1252650593} 9388 m_Father: {fileID: 1252650593}
9256 m_RootOrder: 11 9389 m_RootOrder: 11
9257 - m_AnchorMin: {x: .5, y: .5}  
9258 - m_AnchorMax: {x: .5, y: .5} 9390 + m_AnchorMin: {x: .100000001, y: .419999987}
  9391 + m_AnchorMax: {x: .899999976, y: .579999983}
9259 m_AnchoredPosition: {x: 0, y: 0} 9392 m_AnchoredPosition: {x: 0, y: 0}
9260 - m_SizeDelta: {x: 451, y: 139} 9393 + m_SizeDelta: {x: 0, y: 0}
9261 m_Pivot: {x: .5, y: .5} 9394 m_Pivot: {x: .5, y: .5}
9262 --- !u!114 &1024302433 9395 --- !u!114 &1024302433
9263 MonoBehaviour: 9396 MonoBehaviour:
@@ -10141,14 +10274,14 @@ RectTransform: @@ -10141,14 +10274,14 @@ RectTransform:
10141 m_GameObject: {fileID: 1085279171} 10274 m_GameObject: {fileID: 1085279171}
10142 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 10275 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
10143 m_LocalPosition: {x: 0, y: 0, z: 0} 10276 m_LocalPosition: {x: 0, y: 0, z: 0}
10144 - m_LocalScale: {x: 1, y: 1, z: 1} 10277 + m_LocalScale: {x: .949999988, y: .949999988, z: 1}
10145 m_Children: [] 10278 m_Children: []
10146 m_Father: {fileID: 1024302432} 10279 m_Father: {fileID: 1024302432}
10147 m_RootOrder: 1 10280 m_RootOrder: 1
10148 - m_AnchorMin: {x: .5, y: .5}  
10149 - m_AnchorMax: {x: .5, y: .5} 10281 + m_AnchorMin: {x: .349999994, y: .100000001}
  10282 + m_AnchorMax: {x: .649999976, y: .899999976}
10150 m_AnchoredPosition: {x: 0, y: 0} 10283 m_AnchoredPosition: {x: 0, y: 0}
10151 - m_SizeDelta: {x: 55, y: 67} 10284 + m_SizeDelta: {x: 0, y: 0}
10152 m_Pivot: {x: .5, y: .5} 10285 m_Pivot: {x: .5, y: .5}
10153 --- !u!114 &1085279173 10286 --- !u!114 &1085279173
10154 MonoBehaviour: 10287 MonoBehaviour:
@@ -10212,7 +10345,7 @@ MonoBehaviour: @@ -10212,7 +10345,7 @@ MonoBehaviour:
10212 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 10345 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10213 m_Sprite: {fileID: 21300000, guid: 5324882cb6bf20141b5cff66b4764ffb, type: 3} 10346 m_Sprite: {fileID: 21300000, guid: 5324882cb6bf20141b5cff66b4764ffb, type: 3}
10214 m_Type: 0 10347 m_Type: 0
10215 - m_PreserveAspect: 0 10348 + m_PreserveAspect: 1
10216 m_FillCenter: 1 10349 m_FillCenter: 1
10217 m_FillMethod: 4 10350 m_FillMethod: 4
10218 m_FillAmount: 1 10351 m_FillAmount: 1
@@ -10997,7 +11130,7 @@ RectTransform: @@ -10997,7 +11130,7 @@ RectTransform:
10997 m_AnchorMin: {x: .0500000007, y: .200000003} 11130 m_AnchorMin: {x: .0500000007, y: .200000003}
10998 m_AnchorMax: {x: .949999988, y: .879999995} 11131 m_AnchorMax: {x: .949999988, y: .879999995}
10999 m_AnchoredPosition: {x: 0, y: 0} 11132 m_AnchoredPosition: {x: 0, y: 0}
11000 - m_SizeDelta: {x: 0, y: 0} 11133 + m_SizeDelta: {x: 0, y: -341.992493}
11001 m_Pivot: {x: .5, y: 1} 11134 m_Pivot: {x: .5, y: 1}
11002 --- !u!114 &1149571752 11135 --- !u!114 &1149571752
11003 MonoBehaviour: 11136 MonoBehaviour:
@@ -15281,14 +15414,14 @@ RectTransform: @@ -15281,14 +15414,14 @@ RectTransform:
15281 m_GameObject: {fileID: 1525727529} 15414 m_GameObject: {fileID: 1525727529}
15282 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 15415 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
15283 m_LocalPosition: {x: 0, y: 0, z: 0} 15416 m_LocalPosition: {x: 0, y: 0, z: 0}
15284 - m_LocalScale: {x: 1, y: 1, z: 1} 15417 + m_LocalScale: {x: .899999976, y: .899999976, z: 1}
15285 m_Children: [] 15418 m_Children: []
15286 m_Father: {fileID: 1024302432} 15419 m_Father: {fileID: 1024302432}
15287 m_RootOrder: 0 15420 m_RootOrder: 0
15288 - m_AnchorMin: {x: .5, y: .5}  
15289 - m_AnchorMax: {x: .5, y: .5}  
15290 - m_AnchoredPosition: {x: -100, y: 0}  
15291 - m_SizeDelta: {x: 47, y: 56} 15421 + m_AnchorMin: {x: .0250000004, y: .100000001}
  15422 + m_AnchorMax: {x: .324999988, y: .899999976}
  15423 + m_AnchoredPosition: {x: 0, y: 0}
  15424 + m_SizeDelta: {x: 0, y: 0}
15292 m_Pivot: {x: .5, y: .5} 15425 m_Pivot: {x: .5, y: .5}
15293 --- !u!114 &1525727531 15426 --- !u!114 &1525727531
15294 MonoBehaviour: 15427 MonoBehaviour:
@@ -15352,9 +15485,9 @@ MonoBehaviour: @@ -15352,9 +15485,9 @@ MonoBehaviour:
15352 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 15485 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
15353 m_Sprite: {fileID: 21300000, guid: 72a95df012b6995419d116db373691db, type: 3} 15486 m_Sprite: {fileID: 21300000, guid: 72a95df012b6995419d116db373691db, type: 3}
15354 m_Type: 0 15487 m_Type: 0
15355 - m_PreserveAspect: 0 15488 + m_PreserveAspect: 1
15356 m_FillCenter: 1 15489 m_FillCenter: 1
15357 - m_FillMethod: 4 15490 + m_FillMethod: 2
15358 m_FillAmount: 1 15491 m_FillAmount: 1
15359 m_FillClockwise: 1 15492 m_FillClockwise: 1
15360 m_FillOrigin: 0 15493 m_FillOrigin: 0
@@ -16791,7 +16924,7 @@ RectTransform: @@ -16791,7 +16924,7 @@ RectTransform:
16791 m_LocalScale: {x: 1, y: 1, z: 1} 16924 m_LocalScale: {x: 1, y: 1, z: 1}
16792 m_Children: [] 16925 m_Children: []
16793 m_Father: {fileID: 2045088296} 16926 m_Father: {fileID: 2045088296}
16794 - m_RootOrder: 2 16927 + m_RootOrder: 3
16795 m_AnchorMin: {x: 0, y: 0} 16928 m_AnchorMin: {x: 0, y: 0}
16796 m_AnchorMax: {x: 0, y: 0} 16929 m_AnchorMax: {x: 0, y: 0}
16797 m_AnchoredPosition: {x: 0, y: 0} 16930 m_AnchoredPosition: {x: 0, y: 0}
@@ -16812,7 +16945,7 @@ MonoBehaviour: @@ -16812,7 +16945,7 @@ MonoBehaviour:
16812 isEnabled: 0 16945 isEnabled: 0
16813 updateReference: {fileID: 1649730297} 16946 updateReference: {fileID: 1649730297}
16814 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1} 16947 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1}
16815 - disabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 16948 + disabledColor: {r: 1, g: 1, b: 1, a: 1}
16816 --- !u!114 &1649730300 16949 --- !u!114 &1649730300
16817 MonoBehaviour: 16950 MonoBehaviour:
16818 m_ObjectHideFlags: 0 16951 m_ObjectHideFlags: 0
@@ -16833,7 +16966,7 @@ MonoBehaviour: @@ -16833,7 +16966,7 @@ MonoBehaviour:
16833 m_SelectOnRight: {fileID: 0} 16966 m_SelectOnRight: {fileID: 0}
16834 m_Transition: 1 16967 m_Transition: 1
16835 m_Colors: 16968 m_Colors:
16836 - m_NormalColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 16969 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
16837 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} 16970 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
16838 m_PressedColor: {r: .600000024, g: .823529482, b: .898039281, a: 1} 16971 m_PressedColor: {r: .600000024, g: .823529482, b: .898039281, a: 1}
16839 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} 16972 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
@@ -16879,7 +17012,7 @@ MonoBehaviour: @@ -16879,7 +17012,7 @@ MonoBehaviour:
16879 m_Name: 17012 m_Name:
16880 m_EditorClassIdentifier: 17013 m_EditorClassIdentifier:
16881 m_Material: {fileID: 0} 17014 m_Material: {fileID: 0}
16882 - m_Color: {r: .904411793, g: .904411793, b: .904411793, a: 1} 17015 + m_Color: {r: .666666687, g: .666666687, b: .666666687, a: 1}
16883 m_RaycastTarget: 1 17016 m_RaycastTarget: 1
16884 m_OnCullStateChanged: 17017 m_OnCullStateChanged:
16885 m_PersistentCalls: 17018 m_PersistentCalls:
@@ -17671,7 +17804,7 @@ RectTransform: @@ -17671,7 +17804,7 @@ RectTransform:
17671 m_LocalScale: {x: 1, y: 1, z: 1} 17804 m_LocalScale: {x: 1, y: 1, z: 1}
17672 m_Children: [] 17805 m_Children: []
17673 m_Father: {fileID: 2045088296} 17806 m_Father: {fileID: 2045088296}
17674 - m_RootOrder: 3 17807 + m_RootOrder: 4
17675 m_AnchorMin: {x: 0, y: 0} 17808 m_AnchorMin: {x: 0, y: 0}
17676 m_AnchorMax: {x: 0, y: 0} 17809 m_AnchorMax: {x: 0, y: 0}
17677 m_AnchoredPosition: {x: 0, y: 0} 17810 m_AnchoredPosition: {x: 0, y: 0}
@@ -17692,7 +17825,7 @@ MonoBehaviour: @@ -17692,7 +17825,7 @@ MonoBehaviour:
17692 isEnabled: 1 17825 isEnabled: 1
17693 updateReference: {fileID: 1728688478} 17826 updateReference: {fileID: 1728688478}
17694 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1} 17827 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1}
17695 - disabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 17828 + disabledColor: {r: .666666687, g: .666666687, b: .666666687, a: 1}
17696 --- !u!114 &1728688481 17829 --- !u!114 &1728688481
17697 MonoBehaviour: 17830 MonoBehaviour:
17698 m_ObjectHideFlags: 0 17831 m_ObjectHideFlags: 0
@@ -17713,7 +17846,7 @@ MonoBehaviour: @@ -17713,7 +17846,7 @@ MonoBehaviour:
17713 m_SelectOnRight: {fileID: 0} 17846 m_SelectOnRight: {fileID: 0}
17714 m_Transition: 1 17847 m_Transition: 1
17715 m_Colors: 17848 m_Colors:
17716 - m_NormalColor: {r: .79411763, g: .79411763, b: .79411763, a: 1} 17849 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
17717 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} 17850 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
17718 m_PressedColor: {r: .600000024, g: .823529482, b: .898039281, a: 1} 17851 m_PressedColor: {r: .600000024, g: .823529482, b: .898039281, a: 1}
17719 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} 17852 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
@@ -20014,7 +20147,7 @@ RectTransform: @@ -20014,7 +20147,7 @@ RectTransform:
20014 m_Father: {fileID: 1079363870} 20147 m_Father: {fileID: 1079363870}
20015 m_RootOrder: 0 20148 m_RootOrder: 0
20016 m_AnchorMin: {x: 0, y: 0} 20149 m_AnchorMin: {x: 0, y: 0}
20017 - m_AnchorMax: {x: 0, y: 0} 20150 + m_AnchorMax: {x: 1, y: 1}
20018 m_AnchoredPosition: {x: 0, y: 0} 20151 m_AnchoredPosition: {x: 0, y: 0}
20019 m_SizeDelta: {x: 20, y: 20} 20152 m_SizeDelta: {x: 20, y: 20}
20020 m_Pivot: {x: .5, y: .5} 20153 m_Pivot: {x: .5, y: .5}
@@ -21151,6 +21284,7 @@ RectTransform: @@ -21151,6 +21284,7 @@ RectTransform:
21151 m_LocalScale: {x: 1, y: 1, z: 1} 21284 m_LocalScale: {x: 1, y: 1, z: 1}
21152 m_Children: 21285 m_Children:
21153 - {fileID: 930426943} 21286 - {fileID: 930426943}
  21287 + - {fileID: 440527254}
21154 - {fileID: 2083881766} 21288 - {fileID: 2083881766}
21155 - {fileID: 1649730298} 21289 - {fileID: 1649730298}
21156 - {fileID: 1728688479} 21290 - {fileID: 1728688479}
@@ -21409,7 +21543,7 @@ RectTransform: @@ -21409,7 +21543,7 @@ RectTransform:
21409 m_LocalScale: {x: 1, y: 1, z: 1} 21543 m_LocalScale: {x: 1, y: 1, z: 1}
21410 m_Children: [] 21544 m_Children: []
21411 m_Father: {fileID: 2045088296} 21545 m_Father: {fileID: 2045088296}
21412 - m_RootOrder: 4 21546 + m_RootOrder: 5
21413 m_AnchorMin: {x: 0, y: 0} 21547 m_AnchorMin: {x: 0, y: 0}
21414 m_AnchorMax: {x: 0, y: 0} 21548 m_AnchorMax: {x: 0, y: 0}
21415 m_AnchoredPosition: {x: 0, y: 0} 21549 m_AnchoredPosition: {x: 0, y: 0}
@@ -21430,7 +21564,7 @@ MonoBehaviour: @@ -21430,7 +21564,7 @@ MonoBehaviour:
21430 isEnabled: 0 21564 isEnabled: 0
21431 updateReference: {fileID: 0} 21565 updateReference: {fileID: 0}
21432 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1} 21566 enabledColor: {r: .310000002, g: .75, b: .912999988, a: 1}
21433 - disabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 21567 + disabledColor: {r: .666666687, g: .666666687, b: .666666687, a: 1}
21434 --- !u!114 &2079280006 21568 --- !u!114 &2079280006
21435 MonoBehaviour: 21569 MonoBehaviour:
21436 m_ObjectHideFlags: 0 21570 m_ObjectHideFlags: 0
@@ -21451,7 +21585,7 @@ MonoBehaviour: @@ -21451,7 +21585,7 @@ MonoBehaviour:
21451 m_SelectOnRight: {fileID: 0} 21585 m_SelectOnRight: {fileID: 0}
21452 m_Transition: 1 21586 m_Transition: 1
21453 m_Colors: 21587 m_Colors:
21454 - m_NormalColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 21588 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
21455 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} 21589 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
21456 m_PressedColor: {r: .592156887, g: .815686345, b: .890196145, a: 1} 21590 m_PressedColor: {r: .592156887, g: .815686345, b: .890196145, a: 1}
21457 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} 21591 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
@@ -21508,7 +21642,7 @@ MonoBehaviour: @@ -21508,7 +21642,7 @@ MonoBehaviour:
21508 m_Name: 21642 m_Name:
21509 m_EditorClassIdentifier: 21643 m_EditorClassIdentifier:
21510 m_Material: {fileID: 0} 21644 m_Material: {fileID: 0}
21511 - m_Color: {r: .904411793, g: .904411793, b: .904411793, a: 1} 21645 + m_Color: {r: .666666687, g: .666666687, b: .666666687, a: 1}
21512 m_RaycastTarget: 1 21646 m_RaycastTarget: 1
21513 m_OnCullStateChanged: 21647 m_OnCullStateChanged:
21514 m_PersistentCalls: 21648 m_PersistentCalls:
@@ -21560,7 +21694,7 @@ RectTransform: @@ -21560,7 +21694,7 @@ RectTransform:
21560 m_LocalScale: {x: 1, y: 1, z: 1} 21694 m_LocalScale: {x: 1, y: 1, z: 1}
21561 m_Children: [] 21695 m_Children: []
21562 m_Father: {fileID: 2045088296} 21696 m_Father: {fileID: 2045088296}
21563 - m_RootOrder: 1 21697 + m_RootOrder: 2
21564 m_AnchorMin: {x: 0, y: 0} 21698 m_AnchorMin: {x: 0, y: 0}
21565 m_AnchorMax: {x: 0, y: 0} 21699 m_AnchorMax: {x: 0, y: 0}
21566 m_AnchoredPosition: {x: 0, y: 0} 21700 m_AnchoredPosition: {x: 0, y: 0}
@@ -21586,7 +21720,7 @@ MonoBehaviour: @@ -21586,7 +21720,7 @@ MonoBehaviour:
21586 m_SelectOnRight: {fileID: 0} 21720 m_SelectOnRight: {fileID: 0}
21587 m_Transition: 1 21721 m_Transition: 1
21588 m_Colors: 21722 m_Colors:
21589 - m_NormalColor: {r: .792156875, g: .792156875, b: .792156875, a: 1} 21723 + m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
21590 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} 21724 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
21591 m_PressedColor: {r: .588235319, g: .80392164, b: .878431439, a: 1} 21725 m_PressedColor: {r: .588235319, g: .80392164, b: .878431439, a: 1}
21592 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} 21726 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
@@ -21632,7 +21766,7 @@ MonoBehaviour: @@ -21632,7 +21766,7 @@ MonoBehaviour:
21632 m_Name: 21766 m_Name:
21633 m_EditorClassIdentifier: 21767 m_EditorClassIdentifier:
21634 m_Material: {fileID: 0} 21768 m_Material: {fileID: 0}
21635 - m_Color: {r: .904411793, g: .904411793, b: .904411793, a: 1} 21769 + m_Color: {r: .666666687, g: .666666687, b: .666666687, a: 1}
21636 m_RaycastTarget: 1 21770 m_RaycastTarget: 1
21637 m_OnCullStateChanged: 21771 m_OnCullStateChanged:
21638 m_PersistentCalls: 21772 m_PersistentCalls:
Assets/Scripts/Animation List/ListManager.cs
@@ -148,8 +148,6 @@ public class ListManager : MonoBehaviour { @@ -148,8 +148,6 @@ public class ListManager : MonoBehaviour {
148 148
149 private void changeLoadingState(bool active) 149 private void changeLoadingState(bool active)
150 { 150 {
151 - Debug.Log(active ? "Loading..." : "Done");  
152 -  
153 if (isLoading != active) 151 if (isLoading != active)
154 { 152 {
155 this.loadingItem.transform.SetParent(active ? contentPanel : null); 153 this.loadingItem.transform.SetParent(active ? contentPanel : null);
Assets/Scripts/Animation List/SampleItem.cs
@@ -9,7 +9,7 @@ public class SampleItem : MonoBehaviour { @@ -9,7 +9,7 @@ public class SampleItem : MonoBehaviour {
9 9
10 public void StartAnimation() 10 public void StartAnimation()
11 { 11 {
12 - GameObject.FindGameObjectWithTag("PlayerManager").GetComponent<PlayerManager>().start_inputfield_play(title.text); 12 + GameObject.FindGameObjectWithTag("PlayerManager").GetComponent<PlayerManager>().playDictWord(title.text);
13 } 13 }
14 14
15 } 15 }
Assets/Scripts/Player Manager/GenericPlayerManager.cs
@@ -117,7 +117,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { @@ -117,7 +117,7 @@ public abstract class GenericPlayerManager : MonoBehaviour {
117 } 117 }
118 118
119 119
120 - public void stop_animations() 120 + public void stopAll()
121 { 121 {
122 StopCoroutine("loadAndPlay"); 122 StopCoroutine("loadAndPlay");
123 loading = false; 123 loading = false;
@@ -188,7 +188,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { @@ -188,7 +188,7 @@ public abstract class GenericPlayerManager : MonoBehaviour {
188 protected abstract void onPlayingStateChange(); 188 protected abstract void onPlayingStateChange();
189 189
190 190
191 - public void switchPauseState(bool paused) 191 + public void setPauseState(bool paused)
192 { 192 {
193 if (this.paused != paused) 193 if (this.paused != paused)
194 { 194 {
@@ -201,15 +201,11 @@ public abstract class GenericPlayerManager : MonoBehaviour { @@ -201,15 +201,11 @@ public abstract class GenericPlayerManager : MonoBehaviour {
201 onPlayingStateChange(); 201 onPlayingStateChange();
202 } 202 }
203 } 203 }
204 - public void switchPauseState()  
205 - {  
206 - switchPauseState( ! paused);  
207 - }  
208 204
209 public bool play() 205 public bool play()
210 { 206 {
211 if (playing) 207 if (playing)
212 - switchPauseState(); 208 + setPauseState( ! paused);
213 else 209 else
214 play(true, true, true); 210 play(true, true, true);
215 211
@@ -228,7 +224,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { @@ -228,7 +224,7 @@ public abstract class GenericPlayerManager : MonoBehaviour {
228 if (loading) 224 if (loading)
229 { 225 {
230 if (stopLoading) 226 if (stopLoading)
231 - stop_animations(); 227 + stopAll();
232 else 228 else
233 return false; 229 return false;
234 } 230 }
@@ -371,28 +367,19 @@ public abstract class GenericPlayerManager : MonoBehaviour { @@ -371,28 +367,19 @@ public abstract class GenericPlayerManager : MonoBehaviour {
371 spelled = false; 367 spelled = false;
372 } 368 }
373 369
374 - //bool isFlag = false;  
375 -  
376 - //if (aniName[0] == '[')  
377 - //{  
378 - if (flags.Contains(aniName))  
379 - {  
380 - //isFlag = true;  
381 - lastAnimationSubtitle = "";  
382 - playAnimation(Subtitle.TYPE_WORD, aniName, "");  
383 - }  
384 - else  
385 - {  
386 - lastAnimationSubtitle = aniName;  
387 - playAnimation(Subtitle.TYPE_WORD, aniName);  
388 - }  
389 - //}  
390 -  
391 - /*if (isFlag) 370 + if (flags.Contains(aniName))
  371 + {
  372 + //isFlag = true;
  373 + lastAnimationSubtitle = "";
392 playAnimation(Subtitle.TYPE_WORD, aniName, ""); 374 playAnimation(Subtitle.TYPE_WORD, aniName, "");
  375 + }
393 else 376 else
394 - playAnimation(Subtitle.TYPE_WORD, aniName);*/ 377 + {
  378 + lastAnimationSubtitle = aniName;
  379 + playAnimation(Subtitle.TYPE_WORD, aniName);
  380 + }
395 } 381 }
  382 +
396 // Soletra palavra 383 // Soletra palavra
397 else 384 else
398 { 385 {
Assets/Scripts/PlayerManager.cs
1 -//Log Dir http://docs.unity3d.com/Manual/LogFiles.html 1 +//Log Dir http://docs.unity3d.com/Manual/LogFiles.html
2 2
3 // requisiçao http get no unity 3 // requisiçao http get no unity
4 // vlibras.lavid.ufpb.br:5000/glosa?texto=CASA%LAVID%123 4 // vlibras.lavid.ufpb.br:5000/glosa?texto=CASA%LAVID%123
@@ -23,45 +23,56 @@ public class PlayerManager : GenericPlayerManager { @@ -23,45 +23,56 @@ public class PlayerManager : GenericPlayerManager {
23 //private const string BASE_URL = "http://150.165.205.9/anims/AssetBundles/0_DefaultBundles/"; 23 //private const string BASE_URL = "http://150.165.205.9/anims/AssetBundles/0_DefaultBundles/";
24 public InputField INFIELD; 24 public InputField INFIELD;
25 private int version = 1; 25 private int version = 1;
26 - private bool thereIsConnection;  
27 public Canvas canvas_connection_error; 26 public Canvas canvas_connection_error;
28 27
29 private string[] randomAnimationNames = new string[] { 28 private string[] randomAnimationNames = new string[] {
30 "[BOCEJAR]", 29 "[BOCEJAR]",
31 "[COCHILAR]", 30 "[COCHILAR]",
32 "[ESPREGUIÇADA]", 31 "[ESPREGUIÇADA]",
33 - "[RELAXAR]" 32 + //"[RELAXAR]"
34 }; 33 };
35 34
  35 + public GameObject textButton;
  36 + public GameObject pauseButton;
  37 + public GameObject pauseMenu;
  38 + private SwitchImageAttribute pauseButtonImage;
  39 +
36 public override void Start() 40 public override void Start()
37 { 41 {
  42 + this.pauseButtonImage = this.pauseButton.GetComponent<SwitchImageAttribute>();
  43 +
  44 + if (this.pauseButtonImage == null)
  45 + Debug.Log("Could not retrieve SwitchImageAttribute from pauseButton");
  46 + else
  47 + Debug.Log("SwitchImageAttribute from pauseButton retrieved");
  48 +
38 base.setRandomAnimations(new RandomAnimations(this, randomAnimationNames, 2, 1F), randomAnimationNames); 49 base.setRandomAnimations(new RandomAnimations(this, randomAnimationNames, 2, 1F), randomAnimationNames);
39 base.Start(); 50 base.Start();
40 51
41 - Application.ExternalCall("onLoadPlayer");//var onLoadPlayer = function(){} 52 + // DEBUG: var onLoadPlayer = function(){}
  53 + Application.ExternalCall("onLoadPlayer");
42 voiceRecognizer = new VoiceRecognition(); 54 voiceRecognizer = new VoiceRecognition();
43 Screen.fullScreen = false; 55 Screen.fullScreen = false;
44 } 56 }
45 57
46 public void start_play() 58 public void start_play()
47 { 59 {
48 - try {  
49 - base.play();  
50 - } catch(Exception e) {  
51 - e.ToString();//Debug.Log(e+" :: Ops!");  
52 - } 60 + base.play();
53 } 61 }
54 62
55 public void start_play(string glosa) 63 public void start_play(string glosa)
56 { 64 {
57 - try {  
58 - if (base.isLoading() || base.isPlaying())  
59 - base.stop_animations(); 65 + base.play(glosa);
  66 + }
60 67
61 - base.play(glosa);  
62 - } catch(Exception e) {  
63 - e.ToString();//Debug.Log(e+" :: Ops!");  
64 - } 68 + public void playDictWord(string glosa)
  69 + {
  70 + base.glosa = glosa;
  71 +
  72 + // Stop loading, if loading
  73 + // Don't stop animations, if playing
  74 + // Load glosa, enqueue animations
  75 + base.play(true, false, true);
65 } 76 }
66 77
67 protected override WWW loadAssetBundle(string aniName) 78 protected override WWW loadAssetBundle(string aniName)
@@ -84,119 +95,122 @@ public class PlayerManager : GenericPlayerManager { @@ -84,119 +95,122 @@ public class PlayerManager : GenericPlayerManager {
84 return WWW.LoadFromCacheOrDownload(BASE_URL + aniName, version); 95 return WWW.LoadFromCacheOrDownload(BASE_URL + aniName, version);
85 } 96 }
86 97
87 - protected override void onPlayingStateChange() {}  
88 -  
89 - IEnumerator translate() 98 + protected override void onPlayingStateChange()
90 { 99 {
91 - WWW glosaRequest = new WWW(SERVER_URL + WWW.EscapeURL(base.glosa)); 100 + Debug.Log("onPlayingStateChange");
92 101
93 - try {  
94 - waitForRequest(glosaRequest);  
95 - } catch (Exception e) { e.ToString(); }  
96 -  
97 - if (glosaRequest != null) 102 + if (base.isPlaying())
98 { 103 {
99 - loading_snippet.SetActive(true);  
100 - yield return glosaRequest;  
101 - loading_snippet.SetActive(false); 104 + Debug.Log("isPlaying");
  105 + this.textButton.SetActive(false);
  106 + this.pauseButton.SetActive(true);
102 107
103 - if ( ! String.IsNullOrEmpty(glosaRequest.text)) 108 + if (base.isPaused())
104 { 109 {
105 - base.glosa = glosaRequest.text;  
106 - Debug.Log("Server answer: " + glosa); 110 + Debug.Log("~~~ isPaused");
  111 + this.pauseButtonImage.switchAttribute(false);
107 } 112 }
108 else 113 else
109 { 114 {
110 - base.glosa = base.glosa.ToUpper();  
111 - Debug.Log("No answer: " + glosa); 115 + Debug.Log("~~~ isPaused FALSE");
  116 + this.pauseButtonImage.switchAttribute(true);
112 } 117 }
113 } 118 }
114 - else Debug.Log ("eita"); 119 + else
  120 + {
  121 + Debug.Log("isPlaying FALSE");
  122 + this.textButton.SetActive(true);
  123 + this.pauseButton.SetActive(false);
  124 + }
115 125
116 - base.play(); 126 + Debug.Log("onPlayingStateChange END");
117 } 127 }
118 128
119 - public void start_inputfield_play(string glosa) 129 + // Called from microphone icon at main interface
  130 + public void callVoiceRecognizer()
120 { 131 {
121 - try {  
122 - base.glosa = glosa;  
123 - StartCoroutine("translate");  
124 - }  
125 - catch (Exception e) {  
126 - Debug.Log (e+" :: Exception StartCourr");  
127 - } 132 + StartCoroutine("CallVoiceRecognizer");
128 } 133 }
129 134
130 - public void start_inputfield_web_play()  
131 - {  
132 - try {  
133 - base.glosa = INFIELD.text;  
134 - StartCoroutine("translate");  
135 - }  
136 - catch (Exception e) {  
137 - Debug.Log (e+" :: Exception StartCourr");  
138 - }  
139 - } 135 + private bool thereIsConnection = false;
140 136
141 - protected IEnumerator waitForRequest(WWW www) 137 + private IEnumerator CallVoiceRecognizer()
142 { 138 {
143 - yield return www.isDone; 139 + if ( ! this.thereIsConnection)
  140 + {
  141 + this.thereIsConnection = true;
144 142
145 - // check for errors  
146 - if (www.error == null)  
147 - Debug.Log("WWW Ok!: " + www.text);  
148 - else  
149 - Debug.Log("WWW Error: "+ www.error);  
150 - } 143 + float timeTaken = 0.0F;
  144 + float maxTime = 2.0F;
  145 +
  146 + Ping testPing = new Ping("https://www.google.com.br");
151 147
152 - // Called from microphone icon at main interface  
153 - public void callVoiceRecognizer()  
154 - {  
155 - CheckConnection();  
156 - if(thereIsConnection)  
157 - {  
158 - base.glosa = voiceRecognizer.callRecognition();  
159 - if(!base.glosa.Equals("")) 148 + while ( ! testPing.isDone)
160 { 149 {
161 - StartCoroutine(translate ()); 150 + timeTaken += Time.deltaTime;
  151 +
  152 + if (timeTaken > maxTime)
  153 + {
  154 + this.thereIsConnection = false;
  155 + break;
  156 + }
  157 +
  158 + yield return null;
162 } 159 }
163 } 160 }
164 - else 161 +
  162 + if (this.thereIsConnection)
165 { 163 {
  164 + string glosa = voiceRecognizer.callRecognition();
166 165
167 - Debug.Log("NO NET");  
168 - DisplayConnectionError();  
169 - //base.voiceRecognizer.callConnectionError();  
170 - //base.voiceRecognizer.callConnectionError(); 166 + if ( ! glosa.Equals(""))
  167 + StartCoroutine("translate", glosa);
171 } 168 }
172 - //base.voiceRecognizer.callConnectionError();*/ 169 + else setConnectionErrorMessageStatus(true);
173 } 170 }
174 171
175 - void CheckConnection() 172 + private IEnumerator translate(string glosa)
176 { 173 {
177 - thereIsConnection = false;  
178 - WWW www = new WWW("https://www.google.com.br");  
179 - waitForRequest(www); 174 + WWW glosaRequest = new WWW(SERVER_URL + WWW.EscapeURL(glosa));
  175 + glosa = glosa.ToUpper();
180 176
181 - if(www.bytesDownloaded > 0){  
182 - thereIsConnection = true;  
183 - //Debug.Log("connection ok");  
184 - }  
185 - else{  
186 - Debug.Log("no connection");  
187 - thereIsConnection = false;  
188 - 177 + if (glosaRequest != null)
  178 + {
  179 + loading_snippet.SetActive(true);
  180 + yield return glosaRequest.isDone;
  181 + loading_snippet.SetActive(false);
  182 +
  183 + if (glosaRequest.error != null)
  184 + {
  185 + if ( ! String.IsNullOrEmpty(glosaRequest.text))
  186 + {
  187 + Debug.Log("Server answer: " + glosaRequest.text);
  188 + glosa = glosaRequest.text;
  189 + }
  190 + else Debug.Log("Error at PlayerManager.translate: empty answer.");
  191 + }
  192 + else Debug.Log("Error at PlayerManager.translate: (WWW) glosaRequest: " + glosaRequest.error);
189 } 193 }
190 - } 194 + else Debug.Log ("Error at PlayerManager.translate: (WWW) glosaRequest is NULL.");
191 195
192 - void DisplayConnectionError(){  
193 - canvas_connection_error.enabled = true;  
194 - SetAvatarCollider(false);  
195 - ScreenReferences.HOME_SCREEN = false; 196 + base.play();
196 } 197 }
197 - public void HideConnectionError(){  
198 - canvas_connection_error.enabled = false;  
199 - SetAvatarCollider(true);  
200 - ScreenReferences.HOME_SCREEN = true; 198 +
  199 + /*private void CheckConnection()
  200 + {
  201 + this.thereIsConnection = false;
  202 +
  203 + WWW www = new WWW("https://www.google.com.br");
  204 + waitForRequest(www);
  205 +
  206 + this.thereIsConnection = www.bytesDownloaded > 0;
  207 + }*/
  208 +
  209 + private void setConnectionErrorMessageStatus(bool enabled)
  210 + {
  211 + canvas_connection_error.enabled = enabled;
  212 + SetAvatarCollider( ! enabled);
  213 + ScreenReferences.HOME_SCREEN = ! enabled;
201 } 214 }
  215 +
202 } 216 }
Assets/Scripts/UI/SwitchImageColor.cs
@@ -6,9 +6,6 @@ public class SwitchImageColor : SwitchImageAttribute { @@ -6,9 +6,6 @@ public class SwitchImageColor : SwitchImageAttribute {
6 6
7 public Color enabledColor = new Color(0.31F, 0.75F, 0.913F, 1F); 7 public Color enabledColor = new Color(0.31F, 0.75F, 0.913F, 1F);
8 public Color disabledColor = new Color(1F, 1F, 1F, 1F); 8 public Color disabledColor = new Color(1F, 1F, 1F, 1F);
9 -  
10 - private Graphic buttonGraphic;  
11 -  
12 9
13 public override void updateAttribute() 10 public override void updateAttribute()
14 { 11 {
Assets/Scripts/VoiceRecognition.cs
@@ -25,28 +25,26 @@ using System.Collections; @@ -25,28 +25,26 @@ using System.Collections;
25 using UnityEngine.UI; 25 using UnityEngine.UI;
26 using System; 26 using System;
27 27
28 -public class VoiceRecognition{ 28 +public class VoiceRecognition {
29 29
30 AndroidJavaClass unity; 30 AndroidJavaClass unity;
31 AndroidJavaObject currentActivity; 31 AndroidJavaObject currentActivity;
32 32
33 string voiceText = ""; 33 string voiceText = "";
34 34
35 -  
36 - // Constructor  
37 public VoiceRecognition() 35 public VoiceRecognition()
38 { 36 {
39 - #if !UNITY_EDITOR  
40 - unity = new AndroidJavaClass ("com.unity3d.player.UnityPlayer");  
41 - currentActivity = unity.GetStatic<AndroidJavaObject> ("currentActivity");  
42 - #endif 37 +#if !UNITY_EDITOR
  38 + unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
  39 + currentActivity = unity.GetStatic<AndroidJavaObject>("currentActivity");
  40 +#endif
43 } 41 }
44 42
45 // Calls Google Speech from plugin method and returns recognized text 43 // Calls Google Speech from plugin method and returns recognized text
46 public string callRecognition() 44 public string callRecognition()
47 { 45 {
48 #if !UNITY_EDITOR 46 #if !UNITY_EDITOR
49 - voiceText = currentActivity.Call<string> ("callGoogleSpeech"); 47 + voiceText = currentActivity.Call<string>("callGoogleSpeech");
50 #endif 48 #endif
51 49
52 return voiceText; 50 return voiceText;