Commit 562006cc07aadff9d10b7c16e659ce75dcb7858b
1 parent
2fa11711
Exists in
master
and in
8 other branches
Ajustes no cscript de resoluçcao da tela de informacoes.
Showing
3 changed files
with
104 additions
and
38 deletions
Show diff stats
Assets/Scenes/Main.unity
... | ... | @@ -250,7 +250,7 @@ RectTransform: |
250 | 250 | m_Father: {fileID: 28912434} |
251 | 251 | m_RootOrder: 0 |
252 | 252 | m_AnchorMin: {x: 0, y: 0} |
253 | - m_AnchorMax: {x: 0, y: 0} | |
253 | + m_AnchorMax: {x: .5, y: 1} | |
254 | 254 | m_AnchoredPosition: {x: 0, y: 0} |
255 | 255 | m_SizeDelta: {x: 10, y: 0} |
256 | 256 | m_Pivot: {x: .5, y: .5} |
... | ... | @@ -1457,7 +1457,7 @@ GameObject: |
1457 | 1457 | m_Icon: {fileID: 0} |
1458 | 1458 | m_NavMeshLayer: 0 |
1459 | 1459 | m_StaticEditorFlags: 0 |
1460 | - m_IsActive: 1 | |
1460 | + m_IsActive: 0 | |
1461 | 1461 | --- !u!224 &317863997 |
1462 | 1462 | RectTransform: |
1463 | 1463 | m_ObjectHideFlags: 0 |
... | ... | @@ -4103,7 +4103,7 @@ RectTransform: |
4103 | 4103 | m_RootOrder: 2 |
4104 | 4104 | m_AnchorMin: {x: .5, y: 0} |
4105 | 4105 | m_AnchorMax: {x: .5, y: 0} |
4106 | - m_AnchoredPosition: {x: 0, y: 850} | |
4106 | + m_AnchoredPosition: {x: 0, y: 860} | |
4107 | 4107 | m_SizeDelta: {x: 315.64801, y: 131.328003} |
4108 | 4108 | m_Pivot: {x: .5, y: .5} |
4109 | 4109 | --- !u!114 &756283914 |
... | ... | @@ -4372,6 +4372,7 @@ RectTransform: |
4372 | 4372 | - {fileID: 2105787743} |
4373 | 4373 | - {fileID: 1800578778} |
4374 | 4374 | - {fileID: 1927199758} |
4375 | + - {fileID: 1646487365} | |
4375 | 4376 | m_Father: {fileID: 0} |
4376 | 4377 | m_RootOrder: 5 |
4377 | 4378 | m_AnchorMin: {x: 0, y: 0} |
... | ... | @@ -4624,9 +4625,9 @@ MonoBehaviour: |
4624 | 4625 | m_Color: {r: .992156923, g: .815686345, b: .00392156886, a: 1} |
4625 | 4626 | m_FontData: |
4626 | 4627 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} |
4627 | - m_FontSize: 20 | |
4628 | + m_FontSize: 66 | |
4628 | 4629 | m_FontStyle: 1 |
4629 | - m_BestFit: 1 | |
4630 | + m_BestFit: 0 | |
4630 | 4631 | m_MinSize: 30 |
4631 | 4632 | m_MaxSize: 60 |
4632 | 4633 | m_Alignment: 4 |
... | ... | @@ -5880,8 +5881,8 @@ RectTransform: |
5880 | 5881 | m_RootOrder: 1 |
5881 | 5882 | m_AnchorMin: {x: 0, y: 0} |
5882 | 5883 | m_AnchorMax: {x: 1, y: 0} |
5883 | - m_AnchoredPosition: {x: 0, y: 32.75} | |
5884 | - m_SizeDelta: {x: 0, y: 65.5} | |
5884 | + m_AnchoredPosition: {x: 0, y: 300} | |
5885 | + m_SizeDelta: {x: -24, y: 300} | |
5885 | 5886 | m_Pivot: {x: .5, y: .5} |
5886 | 5887 | --- !u!114 &1066268160 |
5887 | 5888 | MonoBehaviour: |
... | ... | @@ -6219,8 +6220,8 @@ RectTransform: |
6219 | 6220 | m_Children: [] |
6220 | 6221 | m_Father: {fileID: 836162931} |
6221 | 6222 | m_RootOrder: 0 |
6222 | - m_AnchorMin: {x: 0, y: 0} | |
6223 | - m_AnchorMax: {x: 0, y: 0} | |
6223 | + m_AnchorMin: {x: .5, y: 0} | |
6224 | + m_AnchorMax: {x: .5, y: 1} | |
6224 | 6225 | m_AnchoredPosition: {x: 0, y: 0} |
6225 | 6226 | m_SizeDelta: {x: 84, y: 0} |
6226 | 6227 | m_Pivot: {x: .5, y: .5} |
... | ... | @@ -8295,7 +8296,7 @@ MonoBehaviour: |
8295 | 8296 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} |
8296 | 8297 | m_FontSize: 60 |
8297 | 8298 | m_FontStyle: 1 |
8298 | - m_BestFit: 1 | |
8299 | + m_BestFit: 0 | |
8299 | 8300 | m_MinSize: 10 |
8300 | 8301 | m_MaxSize: 30 |
8301 | 8302 | m_Alignment: 7 |
... | ... | @@ -9908,6 +9909,66 @@ CanvasRenderer: |
9908 | 9909 | type: 2} |
9909 | 9910 | m_PrefabInternal: {fileID: 0} |
9910 | 9911 | m_GameObject: {fileID: 1621592085} |
9912 | +--- !u!1 &1646487364 | |
9913 | +GameObject: | |
9914 | + m_ObjectHideFlags: 0 | |
9915 | + m_PrefabParentObject: {fileID: 0} | |
9916 | + m_PrefabInternal: {fileID: 0} | |
9917 | + serializedVersion: 4 | |
9918 | + m_Component: | |
9919 | + - 224: {fileID: 1646487365} | |
9920 | + - 222: {fileID: 1646487367} | |
9921 | + - 114: {fileID: 1646487366} | |
9922 | + m_Layer: 5 | |
9923 | + m_Name: debugLine | |
9924 | + m_TagString: Untagged | |
9925 | + m_Icon: {fileID: 0} | |
9926 | + m_NavMeshLayer: 0 | |
9927 | + m_StaticEditorFlags: 0 | |
9928 | + m_IsActive: 0 | |
9929 | +--- !u!224 &1646487365 | |
9930 | +RectTransform: | |
9931 | + m_ObjectHideFlags: 0 | |
9932 | + m_PrefabParentObject: {fileID: 0} | |
9933 | + m_PrefabInternal: {fileID: 0} | |
9934 | + m_GameObject: {fileID: 1646487364} | |
9935 | + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |
9936 | + m_LocalPosition: {x: 0, y: 0, z: 0} | |
9937 | + m_LocalScale: {x: 1, y: 1, z: 1} | |
9938 | + m_Children: [] | |
9939 | + m_Father: {fileID: 782282766} | |
9940 | + m_RootOrder: 12 | |
9941 | + m_AnchorMin: {x: 0, y: .5} | |
9942 | + m_AnchorMax: {x: 1, y: .5} | |
9943 | + m_AnchoredPosition: {x: 0, y: 0} | |
9944 | + m_SizeDelta: {x: 0, y: 1} | |
9945 | + m_Pivot: {x: .5, y: .5} | |
9946 | +--- !u!114 &1646487366 | |
9947 | +MonoBehaviour: | |
9948 | + m_ObjectHideFlags: 0 | |
9949 | + m_PrefabParentObject: {fileID: 0} | |
9950 | + m_PrefabInternal: {fileID: 0} | |
9951 | + m_GameObject: {fileID: 1646487364} | |
9952 | + m_Enabled: 1 | |
9953 | + m_EditorHideFlags: 0 | |
9954 | + m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
9955 | + m_Name: | |
9956 | + m_EditorClassIdentifier: | |
9957 | + m_Material: {fileID: 0} | |
9958 | + m_Color: {r: 1, g: 0, b: 0, a: 1} | |
9959 | + m_Texture: {fileID: 0} | |
9960 | + m_UVRect: | |
9961 | + serializedVersion: 2 | |
9962 | + x: 0 | |
9963 | + y: 0 | |
9964 | + width: 1 | |
9965 | + height: 1 | |
9966 | +--- !u!222 &1646487367 | |
9967 | +CanvasRenderer: | |
9968 | + m_ObjectHideFlags: 0 | |
9969 | + m_PrefabParentObject: {fileID: 0} | |
9970 | + m_PrefabInternal: {fileID: 0} | |
9971 | + m_GameObject: {fileID: 1646487364} | |
9911 | 9972 | --- !u!1 &1665948602 |
9912 | 9973 | GameObject: |
9913 | 9974 | m_ObjectHideFlags: 0 |
... | ... | @@ -10506,7 +10567,7 @@ GameObject: |
10506 | 10567 | m_Icon: {fileID: 0} |
10507 | 10568 | m_NavMeshLayer: 0 |
10508 | 10569 | m_StaticEditorFlags: 0 |
10509 | - m_IsActive: 0 | |
10570 | + m_IsActive: 1 | |
10510 | 10571 | --- !u!224 &1740734479 |
10511 | 10572 | RectTransform: |
10512 | 10573 | m_ObjectHideFlags: 0 | ... | ... |
Assets/Scripts/UIManagers/UIManagerInfo.cs
... | ... | @@ -10,43 +10,62 @@ public class UIManagerInfo : UIManager { |
10 | 10 | public Button tutorial; |
11 | 11 | public Image info; |
12 | 12 | |
13 | + | |
14 | + private float getTranslatedY(float y, float scale) | |
15 | + { | |
16 | + return Screen.height - ((Screen.height - y) * scale); | |
17 | + } | |
18 | + | |
13 | 19 | protected override void rebuild(float scale) |
14 | 20 | { |
21 | + Vector3 scaleVector = new Vector3(scale, scale, 1); | |
22 | + | |
15 | 23 | // bar |
16 | 24 | { |
17 | - bar.transform.localScale = new Vector3(scale, scale, 1); | |
18 | - bar.transform.position -= new Vector3(0, 165 * (1F - scale), 0); | |
25 | + bar.transform.localScale = scaleVector; | |
26 | + | |
27 | + Vector3 position = bar.transform.position; | |
28 | + position.y *= scale; | |
29 | + bar.transform.position = position; | |
19 | 30 | } |
20 | 31 | |
21 | 32 | // logo |
22 | 33 | { |
23 | - logo.transform.localScale = new Vector3(scale, scale, 1); | |
24 | - logo.transform.position -= new Vector3(0, -160 * (1F - scale), 0); | |
34 | + logo.transform.localScale = scaleVector; | |
35 | + | |
36 | + Vector3 position = logo.transform.position; | |
37 | + position.y = getTranslatedY(position.y, scale); | |
38 | + logo.transform.position = position; | |
25 | 39 | } |
26 | 40 | |
27 | 41 | // back |
28 | 42 | { |
29 | - float dist = 100 * (1F - scale); | |
43 | + back.transform.localScale = scaleVector; | |
30 | 44 | |
31 | - back.transform.localScale = new Vector3(scale, scale, 1); | |
32 | - back.transform.position -= new Vector3(dist, -dist, 0); | |
45 | + Vector3 position = back.transform.position; | |
46 | + position.x *= scale; | |
47 | + position.y = getTranslatedY(position.y, scale); | |
48 | + back.transform.position = position; | |
33 | 49 | } |
34 | 50 | |
35 | 51 | |
36 | 52 | { |
37 | - facebook.transform.localScale = new Vector3(scale, scale, 1); | |
38 | - facebook.transform.position -= new Vector3(0, 500 * (1F - scale), 0); | |
53 | + facebook.transform.localScale = scaleVector; | |
54 | + | |
55 | + Vector3 position = facebook.transform.position; | |
56 | + position.y *= scale; | |
57 | + facebook.transform.position = position; | |
39 | 58 | } |
40 | 59 | |
41 | 60 | // tutorial |
42 | 61 | { |
43 | - tutorial.transform.localScale = new Vector3(scale, scale, 1); | |
62 | + tutorial.transform.localScale = scaleVector; | |
44 | 63 | tutorial.transform.position -= new Vector3(0, 900 * (1F - scale), 0); |
45 | 64 | } |
46 | 65 | |
47 | 66 | // info |
48 | 67 | { |
49 | - info.transform.localScale = new Vector3(scale, scale, 1); | |
68 | + info.transform.localScale = scaleVector; | |
50 | 69 | } |
51 | 70 | } |
52 | 71 | ... | ... |
ProjectSettings/ProjectSettings.asset
... | ... | @@ -129,28 +129,14 @@ PlayerSettings: |
129 | 129 | m_AndroidBanners: |
130 | 130 | - width: 320 |
131 | 131 | height: 180 |
132 | - banner: {fileID: 0} | |
132 | + banner: {fileID: 2800000, guid: 919bd8c190f26ec48b930878bec99f3e, type: 3} | |
133 | 133 | androidGamepadSupportLevel: 0 |
134 | 134 | resolutionDialogBanner: {fileID: 0} |
135 | 135 | m_BuildTargetIcons: |
136 | 136 | - m_BuildTarget: |
137 | 137 | m_Icons: |
138 | - - m_Icon: {fileID: 0} | |
138 | + - m_Icon: {fileID: 2800000, guid: 919bd8c190f26ec48b930878bec99f3e, type: 3} | |
139 | 139 | m_Size: 128 |
140 | - - m_BuildTarget: Android | |
141 | - m_Icons: | |
142 | - - m_Icon: {fileID: 2800000, guid: 0b4ceb8147fae5749b337e10f5295aad, type: 3} | |
143 | - m_Size: 192 | |
144 | - - m_Icon: {fileID: 0} | |
145 | - m_Size: 144 | |
146 | - - m_Icon: {fileID: 0} | |
147 | - m_Size: 96 | |
148 | - - m_Icon: {fileID: 0} | |
149 | - m_Size: 72 | |
150 | - - m_Icon: {fileID: 0} | |
151 | - m_Size: 48 | |
152 | - - m_Icon: {fileID: 0} | |
153 | - m_Size: 36 | |
154 | 140 | m_BuildTargetBatching: [] |
155 | 141 | m_BuildTargetGraphicsAPIs: [] |
156 | 142 | webPlayerTemplate: APPLICATION:Default | ... | ... |