From 2beb2395ce881ee6eb9865518faf17e23f458841 Mon Sep 17 00:00:00 2001 From: Denis NUTIU Date: Sat, 6 Jul 2019 16:26:09 +0300 Subject: [PATCH 1/4] fixed upgrades & bomb prefab order in layer --- Assets/DevMocks/BombsUpgrade.prefab | 4 ++-- Assets/DevMocks/FlameUpgrade.prefab | 13 +++++++++++++ Assets/Prefabs/Ammo/Bomb.prefab | 2 +- Assets/Scenes/SampleScene.unity | 30 ++++++++++++++++++++++++----- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/Assets/DevMocks/BombsUpgrade.prefab b/Assets/DevMocks/BombsUpgrade.prefab index 8dc626b..d9f443c 100644 --- a/Assets/DevMocks/BombsUpgrade.prefab +++ b/Assets/DevMocks/BombsUpgrade.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 7980903176349258245} - component: {fileID: 6699440875015304414} - component: {fileID: 7875732231624854186} - - component: {fileID: 7738746775589240714} + - component: {fileID: 5909025813549437813} m_Layer: 0 m_Name: BombsUpgrade m_TagString: Untagged @@ -107,7 +107,7 @@ BoxCollider2D: serializedVersion: 2 m_Size: {x: 1, y: 1} m_EdgeRadius: 0 ---- !u!114 &7738746775589240714 +--- !u!114 &5909025813549437813 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Assets/DevMocks/FlameUpgrade.prefab b/Assets/DevMocks/FlameUpgrade.prefab index cebe9d9..8b3a227 100644 --- a/Assets/DevMocks/FlameUpgrade.prefab +++ b/Assets/DevMocks/FlameUpgrade.prefab @@ -12,6 +12,7 @@ GameObject: - component: {fileID: 7037551310800415105} - component: {fileID: 7958292204112110464} - component: {fileID: 5334633105760309190} + - component: {fileID: 6293070509487257227} m_Layer: 0 m_Name: FlameUpgrade m_TagString: Untagged @@ -119,3 +120,15 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 94153367f2364ab38597c8f4a6521909, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &6293070509487257227 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7385886653159515755} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 94153367f2364ab38597c8f4a6521909, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Prefabs/Ammo/Bomb.prefab b/Assets/Prefabs/Ammo/Bomb.prefab index ef8c415..c90229d 100644 --- a/Assets/Prefabs/Ammo/Bomb.prefab +++ b/Assets/Prefabs/Ammo/Bomb.prefab @@ -68,7 +68,7 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 10 + m_SortingOrder: 9 m_Sprite: {fileID: 21300008, guid: 1611b607563ac5b4d919348f10e92487, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index b8d629a..8e111bf 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -404,7 +404,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 11.459104, y: -4.0430503, z: -10} + m_LocalPosition: {x: 13.828903, y: -4.0430503, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -832,6 +832,30 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 16 objectReference: {fileID: 0} + - target: {fileID: 311312839, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8007755715420797612, guid: 4ca131020414f4b1597dac2e1d292d7f, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2219516564249810540, guid: 4ca131020414f4b1597dac2e1d292d7f, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1533625511004221075, guid: 4ca131020414f4b1597dac2e1d292d7f, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7551096532728223647, guid: 4ca131020414f4b1597dac2e1d292d7f, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} --- !u!1001 &6843575829779162303 @@ -906,10 +930,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 1778702657, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3} - propertyPath: m_SortingOrder - value: 10 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3} --- !u!1001 &7054975846332595845 From 93f2a11e69c1fabf14d2891925f48aeb54fa2d27 Mon Sep 17 00:00:00 2001 From: Denis NUTIU Date: Sat, 6 Jul 2019 17:44:09 +0300 Subject: [PATCH 2/4] Implement Game Pause behaviour --- Assets/Prefabs/UI.meta | 8 + .../{ => UI}/MobileInputControls.prefab | 24 +- .../{ => UI}/MobileInputControls.prefab.meta | 0 Assets/Prefabs/UI/PreStageUI.prefab | 255 ++++++++++++++++++ Assets/Prefabs/UI/PreStageUI.prefab.meta | 7 + Assets/Scenes/SampleScene.unity | 94 ------- .../Scripts/src/Helpers/ApplicationActions.cs | 38 +++ .../src/Helpers/ApplicationActions.cs.meta | 3 + Assets/Scripts/src/Managers/GameManager.cs | 22 +- Assets/Scripts/src/Player/PlayerController.cs | 2 + ProjectSettings/GraphicsSettings.asset | 1 - 11 files changed, 342 insertions(+), 112 deletions(-) create mode 100644 Assets/Prefabs/UI.meta rename Assets/Prefabs/{ => UI}/MobileInputControls.prefab (98%) rename Assets/Prefabs/{ => UI}/MobileInputControls.prefab.meta (100%) create mode 100644 Assets/Prefabs/UI/PreStageUI.prefab create mode 100644 Assets/Prefabs/UI/PreStageUI.prefab.meta create mode 100644 Assets/Scripts/src/Helpers/ApplicationActions.cs create mode 100644 Assets/Scripts/src/Helpers/ApplicationActions.cs.meta diff --git a/Assets/Prefabs/UI.meta b/Assets/Prefabs/UI.meta new file mode 100644 index 0000000..1df0b29 --- /dev/null +++ b/Assets/Prefabs/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3cdc08213b0a440449d840e093556476 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/MobileInputControls.prefab b/Assets/Prefabs/UI/MobileInputControls.prefab similarity index 98% rename from Assets/Prefabs/MobileInputControls.prefab rename to Assets/Prefabs/UI/MobileInputControls.prefab index e3eef22..60bd8c9 100644 --- a/Assets/Prefabs/MobileInputControls.prefab +++ b/Assets/Prefabs/UI/MobileInputControls.prefab @@ -19,7 +19,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &311312840 RectTransform: m_ObjectHideFlags: 0 @@ -29,14 +29,14 @@ RectTransform: m_GameObject: {fileID: 311312839} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.5, y: 1.5, z: 1} m_Children: [] m_Father: {fileID: 2219516564235934920} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.163, y: 0.31100002} m_AnchorMax: {x: 0.163, y: 0.31100002} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 40} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &311312842 @@ -178,7 +178,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2794171661481808020 RectTransform: m_ObjectHideFlags: 0 @@ -188,14 +188,14 @@ RectTransform: m_GameObject: {fileID: 1533625511004221075} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.5, y: 1.5, z: 1} m_Children: [] m_Father: {fileID: 2219516564235934920} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.2342355, y: 0.2132826} m_AnchorMax: {x: 0.2342355, y: 0.2132826} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: 46, y: 16} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4417380224599296100 @@ -430,7 +430,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2219516564235934924 RectTransform: m_ObjectHideFlags: 0 @@ -697,7 +697,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &6194349751570614361 RectTransform: m_ObjectHideFlags: 0 @@ -707,14 +707,14 @@ RectTransform: m_GameObject: {fileID: 7551096532728223647} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.5, y: 1.5, z: 1} m_Children: [] m_Father: {fileID: 2219516564235934920} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.08852906, y: 0.2132826} m_AnchorMax: {x: 0.08852906, y: 0.2132826} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: -46, y: 16} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1369717971988284717 @@ -856,7 +856,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1067509750367631514 RectTransform: m_ObjectHideFlags: 0 @@ -866,7 +866,7 @@ RectTransform: m_GameObject: {fileID: 8007755715420797612} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.5, y: 1.5, z: 1} m_Children: [] m_Father: {fileID: 2219516564235934920} m_RootOrder: 2 diff --git a/Assets/Prefabs/MobileInputControls.prefab.meta b/Assets/Prefabs/UI/MobileInputControls.prefab.meta similarity index 100% rename from Assets/Prefabs/MobileInputControls.prefab.meta rename to Assets/Prefabs/UI/MobileInputControls.prefab.meta diff --git a/Assets/Prefabs/UI/PreStageUI.prefab b/Assets/Prefabs/UI/PreStageUI.prefab new file mode 100644 index 0000000..cb4d0b9 --- /dev/null +++ b/Assets/Prefabs/UI/PreStageUI.prefab @@ -0,0 +1,255 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &611824455253221635 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7943136189830570838} + - component: {fileID: 5829552964612260718} + - component: {fileID: 4935993846136593301} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7943136189830570838 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611824455253221635} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 7935883257743492533} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5829552964612260718 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611824455253221635} + m_CullTransparentMesh: 0 +--- !u!114 &4935993846136593301 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611824455253221635} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 24 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Stage 1 +--- !u!1 &2251350585563921972 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3320912831386190365} + - component: {fileID: 6964405497678007768} + - component: {fileID: 3201857181095885022} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3320912831386190365 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2251350585563921972} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 7935883257743492533} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6964405497678007768 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2251350585563921972} + m_CullTransparentMesh: 0 +--- !u!114 &3201857181095885022 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2251350585563921972} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!1 &4994633962466276707 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7935883257743492533} + - component: {fileID: 2152024136797500473} + - component: {fileID: 936482196064115039} + - component: {fileID: 826719949318333507} + m_Layer: 5 + m_Name: PreStageUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7935883257743492533 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4994633962466276707} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 3320912831386190365} + - {fileID: 7943136189830570838} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!223 &2152024136797500473 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4994633962466276707} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &936482196064115039 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4994633962466276707} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!114 &826719949318333507 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4994633962466276707} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 diff --git a/Assets/Prefabs/UI/PreStageUI.prefab.meta b/Assets/Prefabs/UI/PreStageUI.prefab.meta new file mode 100644 index 0000000..38eb052 --- /dev/null +++ b/Assets/Prefabs/UI/PreStageUI.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1f5ebc13237e070449ea8bc9e8b07ac8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 8e111bf..c6d40ec 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -762,100 +762,6 @@ PrefabInstance: propertyPath: m_Pivot.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 311312840, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} - propertyPath: m_LocalScale.x - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 311312840, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} - propertyPath: m_LocalScale.y - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 311312840, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} - propertyPath: m_LocalScale.z - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 311312840, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} - propertyPath: m_AnchoredPosition.y - value: 40 - objectReference: {fileID: 0} - - target: {fileID: 311312840, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1067509750367631514, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_LocalScale.x - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 1067509750367631514, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_LocalScale.y - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 2794171661481808020, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_LocalScale.x - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 2794171661481808020, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_LocalScale.y - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 2794171661481808020, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 46 - objectReference: {fileID: 0} - - target: {fileID: 2794171661481808020, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 16 - objectReference: {fileID: 0} - - target: {fileID: 6194349751570614361, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_LocalScale.x - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 6194349751570614361, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_LocalScale.y - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 6194349751570614361, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_AnchoredPosition.x - value: -46 - objectReference: {fileID: 0} - - target: {fileID: 6194349751570614361, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 16 - objectReference: {fileID: 0} - - target: {fileID: 311312839, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8007755715420797612, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2219516564249810540, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1533625511004221075, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7551096532728223647, guid: 4ca131020414f4b1597dac2e1d292d7f, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} --- !u!1001 &6843575829779162303 diff --git a/Assets/Scripts/src/Helpers/ApplicationActions.cs b/Assets/Scripts/src/Helpers/ApplicationActions.cs new file mode 100644 index 0000000..795c920 --- /dev/null +++ b/Assets/Scripts/src/Helpers/ApplicationActions.cs @@ -0,0 +1,38 @@ +using UnityEngine; + +namespace src.Helpers +{ + public static class ApplicationActions + { + public static bool IsGamePaused { get; private set; } + + public static void QuitGame() + { + Application.Quit(); + } + + public static void PauseGame() + { + IsGamePaused = true; + Time.timeScale = 0f; + } + + public static void UnpauseGame() + { + IsGamePaused = false; + Time.timeScale = 1f; + } + + public static void HandlePauseKey() + { + if (IsGamePaused) + { + UnpauseGame(); + } + else + { + PauseGame(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/src/Helpers/ApplicationActions.cs.meta b/Assets/Scripts/src/Helpers/ApplicationActions.cs.meta new file mode 100644 index 0000000..4a0d828 --- /dev/null +++ b/Assets/Scripts/src/Helpers/ApplicationActions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 243966f3fa384f4dac96170eacc1bee1 +timeCreated: 1562422098 \ No newline at end of file diff --git a/Assets/Scripts/src/Managers/GameManager.cs b/Assets/Scripts/src/Managers/GameManager.cs index 22b96b9..1f421eb 100644 --- a/Assets/Scripts/src/Managers/GameManager.cs +++ b/Assets/Scripts/src/Managers/GameManager.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using src.Helpers; +using UnityEngine; namespace src.Managers { @@ -45,11 +46,22 @@ namespace src.Managers _levelManager.InitLevel(); } - /* Listen for meta keys */ - private void Update(){ - if (Input.GetKeyDown(KeyCode.Escape)) - Application.Quit(); + private void Update() + { + ListenForMetaKeys(); } + private static void ListenForMetaKeys() + { + if (Input.GetKeyDown(KeyCode.Escape)) + { + Application.Quit(); + ApplicationActions.QuitGame(); + } + else if (Input.GetKeyDown(KeyCode.P)) + { + ApplicationActions.HandlePauseKey(); + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/src/Player/PlayerController.cs b/Assets/Scripts/src/Player/PlayerController.cs index 13b93fe..52c7197 100644 --- a/Assets/Scripts/src/Player/PlayerController.cs +++ b/Assets/Scripts/src/Player/PlayerController.cs @@ -35,11 +35,13 @@ namespace src.Player private void FixedUpdate() { + if (ApplicationActions.IsGamePaused) {return;} HandleMovement(); } private void Update() { + if (ApplicationActions.IsGamePaused) {return;} HandleBomb(); } diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 5000397..922bdb7 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -34,7 +34,6 @@ GraphicsSettings: - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} From 823025e7c8762b22395da202690209e147eb1e4b Mon Sep 17 00:00:00 2001 From: Denis NUTIU Date: Sat, 6 Jul 2019 18:44:07 +0300 Subject: [PATCH 3/4] Implement pre init game --- Assets/Prefabs/UI/PreStageUI.prefab | 13 ++ Assets/Scenes/SampleScene.unity | 134 ++++++++++++++++++ .../src/{Upgrade => Base}/UpgradeBase.cs | 0 .../src/{Upgrade => Base}/UpgradeBase.cs.meta | 0 .../Scripts/src/Helpers/ApplicationActions.cs | 11 +- Assets/Scripts/src/Managers/GameManager.cs | 16 ++- .../Scripts/src/Managers/GameStateManager.cs | 15 ++ .../src/Managers/GameStateManager.cs.meta | 3 + Assets/Scripts/src/Player/PlayerController.cs | 6 +- Assets/Scripts/src/UI.meta | 8 ++ Assets/Scripts/src/UI/PreLevelLoad.cs | 18 +++ Assets/Scripts/src/UI/PreLevelLoad.cs.meta | 11 ++ 12 files changed, 226 insertions(+), 9 deletions(-) rename Assets/Scripts/src/{Upgrade => Base}/UpgradeBase.cs (100%) rename Assets/Scripts/src/{Upgrade => Base}/UpgradeBase.cs.meta (100%) create mode 100644 Assets/Scripts/src/Managers/GameStateManager.cs create mode 100644 Assets/Scripts/src/Managers/GameStateManager.cs.meta create mode 100644 Assets/Scripts/src/UI.meta create mode 100644 Assets/Scripts/src/UI/PreLevelLoad.cs create mode 100644 Assets/Scripts/src/UI/PreLevelLoad.cs.meta diff --git a/Assets/Prefabs/UI/PreStageUI.prefab b/Assets/Prefabs/UI/PreStageUI.prefab index cb4d0b9..dfaf195 100644 --- a/Assets/Prefabs/UI/PreStageUI.prefab +++ b/Assets/Prefabs/UI/PreStageUI.prefab @@ -165,6 +165,7 @@ GameObject: - component: {fileID: 2152024136797500473} - component: {fileID: 936482196064115039} - component: {fileID: 826719949318333507} + - component: {fileID: 2684488013186753063} m_Layer: 5 m_Name: PreStageUI m_TagString: Untagged @@ -253,3 +254,15 @@ MonoBehaviour: m_BlockingMask: serializedVersion: 2 m_Bits: 4294967295 +--- !u!114 &2684488013186753063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4994633962466276707} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a89bdde63eb80ad41bb0e1472e665667, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index c6d40ec..14953ca 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -480,6 +480,140 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1152312890 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4994633962466276707, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_Name + value: PreStageUI + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7935883257743492533, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2152024136797500473, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2152024136797500473, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_PixelPerfect + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4935993846136593301, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, + type: 3} + propertyPath: m_Text + value: + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1f5ebc13237e070449ea8bc9e8b07ac8, type: 3} --- !u!4 &1352658977 stripped Transform: m_CorrespondingSourceObject: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144, diff --git a/Assets/Scripts/src/Upgrade/UpgradeBase.cs b/Assets/Scripts/src/Base/UpgradeBase.cs similarity index 100% rename from Assets/Scripts/src/Upgrade/UpgradeBase.cs rename to Assets/Scripts/src/Base/UpgradeBase.cs diff --git a/Assets/Scripts/src/Upgrade/UpgradeBase.cs.meta b/Assets/Scripts/src/Base/UpgradeBase.cs.meta similarity index 100% rename from Assets/Scripts/src/Upgrade/UpgradeBase.cs.meta rename to Assets/Scripts/src/Base/UpgradeBase.cs.meta diff --git a/Assets/Scripts/src/Helpers/ApplicationActions.cs b/Assets/Scripts/src/Helpers/ApplicationActions.cs index 795c920..1b91e34 100644 --- a/Assets/Scripts/src/Helpers/ApplicationActions.cs +++ b/Assets/Scripts/src/Helpers/ApplicationActions.cs @@ -1,11 +1,12 @@ +using src.Managers; using UnityEngine; namespace src.Helpers { public static class ApplicationActions { - public static bool IsGamePaused { get; private set; } - + private static GameStateManager _gameStateManager = GameStateManager.Instance; + public static void QuitGame() { Application.Quit(); @@ -13,19 +14,19 @@ namespace src.Helpers public static void PauseGame() { - IsGamePaused = true; + _gameStateManager.IsGamePaused = true; Time.timeScale = 0f; } public static void UnpauseGame() { - IsGamePaused = false; + _gameStateManager.IsGamePaused = false; Time.timeScale = 1f; } public static void HandlePauseKey() { - if (IsGamePaused) + if (_gameStateManager.IsGamePaused) { UnpauseGame(); } diff --git a/Assets/Scripts/src/Managers/GameManager.cs b/Assets/Scripts/src/Managers/GameManager.cs index 1f421eb..d43d6f3 100644 --- a/Assets/Scripts/src/Managers/GameManager.cs +++ b/Assets/Scripts/src/Managers/GameManager.cs @@ -1,4 +1,5 @@ -using src.Helpers; +using System.Collections; +using src.Helpers; using UnityEngine; namespace src.Managers @@ -9,6 +10,7 @@ namespace src.Managers private LevelManager _levelManager; private UpgradeManager _upgradeManager; private BombsUtilManager _bombsUtilManager; + private GameObject _preStageUi; public void Awake() { @@ -27,7 +29,12 @@ namespace src.Managers _levelManager = GetComponent(); _upgradeManager = GetComponent(); _bombsUtilManager = BombsUtilManager.Instance; + _preStageUi = GameObject.Find("PreStageUI"); + } + public void Start() + { + StartCoroutine(PreInitGame()); InitGame(); } @@ -45,6 +52,12 @@ namespace src.Managers { _levelManager.InitLevel(); } + private IEnumerator PreInitGame() + { + _preStageUi.SetActive(true); + yield return new WaitForSeconds(0.7f); + _preStageUi.SetActive(false); + } private void Update() { @@ -55,7 +68,6 @@ namespace src.Managers { if (Input.GetKeyDown(KeyCode.Escape)) { - Application.Quit(); ApplicationActions.QuitGame(); } else if (Input.GetKeyDown(KeyCode.P)) diff --git a/Assets/Scripts/src/Managers/GameStateManager.cs b/Assets/Scripts/src/Managers/GameStateManager.cs new file mode 100644 index 0000000..2c620e5 --- /dev/null +++ b/Assets/Scripts/src/Managers/GameStateManager.cs @@ -0,0 +1,15 @@ +namespace src.Managers +{ + public class GameStateManager + { + public static GameStateManager Instance { get; } = new GameStateManager(); + public bool IsGamePaused { get; internal set; } + public int Level { get; private set; } = 1; + + + public void IncreaseLevel() + { + Level += 1; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/src/Managers/GameStateManager.cs.meta b/Assets/Scripts/src/Managers/GameStateManager.cs.meta new file mode 100644 index 0000000..addeca7 --- /dev/null +++ b/Assets/Scripts/src/Managers/GameStateManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7038cabd5b7145d7bad2dc0d2dd1a8fe +timeCreated: 1562425331 \ No newline at end of file diff --git a/Assets/Scripts/src/Player/PlayerController.cs b/Assets/Scripts/src/Player/PlayerController.cs index 52c7197..542d9f3 100644 --- a/Assets/Scripts/src/Player/PlayerController.cs +++ b/Assets/Scripts/src/Player/PlayerController.cs @@ -2,6 +2,7 @@ using src.Base; using src.Helpers; using src.Interfaces; +using src.Managers; using UnityEngine; using UnityStandardAssets.CrossPlatformInput; @@ -9,6 +10,7 @@ namespace src.Player { public class PlayerController : PlayerBase { + private GameStateManager _gameStateManager = GameStateManager.Instance; private Transform _respawnPosition; private BombsSpawner _bombsSpawner; private Animator _animator; @@ -35,13 +37,13 @@ namespace src.Player private void FixedUpdate() { - if (ApplicationActions.IsGamePaused) {return;} + if (_gameStateManager.IsGamePaused) {return;} HandleMovement(); } private void Update() { - if (ApplicationActions.IsGamePaused) {return;} + if (_gameStateManager.IsGamePaused) {return;} HandleBomb(); } diff --git a/Assets/Scripts/src/UI.meta b/Assets/Scripts/src/UI.meta new file mode 100644 index 0000000..db91021 --- /dev/null +++ b/Assets/Scripts/src/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eedf5bc1f8ea9484cb1063e7b5db029d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/src/UI/PreLevelLoad.cs b/Assets/Scripts/src/UI/PreLevelLoad.cs new file mode 100644 index 0000000..720626d --- /dev/null +++ b/Assets/Scripts/src/UI/PreLevelLoad.cs @@ -0,0 +1,18 @@ +using src.Managers; +using UnityEngine; +using UnityEngine.UI; + +namespace src.UI +{ + public class PreLevelLoad : MonoBehaviour + { + private readonly GameStateManager _gameStateManager = GameStateManager.Instance; + private Text _stageText; + + public void Start() + { + _stageText = GetComponentInChildren(); + _stageText.text = $"Stage {_gameStateManager.Level}"; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/src/UI/PreLevelLoad.cs.meta b/Assets/Scripts/src/UI/PreLevelLoad.cs.meta new file mode 100644 index 0000000..9476dc1 --- /dev/null +++ b/Assets/Scripts/src/UI/PreLevelLoad.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a89bdde63eb80ad41bb0e1472e665667 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 04fc1ee41c3db8428b3250c0d2ddc8724cfee093 Mon Sep 17 00:00:00 2001 From: Denis NUTIU Date: Sat, 6 Jul 2019 18:55:34 +0300 Subject: [PATCH 4/4] Fix upgrades --- Assets/Scenes/SampleScene.unity | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 14953ca..f91cee4 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -704,13 +704,25 @@ PrefabInstance: - target: {fileID: 6316647355651322741, guid: fdaa7451ab31b477b930076bbc888bab, type: 3} propertyPath: upgradePrefabs.Array.size - value: 1 + value: 3 objectReference: {fileID: 0} - target: {fileID: 6316647355651322741, guid: fdaa7451ab31b477b930076bbc888bab, type: 3} propertyPath: upgradePrefabs.Array.data[0] value: - objectReference: {fileID: 4585348266300200282, guid: 2ea1eb2b6b05340a4a99948a6eb818b2, + objectReference: {fileID: 4242909486338491383, guid: c0bd5085d71f847b19df326a2fbcf069, + type: 3} + - target: {fileID: 6316647355651322741, guid: fdaa7451ab31b477b930076bbc888bab, + type: 3} + propertyPath: upgradePrefabs.Array.data[1] + value: + objectReference: {fileID: 7385886653159515755, guid: ba0e1f9d79914426ba805d871bcad311, + type: 3} + - target: {fileID: 6316647355651322741, guid: fdaa7451ab31b477b930076bbc888bab, + type: 3} + propertyPath: upgradePrefabs.Array.data[2] + value: + objectReference: {fileID: 2377911311221568072, guid: 6d6a8eb6810cd4483a761f7b02fff67f, type: 3} - target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab, type: 3}