Commit b68e1b7b93d71ecebe1ff30f0cd103f8eb089d91
1 parent
c16dd6ec
Exists in
master
and in
1 other branch
Adiciona execucao de animacoe na lista. Falta UI.
Showing
8 changed files
with
477 additions
and
29 deletions
Show diff stats
Assets/Prefabs/Item.prefab
| ... | ... | @@ -50,7 +50,6 @@ MonoBehaviour: |
| 50 | 50 | m_EditorClassIdentifier: |
| 51 | 51 | button: {fileID: 11441380} |
| 52 | 52 | title: {fileID: 11481316} |
| 53 | - animationName: | |
| 54 | 53 | --- !u!114 &11420936 |
| 55 | 54 | MonoBehaviour: |
| 56 | 55 | m_ObjectHideFlags: 1 |
| ... | ... | @@ -89,7 +88,7 @@ MonoBehaviour: |
| 89 | 88 | m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} |
| 90 | 89 | m_Name: |
| 91 | 90 | m_EditorClassIdentifier: |
| 92 | - m_IgnoreLayout: 0 | |
| 91 | + m_IgnoreLayout: 1 | |
| 93 | 92 | m_MinWidth: -1 |
| 94 | 93 | m_MinHeight: 36 |
| 95 | 94 | m_PreferredWidth: -1 |
| ... | ... | @@ -135,9 +134,9 @@ MonoBehaviour: |
| 135 | 134 | m_OnClick: |
| 136 | 135 | m_PersistentCalls: |
| 137 | 136 | m_Calls: |
| 138 | - - m_Target: {fileID: 0} | |
| 139 | - m_MethodName: | |
| 140 | - m_Mode: 6 | |
| 137 | + - m_Target: {fileID: 11414388} | |
| 138 | + m_MethodName: StartAnimation | |
| 139 | + m_Mode: 1 | |
| 141 | 140 | m_Arguments: |
| 142 | 141 | m_ObjectArgument: {fileID: 0} |
| 143 | 142 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine |
| ... | ... | @@ -235,6 +234,10 @@ Prefab: |
| 235 | 234 | m_TransformParent: {fileID: 0} |
| 236 | 235 | m_Modifications: |
| 237 | 236 | - target: {fileID: 0} |
| 237 | + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size | |
| 238 | + value: 1 | |
| 239 | + objectReference: {fileID: 0} | |
| 240 | + - target: {fileID: 0} | |
| 238 | 241 | propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState |
| 239 | 242 | value: 2 |
| 240 | 243 | objectReference: {fileID: 0} |
| ... | ... | @@ -250,6 +253,18 @@ Prefab: |
| 250 | 253 | propertyPath: m_TagString |
| 251 | 254 | value: clone |
| 252 | 255 | objectReference: {fileID: 0} |
| 256 | + - target: {fileID: 0} | |
| 257 | + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_BoolArgument | |
| 258 | + value: 0 | |
| 259 | + objectReference: {fileID: 0} | |
| 260 | + - target: {fileID: 0} | |
| 261 | + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode | |
| 262 | + value: 1 | |
| 263 | + objectReference: {fileID: 0} | |
| 264 | + - target: {fileID: 0} | |
| 265 | + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState | |
| 266 | + value: 2 | |
| 267 | + objectReference: {fileID: 0} | |
| 253 | 268 | m_RemovedComponents: [] |
| 254 | 269 | m_ParentPrefab: {fileID: 0} |
| 255 | 270 | m_RootGameObject: {fileID: 129340} | ... | ... |
Assets/Scenes/Scene.unity
| ... | ... | @@ -85,16 +85,261 @@ NavMeshSettings: |
| 85 | 85 | cellSize: .166666657 |
| 86 | 86 | manualCellSize: 0 |
| 87 | 87 | m_NavMeshData: {fileID: 0} |
| 88 | +--- !u!1 &66461437 | |
| 89 | +GameObject: | |
| 90 | + m_ObjectHideFlags: 0 | |
| 91 | + m_PrefabParentObject: {fileID: 126174, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} | |
| 92 | + m_PrefabInternal: {fileID: 0} | |
| 93 | + serializedVersion: 4 | |
| 94 | + m_Component: | |
| 95 | + - 224: {fileID: 66461438} | |
| 96 | + - 222: {fileID: 66461442} | |
| 97 | + - 114: {fileID: 66461441} | |
| 98 | + - 114: {fileID: 66461440} | |
| 99 | + - 114: {fileID: 66461439} | |
| 100 | + m_Layer: 5 | |
| 101 | + m_Name: b_play (1) | |
| 102 | + m_TagString: BUTTONS | |
| 103 | + m_Icon: {fileID: 0} | |
| 104 | + m_NavMeshLayer: 0 | |
| 105 | + m_StaticEditorFlags: 0 | |
| 106 | + m_IsActive: 1 | |
| 107 | +--- !u!224 &66461438 | |
| 108 | +RectTransform: | |
| 109 | + m_ObjectHideFlags: 0 | |
| 110 | + m_PrefabParentObject: {fileID: 22483058, guid: 12db97f21fb2a7d4cb537ec5395de1b9, | |
| 111 | + type: 2} | |
| 112 | + m_PrefabInternal: {fileID: 0} | |
| 113 | + m_GameObject: {fileID: 66461437} | |
| 114 | + m_LocalRotation: {x: 0, y: 0, z: -.707106829, w: .707106709} | |
| 115 | + m_LocalPosition: {x: 0, y: 0, z: 0} | |
| 116 | + m_LocalScale: {x: 1, y: 1, z: 1} | |
| 117 | + m_Children: [] | |
| 118 | + m_Father: {fileID: 217609971} | |
| 119 | + m_RootOrder: 8 | |
| 120 | + m_AnchorMin: {x: .5, y: .5} | |
| 121 | + m_AnchorMax: {x: .5, y: .5} | |
| 122 | + m_AnchoredPosition: {x: 249, y: 1} | |
| 123 | + m_SizeDelta: {x: 25, y: 24} | |
| 124 | + m_Pivot: {x: .5, y: .5} | |
| 125 | +--- !u!114 &66461439 | |
| 126 | +MonoBehaviour: | |
| 127 | + m_ObjectHideFlags: 0 | |
| 128 | + m_PrefabParentObject: {fileID: 11413532, guid: 12db97f21fb2a7d4cb537ec5395de1b9, | |
| 129 | + type: 2} | |
| 130 | + m_PrefabInternal: {fileID: 0} | |
| 131 | + m_GameObject: {fileID: 66461437} | |
| 132 | + m_Enabled: 1 | |
| 133 | + m_EditorHideFlags: 0 | |
| 134 | + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
| 135 | + m_Name: | |
| 136 | + m_EditorClassIdentifier: | |
| 137 | + m_EffectColor: {r: 0, g: 0, b: 0, a: .5} | |
| 138 | + m_EffectDistance: {x: 2, y: -2} | |
| 139 | + m_UseGraphicAlpha: 1 | |
| 140 | +--- !u!114 &66461440 | |
| 141 | +MonoBehaviour: | |
| 142 | + m_ObjectHideFlags: 0 | |
| 143 | + m_PrefabParentObject: {fileID: 11447102, guid: 12db97f21fb2a7d4cb537ec5395de1b9, | |
| 144 | + type: 2} | |
| 145 | + m_PrefabInternal: {fileID: 0} | |
| 146 | + m_GameObject: {fileID: 66461437} | |
| 147 | + m_Enabled: 1 | |
| 148 | + m_EditorHideFlags: 0 | |
| 149 | + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
| 150 | + m_Name: | |
| 151 | + m_EditorClassIdentifier: | |
| 152 | + m_Navigation: | |
| 153 | + m_Mode: 3 | |
| 154 | + m_SelectOnUp: {fileID: 0} | |
| 155 | + m_SelectOnDown: {fileID: 0} | |
| 156 | + m_SelectOnLeft: {fileID: 0} | |
| 157 | + m_SelectOnRight: {fileID: 0} | |
| 158 | + m_Transition: 1 | |
| 159 | + m_Colors: | |
| 160 | + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} | |
| 161 | + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} | |
| 162 | + m_PressedColor: {r: .180392161, g: .200000018, b: .239215702, a: 1} | |
| 163 | + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} | |
| 164 | + m_ColorMultiplier: 1 | |
| 165 | + m_FadeDuration: .100000001 | |
| 166 | + m_SpriteState: | |
| 167 | + m_HighlightedSprite: {fileID: 21300000, guid: 914bc3cccb78352459f03b0bf562b576, | |
| 168 | + type: 3} | |
| 169 | + m_PressedSprite: {fileID: 21300000, guid: b78b05926ed13544580c080d68a89ec3, type: 3} | |
| 170 | + m_DisabledSprite: {fileID: 0} | |
| 171 | + m_AnimationTriggers: | |
| 172 | + m_NormalTrigger: Normal | |
| 173 | + m_HighlightedTrigger: Highlighted | |
| 174 | + m_PressedTrigger: Pressed | |
| 175 | + m_DisabledTrigger: Disabled | |
| 176 | + m_Interactable: 1 | |
| 177 | + m_TargetGraphic: {fileID: 66461441} | |
| 178 | + m_OnClick: | |
| 179 | + m_PersistentCalls: | |
| 180 | + m_Calls: | |
| 181 | + - m_Target: {fileID: 1821807534} | |
| 182 | + m_MethodName: SetActive | |
| 183 | + m_Mode: 6 | |
| 184 | + m_Arguments: | |
| 185 | + m_ObjectArgument: {fileID: 0} | |
| 186 | + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine | |
| 187 | + m_IntArgument: 0 | |
| 188 | + m_FloatArgument: 0 | |
| 189 | + m_StringArgument: | |
| 190 | + m_BoolArgument: 1 | |
| 191 | + m_CallState: 2 | |
| 192 | + - m_Target: {fileID: 217609975} | |
| 193 | + m_MethodName: SwitchStatus | |
| 194 | + m_Mode: 1 | |
| 195 | + m_Arguments: | |
| 196 | + m_ObjectArgument: {fileID: 0} | |
| 197 | + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine | |
| 198 | + m_IntArgument: 0 | |
| 199 | + m_FloatArgument: 0 | |
| 200 | + m_StringArgument: | |
| 201 | + m_BoolArgument: 1 | |
| 202 | + m_CallState: 2 | |
| 203 | + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, | |
| 204 | + Culture=neutral, PublicKeyToken=null | |
| 205 | +--- !u!114 &66461441 | |
| 206 | +MonoBehaviour: | |
| 207 | + m_ObjectHideFlags: 0 | |
| 208 | + m_PrefabParentObject: {fileID: 11447060, guid: 12db97f21fb2a7d4cb537ec5395de1b9, | |
| 209 | + type: 2} | |
| 210 | + m_PrefabInternal: {fileID: 0} | |
| 211 | + m_GameObject: {fileID: 66461437} | |
| 212 | + m_Enabled: 1 | |
| 213 | + m_EditorHideFlags: 0 | |
| 214 | + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
| 215 | + m_Name: | |
| 216 | + m_EditorClassIdentifier: | |
| 217 | + m_Material: {fileID: 0} | |
| 218 | + m_Color: {r: 1, g: 1, b: 1, a: 1} | |
| 219 | + m_RaycastTarget: 1 | |
| 220 | + m_OnCullStateChanged: | |
| 221 | + m_PersistentCalls: | |
| 222 | + m_Calls: [] | |
| 223 | + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | |
| 224 | + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
| 225 | + m_Sprite: {fileID: 21300000, guid: c7eac39259065df48aacf4ebecd457aa, type: 3} | |
| 226 | + m_Type: 0 | |
| 227 | + m_PreserveAspect: 1 | |
| 228 | + m_FillCenter: 1 | |
| 229 | + m_FillMethod: 4 | |
| 230 | + m_FillAmount: 1 | |
| 231 | + m_FillClockwise: 1 | |
| 232 | + m_FillOrigin: 0 | |
| 233 | +--- !u!222 &66461442 | |
| 234 | +CanvasRenderer: | |
| 235 | + m_ObjectHideFlags: 0 | |
| 236 | + m_PrefabParentObject: {fileID: 22257032, guid: 12db97f21fb2a7d4cb537ec5395de1b9, | |
| 237 | + type: 2} | |
| 238 | + m_PrefabInternal: {fileID: 0} | |
| 239 | + m_GameObject: {fileID: 66461437} | |
| 88 | 240 | --- !u!114 &138791195 stripped |
| 89 | 241 | MonoBehaviour: |
| 90 | 242 | m_PrefabParentObject: {fileID: 11412866, guid: cd81d95d2fa8dc448b18a415b9009d43, |
| 91 | 243 | type: 2} |
| 92 | 244 | m_PrefabInternal: {fileID: 1610759364} |
| 93 | 245 | m_Script: {fileID: 11500000, guid: eeb6a455eb0dfd94aa6bc3484e5fecff, type: 3} |
| 246 | +--- !u!1 &175045860 | |
| 247 | +GameObject: | |
| 248 | + m_ObjectHideFlags: 0 | |
| 249 | + m_PrefabParentObject: {fileID: 0} | |
| 250 | + m_PrefabInternal: {fileID: 0} | |
| 251 | + serializedVersion: 4 | |
| 252 | + m_Component: | |
| 253 | + - 224: {fileID: 175045861} | |
| 254 | + - 222: {fileID: 175045863} | |
| 255 | + - 114: {fileID: 175045862} | |
| 256 | + m_Layer: 5 | |
| 257 | + m_Name: Text | |
| 258 | + m_TagString: Untagged | |
| 259 | + m_Icon: {fileID: 0} | |
| 260 | + m_NavMeshLayer: 0 | |
| 261 | + m_StaticEditorFlags: 0 | |
| 262 | + m_IsActive: 1 | |
| 263 | +--- !u!224 &175045861 | |
| 264 | +RectTransform: | |
| 265 | + m_ObjectHideFlags: 0 | |
| 266 | + m_PrefabParentObject: {fileID: 0} | |
| 267 | + m_PrefabInternal: {fileID: 0} | |
| 268 | + m_GameObject: {fileID: 175045860} | |
| 269 | + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |
| 270 | + m_LocalPosition: {x: 0, y: 0, z: 0} | |
| 271 | + m_LocalScale: {x: 1, y: 1, z: 1} | |
| 272 | + m_Children: [] | |
| 273 | + m_Father: {fileID: 1239673402} | |
| 274 | + m_RootOrder: 0 | |
| 275 | + m_AnchorMin: {x: 0, y: 0} | |
| 276 | + m_AnchorMax: {x: 1, y: 1} | |
| 277 | + m_AnchoredPosition: {x: 0, y: 0} | |
| 278 | + m_SizeDelta: {x: 0, y: 0} | |
| 279 | + m_Pivot: {x: .5, y: .5} | |
| 280 | +--- !u!114 &175045862 | |
| 281 | +MonoBehaviour: | |
| 282 | + m_ObjectHideFlags: 0 | |
| 283 | + m_PrefabParentObject: {fileID: 0} | |
| 284 | + m_PrefabInternal: {fileID: 0} | |
| 285 | + m_GameObject: {fileID: 175045860} | |
| 286 | + m_Enabled: 1 | |
| 287 | + m_EditorHideFlags: 0 | |
| 288 | + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
| 289 | + m_Name: | |
| 290 | + m_EditorClassIdentifier: | |
| 291 | + m_Material: {fileID: 0} | |
| 292 | + m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} | |
| 293 | + m_RaycastTarget: 1 | |
| 294 | + m_OnCullStateChanged: | |
| 295 | + m_PersistentCalls: | |
| 296 | + m_Calls: [] | |
| 297 | + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | |
| 298 | + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
| 299 | + m_FontData: | |
| 300 | + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} | |
| 301 | + m_FontSize: 18 | |
| 302 | + m_FontStyle: 1 | |
| 303 | + m_BestFit: 0 | |
| 304 | + m_MinSize: 10 | |
| 305 | + m_MaxSize: 40 | |
| 306 | + m_Alignment: 4 | |
| 307 | + m_RichText: 1 | |
| 308 | + m_HorizontalOverflow: 0 | |
| 309 | + m_VerticalOverflow: 0 | |
| 310 | + m_LineSpacing: 1 | |
| 311 | + m_Text: X | |
| 312 | +--- !u!222 &175045863 | |
| 313 | +CanvasRenderer: | |
| 314 | + m_ObjectHideFlags: 0 | |
| 315 | + m_PrefabParentObject: {fileID: 0} | |
| 316 | + m_PrefabInternal: {fileID: 0} | |
| 317 | + m_GameObject: {fileID: 175045860} | |
| 94 | 318 | --- !u!1 &175950692 stripped |
| 95 | 319 | GameObject: |
| 96 | 320 | m_PrefabParentObject: {fileID: 109246, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} |
| 97 | 321 | m_PrefabInternal: {fileID: 1548829033} |
| 322 | +--- !u!1 &217609970 stripped | |
| 323 | +GameObject: | |
| 324 | + m_PrefabParentObject: {fileID: 131276, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} | |
| 325 | + m_PrefabInternal: {fileID: 1548829033} | |
| 326 | +--- !u!224 &217609971 stripped | |
| 327 | +RectTransform: | |
| 328 | + m_PrefabParentObject: {fileID: 22474902, guid: 12db97f21fb2a7d4cb537ec5395de1b9, | |
| 329 | + type: 2} | |
| 330 | + m_PrefabInternal: {fileID: 1548829033} | |
| 331 | +--- !u!114 &217609975 | |
| 332 | +MonoBehaviour: | |
| 333 | + m_ObjectHideFlags: 0 | |
| 334 | + m_PrefabParentObject: {fileID: 0} | |
| 335 | + m_PrefabInternal: {fileID: 0} | |
| 336 | + m_GameObject: {fileID: 217609970} | |
| 337 | + m_Enabled: 1 | |
| 338 | + m_EditorHideFlags: 0 | |
| 339 | + m_Script: {fileID: 11500000, guid: 9d82f947b8b7b8c4cb02d681f795cb2d, type: 3} | |
| 340 | + m_Name: | |
| 341 | + m_EditorClassIdentifier: | |
| 342 | + go: {fileID: 217609970} | |
| 98 | 343 | --- !u!1001 &378123360 |
| 99 | 344 | Prefab: |
| 100 | 345 | m_ObjectHideFlags: 0 |
| ... | ... | @@ -338,10 +583,9 @@ MonoBehaviour: |
| 338 | 583 | sampleItemObject: {fileID: 129340, guid: 08616088b7695684f92b7d462759ae83, type: 2} |
| 339 | 584 | sampleLoadingItemObject: {fileID: 155894, guid: 18324cc928551d64c91382a781de6ee9, |
| 340 | 585 | type: 2} |
| 341 | - itemList: | |
| 342 | - - | |
| 343 | - - | |
| 344 | - - | |
| 586 | + itemList: [] | |
| 587 | + listBlock: {fileID: 1821807534} | |
| 588 | + bar: {fileID: 217609970} | |
| 345 | 589 | contentPanel: {fileID: 1123902035} |
| 346 | 590 | scrollView: {fileID: 1128211434} |
| 347 | 591 | input: {fileID: 1615435309} |
| ... | ... | @@ -375,7 +619,7 @@ RectTransform: |
| 375 | 619 | m_Father: {fileID: 1775850871} |
| 376 | 620 | m_RootOrder: 0 |
| 377 | 621 | m_AnchorMin: {x: 0, y: 0} |
| 378 | - m_AnchorMax: {x: 0, y: 0} | |
| 622 | + m_AnchorMax: {x: 1, y: 1} | |
| 379 | 623 | m_AnchoredPosition: {x: 0, y: 0} |
| 380 | 624 | m_SizeDelta: {x: 20, y: 20} |
| 381 | 625 | m_Pivot: {x: .5, y: .5} |
| ... | ... | @@ -727,6 +971,138 @@ CanvasRenderer: |
| 727 | 971 | m_PrefabParentObject: {fileID: 0} |
| 728 | 972 | m_PrefabInternal: {fileID: 0} |
| 729 | 973 | m_GameObject: {fileID: 1215912509} |
| 974 | +--- !u!1 &1239673401 | |
| 975 | +GameObject: | |
| 976 | + m_ObjectHideFlags: 0 | |
| 977 | + m_PrefabParentObject: {fileID: 0} | |
| 978 | + m_PrefabInternal: {fileID: 0} | |
| 979 | + serializedVersion: 4 | |
| 980 | + m_Component: | |
| 981 | + - 224: {fileID: 1239673402} | |
| 982 | + - 222: {fileID: 1239673405} | |
| 983 | + - 114: {fileID: 1239673404} | |
| 984 | + - 114: {fileID: 1239673403} | |
| 985 | + m_Layer: 5 | |
| 986 | + m_Name: CloseButton | |
| 987 | + m_TagString: Untagged | |
| 988 | + m_Icon: {fileID: 0} | |
| 989 | + m_NavMeshLayer: 0 | |
| 990 | + m_StaticEditorFlags: 0 | |
| 991 | + m_IsActive: 1 | |
| 992 | +--- !u!224 &1239673402 | |
| 993 | +RectTransform: | |
| 994 | + m_ObjectHideFlags: 0 | |
| 995 | + m_PrefabParentObject: {fileID: 0} | |
| 996 | + m_PrefabInternal: {fileID: 0} | |
| 997 | + m_GameObject: {fileID: 1239673401} | |
| 998 | + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |
| 999 | + m_LocalPosition: {x: 0, y: 0, z: 0} | |
| 1000 | + m_LocalScale: {x: 1, y: 1, z: 1} | |
| 1001 | + m_Children: | |
| 1002 | + - {fileID: 175045861} | |
| 1003 | + m_Father: {fileID: 1821807535} | |
| 1004 | + m_RootOrder: 2 | |
| 1005 | + m_AnchorMin: {x: 1, y: 1} | |
| 1006 | + m_AnchorMax: {x: 1, y: 1} | |
| 1007 | + m_AnchoredPosition: {x: -20, y: -25} | |
| 1008 | + m_SizeDelta: {x: 30, y: 30} | |
| 1009 | + m_Pivot: {x: 1, y: 1} | |
| 1010 | +--- !u!114 &1239673403 | |
| 1011 | +MonoBehaviour: | |
| 1012 | + m_ObjectHideFlags: 0 | |
| 1013 | + m_PrefabParentObject: {fileID: 0} | |
| 1014 | + m_PrefabInternal: {fileID: 0} | |
| 1015 | + m_GameObject: {fileID: 1239673401} | |
| 1016 | + m_Enabled: 1 | |
| 1017 | + m_EditorHideFlags: 0 | |
| 1018 | + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
| 1019 | + m_Name: | |
| 1020 | + m_EditorClassIdentifier: | |
| 1021 | + m_Navigation: | |
| 1022 | + m_Mode: 3 | |
| 1023 | + m_SelectOnUp: {fileID: 0} | |
| 1024 | + m_SelectOnDown: {fileID: 0} | |
| 1025 | + m_SelectOnLeft: {fileID: 0} | |
| 1026 | + m_SelectOnRight: {fileID: 0} | |
| 1027 | + m_Transition: 1 | |
| 1028 | + m_Colors: | |
| 1029 | + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} | |
| 1030 | + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} | |
| 1031 | + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} | |
| 1032 | + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} | |
| 1033 | + m_ColorMultiplier: 1 | |
| 1034 | + m_FadeDuration: .100000001 | |
| 1035 | + m_SpriteState: | |
| 1036 | + m_HighlightedSprite: {fileID: 0} | |
| 1037 | + m_PressedSprite: {fileID: 0} | |
| 1038 | + m_DisabledSprite: {fileID: 0} | |
| 1039 | + m_AnimationTriggers: | |
| 1040 | + m_NormalTrigger: Normal | |
| 1041 | + m_HighlightedTrigger: Highlighted | |
| 1042 | + m_PressedTrigger: Pressed | |
| 1043 | + m_DisabledTrigger: Disabled | |
| 1044 | + m_Interactable: 1 | |
| 1045 | + m_TargetGraphic: {fileID: 1239673404} | |
| 1046 | + m_OnClick: | |
| 1047 | + m_PersistentCalls: | |
| 1048 | + m_Calls: | |
| 1049 | + - m_Target: {fileID: 1821807534} | |
| 1050 | + m_MethodName: SetActive | |
| 1051 | + m_Mode: 6 | |
| 1052 | + m_Arguments: | |
| 1053 | + m_ObjectArgument: {fileID: 0} | |
| 1054 | + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine | |
| 1055 | + m_IntArgument: 0 | |
| 1056 | + m_FloatArgument: 0 | |
| 1057 | + m_StringArgument: | |
| 1058 | + m_BoolArgument: 0 | |
| 1059 | + m_CallState: 2 | |
| 1060 | + - m_Target: {fileID: 217609970} | |
| 1061 | + m_MethodName: SetActive | |
| 1062 | + m_Mode: 6 | |
| 1063 | + m_Arguments: | |
| 1064 | + m_ObjectArgument: {fileID: 0} | |
| 1065 | + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine | |
| 1066 | + m_IntArgument: 0 | |
| 1067 | + m_FloatArgument: 0 | |
| 1068 | + m_StringArgument: | |
| 1069 | + m_BoolArgument: 1 | |
| 1070 | + m_CallState: 2 | |
| 1071 | + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, | |
| 1072 | + Culture=neutral, PublicKeyToken=null | |
| 1073 | +--- !u!114 &1239673404 | |
| 1074 | +MonoBehaviour: | |
| 1075 | + m_ObjectHideFlags: 0 | |
| 1076 | + m_PrefabParentObject: {fileID: 0} | |
| 1077 | + m_PrefabInternal: {fileID: 0} | |
| 1078 | + m_GameObject: {fileID: 1239673401} | |
| 1079 | + m_Enabled: 1 | |
| 1080 | + m_EditorHideFlags: 0 | |
| 1081 | + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | |
| 1082 | + m_Name: | |
| 1083 | + m_EditorClassIdentifier: | |
| 1084 | + m_Material: {fileID: 0} | |
| 1085 | + m_Color: {r: 1, g: 1, b: 1, a: 1} | |
| 1086 | + m_RaycastTarget: 1 | |
| 1087 | + m_OnCullStateChanged: | |
| 1088 | + m_PersistentCalls: | |
| 1089 | + m_Calls: [] | |
| 1090 | + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | |
| 1091 | + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
| 1092 | + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} | |
| 1093 | + m_Type: 1 | |
| 1094 | + m_PreserveAspect: 0 | |
| 1095 | + m_FillCenter: 1 | |
| 1096 | + m_FillMethod: 4 | |
| 1097 | + m_FillAmount: 1 | |
| 1098 | + m_FillClockwise: 1 | |
| 1099 | + m_FillOrigin: 0 | |
| 1100 | +--- !u!222 &1239673405 | |
| 1101 | +CanvasRenderer: | |
| 1102 | + m_ObjectHideFlags: 0 | |
| 1103 | + m_PrefabParentObject: {fileID: 0} | |
| 1104 | + m_PrefabInternal: {fileID: 0} | |
| 1105 | + m_GameObject: {fileID: 1239673401} | |
| 730 | 1106 | --- !u!1 &1420098868 |
| 731 | 1107 | GameObject: |
| 732 | 1108 | m_ObjectHideFlags: 0 |
| ... | ... | @@ -952,7 +1328,7 @@ Prefab: |
| 952 | 1328 | objectReference: {fileID: 0} |
| 953 | 1329 | - target: {fileID: 131276, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} |
| 954 | 1330 | propertyPath: m_IsActive |
| 955 | - value: 0 | |
| 1331 | + value: 1 | |
| 956 | 1332 | objectReference: {fileID: 0} |
| 957 | 1333 | - target: {fileID: 103582, guid: 12db97f21fb2a7d4cb537ec5395de1b9, type: 2} |
| 958 | 1334 | propertyPath: m_IsActive |
| ... | ... | @@ -1140,8 +1516,8 @@ RectTransform: |
| 1140 | 1516 | m_RootOrder: 0 |
| 1141 | 1517 | m_AnchorMin: {x: 0, y: 1} |
| 1142 | 1518 | m_AnchorMax: {x: 1, y: 1} |
| 1143 | - m_AnchoredPosition: {x: 0, y: -25} | |
| 1144 | - m_SizeDelta: {x: -40, y: 30} | |
| 1519 | + m_AnchoredPosition: {x: -20, y: -25} | |
| 1520 | + m_SizeDelta: {x: -80, y: 30} | |
| 1145 | 1521 | m_Pivot: {x: .5, y: 1} |
| 1146 | 1522 | --- !u!114 &1615435309 |
| 1147 | 1523 | MonoBehaviour: |
| ... | ... | @@ -1290,7 +1666,7 @@ GameObject: |
| 1290 | 1666 | m_Icon: {fileID: 0} |
| 1291 | 1667 | m_NavMeshLayer: 0 |
| 1292 | 1668 | m_StaticEditorFlags: 0 |
| 1293 | - m_IsActive: 1 | |
| 1669 | + m_IsActive: 0 | |
| 1294 | 1670 | --- !u!224 &1821807535 |
| 1295 | 1671 | RectTransform: |
| 1296 | 1672 | m_ObjectHideFlags: 0 |
| ... | ... | @@ -1303,6 +1679,7 @@ RectTransform: |
| 1303 | 1679 | m_Children: |
| 1304 | 1680 | - {fileID: 1615435308} |
| 1305 | 1681 | - {fileID: 1128211430} |
| 1682 | + - {fileID: 1239673402} | |
| 1306 | 1683 | m_Father: {fileID: 1020839875} |
| 1307 | 1684 | m_RootOrder: 7 |
| 1308 | 1685 | m_AnchorMin: {x: 0, y: 0} | ... | ... |
Assets/Scripts/GenericPlayerManager.cs
| ... | ... | @@ -567,7 +567,7 @@ public abstract class GenericPlayerManager : MonoBehaviour { |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | // Default |
| 570 | - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle); | |
| 570 | + playAnimation(TYPE_NONE, DEFAULT_ANIMATION, ""); | |
| 571 | 571 | |
| 572 | 572 | loading = false; |
| 573 | 573 | onPlayingStateChange(); | ... | ... |
Assets/Scripts/ListManager.cs
| ... | ... | @@ -11,6 +11,7 @@ using System.Collections.Generic; |
| 11 | 11 | public class ItemData { |
| 12 | 12 | |
| 13 | 13 | public string animationName; |
| 14 | + public Button.ButtonClickedEvent thingToDo; | |
| 14 | 15 | |
| 15 | 16 | } |
| 16 | 17 | |
| ... | ... | @@ -24,11 +25,15 @@ public class ListManager : MonoBehaviour { |
| 24 | 25 | private const int OFFSET = 20; |
| 25 | 26 | private int size = 0; |
| 26 | 27 | |
| 28 | + public GameObject listBlock; | |
| 29 | + public GameObject bar; | |
| 30 | + | |
| 27 | 31 | public Transform contentPanel; |
| 28 | 32 | public ScrollRect scrollView; |
| 29 | 33 | public InputField input; |
| 30 | 34 | |
| 31 | 35 | private bool isLoading = false; |
| 36 | + private GameObject loadingItem; | |
| 32 | 37 | |
| 33 | 38 | TrieST<string> trie; |
| 34 | 39 | |
| ... | ... | @@ -56,20 +61,15 @@ public class ListManager : MonoBehaviour { |
| 56 | 61 | this.index = 0; |
| 57 | 62 | this.size = itemList.Length; |
| 58 | 63 | |
| 59 | - populateList(); | |
| 64 | + this.loadingItem = Instantiate (sampleLoadingItemObject) as GameObject; | |
| 65 | + | |
| 66 | + StartCoroutine("populateList"); | |
| 60 | 67 | } |
| 61 | 68 | |
| 62 | 69 | public void checkScrollPosition(Vector2 scrollPosition) |
| 63 | 70 | { |
| 64 | 71 | if (scrollPosition.y <= 0F && ! this.isLoading) |
| 65 | - { | |
| 66 | - /*GameObject newButton = Instantiate (sampleLoadingItemObject) as GameObject; | |
| 67 | - newButton.transform.SetParent(contentPanel); | |
| 68 | - | |
| 69 | - isLoading = true;*/ | |
| 70 | - | |
| 71 | - populateList(); | |
| 72 | - } | |
| 72 | + StartCoroutine("populateList"); | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | public void inputChanged(string text) |
| ... | ... | @@ -82,11 +82,14 @@ public class ListManager : MonoBehaviour { |
| 82 | 82 | foreach(GameObject go in GameObject.FindGameObjectsWithTag("clone")) |
| 83 | 83 | Destroy(go); |
| 84 | 84 | |
| 85 | - populateList(); | |
| 85 | + StartCoroutine("populateList"); | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - public void populateList() | |
| 88 | + private IEnumerator populateList() | |
| 89 | 89 | { |
| 90 | + changeLoadingState(true); | |
| 91 | + yield return new WaitForSeconds(1); | |
| 92 | + | |
| 90 | 93 | int last = this.index + OFFSET; |
| 91 | 94 | if (last > size) last = this.size; |
| 92 | 95 | |
| ... | ... | @@ -96,14 +99,22 @@ public class ListManager : MonoBehaviour { |
| 96 | 99 | |
| 97 | 100 | GameObject newButton = Instantiate (sampleItemObject) as GameObject; |
| 98 | 101 | SampleItem sampleItem = newButton.GetComponent<SampleItem>(); |
| 99 | - | |
| 100 | 102 | sampleItem.title.text = item; |
| 101 | - sampleItem.animationName = item; //item.animationName[0].ToString().ToUpper() + item.animationName.Substring(1); | |
| 103 | + | |
| 104 | + sampleItem.GetComponent<Button>().onClick.AddListener( | |
| 105 | + delegate { | |
| 106 | + listBlock.SetActive(false); | |
| 107 | + bar.SetActive(true); | |
| 108 | + } | |
| 109 | + ); | |
| 102 | 110 | |
| 103 | 111 | newButton.transform.SetParent(contentPanel); |
| 112 | + //newButton.transform.SetAsFirstSibling(); | |
| 104 | 113 | } |
| 105 | 114 | |
| 106 | 115 | this.index = last; |
| 116 | + | |
| 117 | + changeLoadingState(false); | |
| 107 | 118 | } |
| 108 | 119 | |
| 109 | 120 | private string[] getNamesByPrefix(string prefix) |
| ... | ... | @@ -111,5 +122,16 @@ public class ListManager : MonoBehaviour { |
| 111 | 122 | Queue<string> names = this.trie.keysWithPrefix(prefix); |
| 112 | 123 | return names.ToArray(); |
| 113 | 124 | } |
| 125 | + | |
| 126 | + private void changeLoadingState(bool active) | |
| 127 | + { | |
| 128 | + Debug.Log(active ? "Loading..." : "Done"); | |
| 129 | + | |
| 130 | + if (isLoading != active) | |
| 131 | + { | |
| 132 | + this.loadingItem.transform.SetParent(active ? contentPanel : null); | |
| 133 | + this.isLoading = active; | |
| 134 | + } | |
| 135 | + } | |
| 114 | 136 | |
| 115 | 137 | } | ... | ... |
Assets/Scripts/PlayerManager.cs
Assets/Scripts/SampleItem.cs
| ... | ... | @@ -6,6 +6,10 @@ public class SampleItem : MonoBehaviour { |
| 6 | 6 | |
| 7 | 7 | public Button button; |
| 8 | 8 | public Text title; |
| 9 | - public string animationName; | |
| 9 | + | |
| 10 | + public void StartAnimation() | |
| 11 | + { | |
| 12 | + GameObject.FindGameObjectWithTag("inspetor").GetComponent<PlayerManager>().start_local_play(title.text); | |
| 13 | + } | |
| 10 | 14 | |
| 11 | 15 | } | ... | ... |
| ... | ... | @@ -0,0 +1,15 @@ |
| 1 | +using UnityEngine; | |
| 2 | +using System.Collections; | |
| 3 | + | |
| 4 | +public class Switch : MonoBehaviour { | |
| 5 | + | |
| 6 | + public GameObject go; | |
| 7 | + private bool isActive = false; | |
| 8 | + | |
| 9 | + public void SwitchStatus() | |
| 10 | + { | |
| 11 | + go.SetActive(isActive); | |
| 12 | + isActive = !isActive; | |
| 13 | + } | |
| 14 | + | |
| 15 | +} | ... | ... |
| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | +fileFormatVersion: 2 | |
| 2 | +guid: 9d82f947b8b7b8c4cb02d681f795cb2d | |
| 3 | +timeCreated: 1449167019 | |
| 4 | +licenseType: Pro | |
| 5 | +MonoImporter: | |
| 6 | + serializedVersion: 2 | |
| 7 | + defaultReferences: [] | |
| 8 | + executionOrder: 0 | |
| 9 | + icon: {instanceID: 0} | |
| 10 | + userData: | |
| 11 | + assetBundleName: | |
| 12 | + assetBundleVariant: | ... | ... |