Commit 3437a483728b1879c7e8de4109826c33623b8150

Authored by Mateus Lustosa
1 parent 470ec4ee

Terminando pause menu

.gitignore
... ... @@ -2,6 +2,9 @@
2 2 /[Tt]emp/
3 3 /[Oo]bj/
4 4 /[Bb]uild/
  5 +BUILDS/
  6 +DESIGN/
  7 +
5 8  
6 9 # Autogenerated VS/MD solution and project files
7 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 @@
  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 959 m_Children: []
960 960 m_Father: {fileID: 1024302432}
961 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 966 m_Pivot: {x: .5, y: .5}
967 967 --- !u!114 &112837685
968 968 MonoBehaviour:
... ... @@ -1026,7 +1026,7 @@ MonoBehaviour:
1026 1026 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
1027 1027 m_Sprite: {fileID: 21300000, guid: fbf55ea1f2e12da4799c1ac527f37b6e, type: 3}
1028 1028 m_Type: 0
1029   - m_PreserveAspect: 0
  1029 + m_PreserveAspect: 1
1030 1030 m_FillCenter: 1
1031 1031 m_FillMethod: 4
1032 1032 m_FillAmount: 1
... ... @@ -3785,6 +3785,136 @@ CanvasRenderer:
3785 3785 type: 2}
3786 3786 m_PrefabInternal: {fileID: 0}
3787 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 3918 --- !u!1 &460696035
3789 3919 GameObject:
3790 3920 m_ObjectHideFlags: 0
... ... @@ -5366,7 +5496,7 @@ RectTransform:
5366 5496 m_AnchorMin: {x: .0500000007, y: .699999988}
5367 5497 m_AnchorMax: {x: .949999988, y: .879999995}
5368 5498 m_AnchoredPosition: {x: 0, y: 0}
5369   - m_SizeDelta: {x: 0, y: 0}
  5499 + m_SizeDelta: {x: 0, y: -61.4925079}
5370 5500 m_Pivot: {x: .5, y: 1}
5371 5501 --- !u!114 &568220611
5372 5502 MonoBehaviour:
... ... @@ -5507,6 +5637,9 @@ MonoBehaviour:
5507 5637 loading_snippet: {fileID: 1439902017}
5508 5638 INFIELD: {fileID: 1886290661}
5509 5639 canvas_connection_error: {fileID: 1164416490}
  5640 + textButton: {fileID: 0}
  5641 + pauseButton: {fileID: 0}
  5642 + pauseMenu: {fileID: 1024302431}
5510 5643 --- !u!114 &578311383
5511 5644 MonoBehaviour:
5512 5645 m_ObjectHideFlags: 0
... ... @@ -8051,7 +8184,7 @@ MonoBehaviour:
8051 8184 isEnabled: 0
8052 8185 updateReference: {fileID: 0}
8053 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 8188 --- !u!114 &930426945
8056 8189 MonoBehaviour:
8057 8190 m_ObjectHideFlags: 0
... ... @@ -8072,7 +8205,7 @@ MonoBehaviour:
8072 8205 m_SelectOnRight: {fileID: 0}
8073 8206 m_Transition: 1
8074 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 8209 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
8077 8210 m_PressedColor: {r: .572549045, g: .752941251, b: .811764777, a: 1}
8078 8211 m_DisabledColor: {r: .792156875, g: .792156875, b: .792156875, a: 1}
... ... @@ -8129,7 +8262,7 @@ MonoBehaviour:
8129 8262 m_Name:
8130 8263 m_EditorClassIdentifier:
8131 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 8266 m_RaycastTarget: 1
8134 8267 m_OnCullStateChanged:
8135 8268 m_PersistentCalls:
... ... @@ -8609,7 +8742,7 @@ GameObject:
8609 8742 m_Icon: {fileID: 0}
8610 8743 m_NavMeshLayer: 0
8611 8744 m_StaticEditorFlags: 0
8612   - m_IsActive: 1
  8745 + m_IsActive: 0
8613 8746 --- !u!224 &951727302
8614 8747 RectTransform:
8615 8748 m_ObjectHideFlags: 0
... ... @@ -9247,17 +9380,17 @@ RectTransform:
9247 9380 m_GameObject: {fileID: 1024302431}
9248 9381 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
9249 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 9384 m_Children:
9252 9385 - {fileID: 1525727530}
9253 9386 - {fileID: 1085279172}
9254 9387 - {fileID: 112837684}
9255 9388 m_Father: {fileID: 1252650593}
9256 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 9392 m_AnchoredPosition: {x: 0, y: 0}
9260   - m_SizeDelta: {x: 451, y: 139}
  9393 + m_SizeDelta: {x: 0, y: 0}
9261 9394 m_Pivot: {x: .5, y: .5}
9262 9395 --- !u!114 &1024302433
9263 9396 MonoBehaviour:
... ... @@ -10141,14 +10274,14 @@ RectTransform:
10141 10274 m_GameObject: {fileID: 1085279171}
10142 10275 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
10143 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 10278 m_Children: []
10146 10279 m_Father: {fileID: 1024302432}
10147 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 10283 m_AnchoredPosition: {x: 0, y: 0}
10151   - m_SizeDelta: {x: 55, y: 67}
  10284 + m_SizeDelta: {x: 0, y: 0}
10152 10285 m_Pivot: {x: .5, y: .5}
10153 10286 --- !u!114 &1085279173
10154 10287 MonoBehaviour:
... ... @@ -10212,7 +10345,7 @@ MonoBehaviour:
10212 10345 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10213 10346 m_Sprite: {fileID: 21300000, guid: 5324882cb6bf20141b5cff66b4764ffb, type: 3}
10214 10347 m_Type: 0
10215   - m_PreserveAspect: 0
  10348 + m_PreserveAspect: 1
10216 10349 m_FillCenter: 1
10217 10350 m_FillMethod: 4
10218 10351 m_FillAmount: 1
... ... @@ -10997,7 +11130,7 @@ RectTransform:
10997 11130 m_AnchorMin: {x: .0500000007, y: .200000003}
10998 11131 m_AnchorMax: {x: .949999988, y: .879999995}
10999 11132 m_AnchoredPosition: {x: 0, y: 0}
11000   - m_SizeDelta: {x: 0, y: 0}
  11133 + m_SizeDelta: {x: 0, y: -341.992493}
11001 11134 m_Pivot: {x: .5, y: 1}
11002 11135 --- !u!114 &1149571752
11003 11136 MonoBehaviour:
... ... @@ -15281,14 +15414,14 @@ RectTransform:
15281 15414 m_GameObject: {fileID: 1525727529}
15282 15415 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
15283 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 15418 m_Children: []
15286 15419 m_Father: {fileID: 1024302432}
15287 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 15425 m_Pivot: {x: .5, y: .5}
15293 15426 --- !u!114 &1525727531
15294 15427 MonoBehaviour:
... ... @@ -15352,9 +15485,9 @@ MonoBehaviour:
15352 15485 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
15353 15486 m_Sprite: {fileID: 21300000, guid: 72a95df012b6995419d116db373691db, type: 3}
15354 15487 m_Type: 0
15355   - m_PreserveAspect: 0
  15488 + m_PreserveAspect: 1
15356 15489 m_FillCenter: 1
15357   - m_FillMethod: 4
  15490 + m_FillMethod: 2
15358 15491 m_FillAmount: 1
15359 15492 m_FillClockwise: 1
15360 15493 m_FillOrigin: 0
... ... @@ -16791,7 +16924,7 @@ RectTransform:
16791 16924 m_LocalScale: {x: 1, y: 1, z: 1}
16792 16925 m_Children: []
16793 16926 m_Father: {fileID: 2045088296}
16794   - m_RootOrder: 2
  16927 + m_RootOrder: 3
16795 16928 m_AnchorMin: {x: 0, y: 0}
16796 16929 m_AnchorMax: {x: 0, y: 0}
16797 16930 m_AnchoredPosition: {x: 0, y: 0}
... ... @@ -16812,7 +16945,7 @@ MonoBehaviour:
16812 16945 isEnabled: 0
16813 16946 updateReference: {fileID: 1649730297}
16814 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 16949 --- !u!114 &1649730300
16817 16950 MonoBehaviour:
16818 16951 m_ObjectHideFlags: 0
... ... @@ -16833,7 +16966,7 @@ MonoBehaviour:
16833 16966 m_SelectOnRight: {fileID: 0}
16834 16967 m_Transition: 1
16835 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 16970 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
16838 16971 m_PressedColor: {r: .600000024, g: .823529482, b: .898039281, a: 1}
16839 16972 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
... ... @@ -16879,7 +17012,7 @@ MonoBehaviour:
16879 17012 m_Name:
16880 17013 m_EditorClassIdentifier:
16881 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 17016 m_RaycastTarget: 1
16884 17017 m_OnCullStateChanged:
16885 17018 m_PersistentCalls:
... ... @@ -17671,7 +17804,7 @@ RectTransform:
17671 17804 m_LocalScale: {x: 1, y: 1, z: 1}
17672 17805 m_Children: []
17673 17806 m_Father: {fileID: 2045088296}
17674   - m_RootOrder: 3
  17807 + m_RootOrder: 4
17675 17808 m_AnchorMin: {x: 0, y: 0}
17676 17809 m_AnchorMax: {x: 0, y: 0}
17677 17810 m_AnchoredPosition: {x: 0, y: 0}
... ... @@ -17692,7 +17825,7 @@ MonoBehaviour:
17692 17825 isEnabled: 1
17693 17826 updateReference: {fileID: 1728688478}
17694 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 17829 --- !u!114 &1728688481
17697 17830 MonoBehaviour:
17698 17831 m_ObjectHideFlags: 0
... ... @@ -17713,7 +17846,7 @@ MonoBehaviour:
17713 17846 m_SelectOnRight: {fileID: 0}
17714 17847 m_Transition: 1
17715 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 17850 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
17718 17851 m_PressedColor: {r: .600000024, g: .823529482, b: .898039281, a: 1}
17719 17852 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
... ... @@ -20014,7 +20147,7 @@ RectTransform:
20014 20147 m_Father: {fileID: 1079363870}
20015 20148 m_RootOrder: 0
20016 20149 m_AnchorMin: {x: 0, y: 0}
20017   - m_AnchorMax: {x: 0, y: 0}
  20150 + m_AnchorMax: {x: 1, y: 1}
20018 20151 m_AnchoredPosition: {x: 0, y: 0}
20019 20152 m_SizeDelta: {x: 20, y: 20}
20020 20153 m_Pivot: {x: .5, y: .5}
... ... @@ -21151,6 +21284,7 @@ RectTransform:
21151 21284 m_LocalScale: {x: 1, y: 1, z: 1}
21152 21285 m_Children:
21153 21286 - {fileID: 930426943}
  21287 + - {fileID: 440527254}
21154 21288 - {fileID: 2083881766}
21155 21289 - {fileID: 1649730298}
21156 21290 - {fileID: 1728688479}
... ... @@ -21409,7 +21543,7 @@ RectTransform:
21409 21543 m_LocalScale: {x: 1, y: 1, z: 1}
21410 21544 m_Children: []
21411 21545 m_Father: {fileID: 2045088296}
21412   - m_RootOrder: 4
  21546 + m_RootOrder: 5
21413 21547 m_AnchorMin: {x: 0, y: 0}
21414 21548 m_AnchorMax: {x: 0, y: 0}
21415 21549 m_AnchoredPosition: {x: 0, y: 0}
... ... @@ -21430,7 +21564,7 @@ MonoBehaviour:
21430 21564 isEnabled: 0
21431 21565 updateReference: {fileID: 0}
21432 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 21568 --- !u!114 &2079280006
21435 21569 MonoBehaviour:
21436 21570 m_ObjectHideFlags: 0
... ... @@ -21451,7 +21585,7 @@ MonoBehaviour:
21451 21585 m_SelectOnRight: {fileID: 0}
21452 21586 m_Transition: 1
21453 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 21589 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
21456 21590 m_PressedColor: {r: .592156887, g: .815686345, b: .890196145, a: 1}
21457 21591 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
... ... @@ -21508,7 +21642,7 @@ MonoBehaviour:
21508 21642 m_Name:
21509 21643 m_EditorClassIdentifier:
21510 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 21646 m_RaycastTarget: 1
21513 21647 m_OnCullStateChanged:
21514 21648 m_PersistentCalls:
... ... @@ -21560,7 +21694,7 @@ RectTransform:
21560 21694 m_LocalScale: {x: 1, y: 1, z: 1}
21561 21695 m_Children: []
21562 21696 m_Father: {fileID: 2045088296}
21563   - m_RootOrder: 1
  21697 + m_RootOrder: 2
21564 21698 m_AnchorMin: {x: 0, y: 0}
21565 21699 m_AnchorMax: {x: 0, y: 0}
21566 21700 m_AnchoredPosition: {x: 0, y: 0}
... ... @@ -21586,7 +21720,7 @@ MonoBehaviour:
21586 21720 m_SelectOnRight: {fileID: 0}
21587 21721 m_Transition: 1
21588 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 21724 m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
21591 21725 m_PressedColor: {r: .588235319, g: .80392164, b: .878431439, a: 1}
21592 21726 m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
... ... @@ -21632,7 +21766,7 @@ MonoBehaviour:
21632 21766 m_Name:
21633 21767 m_EditorClassIdentifier:
21634 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 21770 m_RaycastTarget: 1
21637 21771 m_OnCullStateChanged:
21638 21772 m_PersistentCalls:
... ...
Assets/Scripts/Animation List/ListManager.cs
... ... @@ -148,8 +148,6 @@ public class ListManager : MonoBehaviour {
148 148  
149 149 private void changeLoadingState(bool active)
150 150 {
151   - Debug.Log(active ? "Loading..." : "Done");
152   -
153 151 if (isLoading != active)
154 152 {
155 153 this.loadingItem.transform.SetParent(active ? contentPanel : null);
... ...
Assets/Scripts/Animation List/SampleItem.cs
... ... @@ -9,7 +9,7 @@ public class SampleItem : MonoBehaviour {
9 9  
10 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 117 }
118 118  
119 119  
120   - public void stop_animations()
  120 + public void stopAll()
121 121 {
122 122 StopCoroutine("loadAndPlay");
123 123 loading = false;
... ... @@ -188,7 +188,7 @@ public abstract class GenericPlayerManager : MonoBehaviour {
188 188 protected abstract void onPlayingStateChange();
189 189  
190 190  
191   - public void switchPauseState(bool paused)
  191 + public void setPauseState(bool paused)
192 192 {
193 193 if (this.paused != paused)
194 194 {
... ... @@ -201,15 +201,11 @@ public abstract class GenericPlayerManager : MonoBehaviour {
201 201 onPlayingStateChange();
202 202 }
203 203 }
204   - public void switchPauseState()
205   - {
206   - switchPauseState( ! paused);
207   - }
208 204  
209 205 public bool play()
210 206 {
211 207 if (playing)
212   - switchPauseState();
  208 + setPauseState( ! paused);
213 209 else
214 210 play(true, true, true);
215 211  
... ... @@ -228,7 +224,7 @@ public abstract class GenericPlayerManager : MonoBehaviour {
228 224 if (loading)
229 225 {
230 226 if (stopLoading)
231   - stop_animations();
  227 + stopAll();
232 228 else
233 229 return false;
234 230 }
... ... @@ -371,28 +367,19 @@ public abstract class GenericPlayerManager : MonoBehaviour {
371 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 374 playAnimation(Subtitle.TYPE_WORD, aniName, "");
  375 + }
393 376 else
394   - playAnimation(Subtitle.TYPE_WORD, aniName);*/
  377 + {
  378 + lastAnimationSubtitle = aniName;
  379 + playAnimation(Subtitle.TYPE_WORD, aniName);
  380 + }
395 381 }
  382 +
396 383 // Soletra palavra
397 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 3 // requisiçao http get no unity
4 4 // vlibras.lavid.ufpb.br:5000/glosa?texto=CASA%LAVID%123
... ... @@ -23,45 +23,56 @@ public class PlayerManager : GenericPlayerManager {
23 23 //private const string BASE_URL = "http://150.165.205.9/anims/AssetBundles/0_DefaultBundles/";
24 24 public InputField INFIELD;
25 25 private int version = 1;
26   - private bool thereIsConnection;
27 26 public Canvas canvas_connection_error;
28 27  
29 28 private string[] randomAnimationNames = new string[] {
30 29 "[BOCEJAR]",
31 30 "[COCHILAR]",
32 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 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 49 base.setRandomAnimations(new RandomAnimations(this, randomAnimationNames, 2, 1F), randomAnimationNames);
39 50 base.Start();
40 51  
41   - Application.ExternalCall("onLoadPlayer");//var onLoadPlayer = function(){}
  52 + // DEBUG: var onLoadPlayer = function(){}
  53 + Application.ExternalCall("onLoadPlayer");
42 54 voiceRecognizer = new VoiceRecognition();
43 55 Screen.fullScreen = false;
44 56 }
45 57  
46 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 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 78 protected override WWW loadAssetBundle(string aniName)
... ... @@ -84,119 +95,122 @@ public class PlayerManager : GenericPlayerManager {
84 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 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 6  
7 7 public Color enabledColor = new Color(0.31F, 0.75F, 0.913F, 1F);
8 8 public Color disabledColor = new Color(1F, 1F, 1F, 1F);
9   -
10   - private Graphic buttonGraphic;
11   -
12 9  
13 10 public override void updateAttribute()
14 11 {
... ...
Assets/Scripts/VoiceRecognition.cs
... ... @@ -25,28 +25,26 @@ using System.Collections;
25 25 using UnityEngine.UI;
26 26 using System;
27 27  
28   -public class VoiceRecognition{
  28 +public class VoiceRecognition {
29 29  
30 30 AndroidJavaClass unity;
31 31 AndroidJavaObject currentActivity;
32 32  
33 33 string voiceText = "";
34 34  
35   -
36   - // Constructor
37 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 43 // Calls Google Speech from plugin method and returns recognized text
46 44 public string callRecognition()
47 45 {
48 46 #if !UNITY_EDITOR
49   - voiceText = currentActivity.Call<string> ("callGoogleSpeech");
  47 + voiceText = currentActivity.Call<string>("callGoogleSpeech");
50 48 #endif
51 49  
52 50 return voiceText;
... ...