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/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..dfaf195 --- /dev/null +++ b/Assets/Prefabs/UI/PreStageUI.prefab @@ -0,0 +1,268 @@ +%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} + - component: {fileID: 2684488013186753063} + 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 +--- !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/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 b8d629a..f91cee4 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} @@ -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, @@ -570,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} @@ -762,76 +908,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} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4ca131020414f4b1597dac2e1d292d7f, type: 3} --- !u!1001 &6843575829779162303 @@ -906,10 +982,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 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 new file mode 100644 index 0000000..1b91e34 --- /dev/null +++ b/Assets/Scripts/src/Helpers/ApplicationActions.cs @@ -0,0 +1,39 @@ +using src.Managers; +using UnityEngine; + +namespace src.Helpers +{ + public static class ApplicationActions + { + private static GameStateManager _gameStateManager = GameStateManager.Instance; + + public static void QuitGame() + { + Application.Quit(); + } + + public static void PauseGame() + { + _gameStateManager.IsGamePaused = true; + Time.timeScale = 0f; + } + + public static void UnpauseGame() + { + _gameStateManager.IsGamePaused = false; + Time.timeScale = 1f; + } + + public static void HandlePauseKey() + { + if (_gameStateManager.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..d43d6f3 100644 --- a/Assets/Scripts/src/Managers/GameManager.cs +++ b/Assets/Scripts/src/Managers/GameManager.cs @@ -1,4 +1,6 @@ -using UnityEngine; +using System.Collections; +using src.Helpers; +using UnityEngine; namespace src.Managers { @@ -8,6 +10,7 @@ namespace src.Managers private LevelManager _levelManager; private UpgradeManager _upgradeManager; private BombsUtilManager _bombsUtilManager; + private GameObject _preStageUi; public void Awake() { @@ -26,7 +29,12 @@ namespace src.Managers _levelManager = GetComponent(); _upgradeManager = GetComponent(); _bombsUtilManager = BombsUtilManager.Instance; + _preStageUi = GameObject.Find("PreStageUI"); + } + public void Start() + { + StartCoroutine(PreInitGame()); InitGame(); } @@ -44,12 +52,28 @@ namespace src.Managers { _levelManager.InitLevel(); } - - /* Listen for meta keys */ - private void Update(){ - if (Input.GetKeyDown(KeyCode.Escape)) - Application.Quit(); + private IEnumerator PreInitGame() + { + _preStageUi.SetActive(true); + yield return new WaitForSeconds(0.7f); + _preStageUi.SetActive(false); } + private void Update() + { + ListenForMetaKeys(); + } + + private static void ListenForMetaKeys() + { + if (Input.GetKeyDown(KeyCode.Escape)) + { + ApplicationActions.QuitGame(); + } + else if (Input.GetKeyDown(KeyCode.P)) + { + ApplicationActions.HandlePauseKey(); + } + } } } \ No newline at end of file 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 13b93fe..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,11 +37,13 @@ namespace src.Player private void FixedUpdate() { + if (_gameStateManager.IsGamePaused) {return;} HandleMovement(); } private void Update() { + 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: 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}