Add MainMenu and pause menu

Transitions between menus work
This commit is contained in:
Soulaha Balde 2022-05-14 23:16:48 -04:00
parent 6a8b37bf05
commit ba99bbb4f0
7 changed files with 3930 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -183,6 +183,22 @@ MonoBehaviour:
m_Calls: []
m_ActionId: 61ddf11f-3478-4887-ab86-0ead8dde336f
m_ActionName: UI/TrackedDeviceOrientation
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: EnterPause
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_ActionId: 1e10adeb-97dd-4b7c-9f30-b3fce70f993a
m_ActionName: Player/Pause[/Keyboard/escape,/Keyboard/p]
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme:
m_DefaultActionMap: Player

View File

@ -134,6 +134,64 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 44fc4a66977bce94dbaccf9ae1d06e2b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1407792874 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6969840675499469968, guid: 486166ffed264a842ab4bc0affec38c4, type: 3}
m_PrefabInstance: {fileID: 6969840674995165991}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1571118493
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1571118495}
- component: {fileID: 1571118494}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1571118494
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1571118493}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cbbe9406db76ed447bdc7c36883ee139, type: 3}
m_Name:
m_EditorClassIdentifier:
_controls: {fileID: 1407792874}
_state: 0
ui: {fileID: 1822990541}
--- !u!4 &1571118495
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1571118493}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 351.26254, y: 364.53677, z: -7.2002945}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1822990540
PrefabInstance:
m_ObjectHideFlags: 0
@ -141,22 +199,286 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 297948476404860644, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 297948476404860644, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 297948476404860644, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 297948476404860644, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 425090134378490078, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 425090134378490078, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 425090134378490078, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 100.00001
objectReference: {fileID: 0}
- target: {fileID: 425090134378490078, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -25
objectReference: {fileID: 0}
- target: {fileID: 430403745636601587, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: player
value:
objectReference: {fileID: 1407792871}
- target: {fileID: 1245760476298502058, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_IsActive
- target: {fileID: 877886674277595571, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 877886674277595571, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2082787375140496085, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2082787375140496085, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2082787375140496085, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2082787375140496085, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2651780916393450759, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2651780916393450759, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2651780916393450759, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 320.61346
objectReference: {fileID: 0}
- target: {fileID: 2651780916393450759, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -25
objectReference: {fileID: 0}
- target: {fileID: 2695976781126370413, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 2695976781126370413, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3203615922723506192, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: player
value:
objectReference: {fileID: 1407792871}
- target: {fileID: 3290620518113273233, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3290620518113273233, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3290620518113273233, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3290620518113273233, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3726360089292738754, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3726360089292738754, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3726360089292738754, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 320.61346
objectReference: {fileID: 0}
- target: {fileID: 3726360089292738754, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -25
objectReference: {fileID: 0}
- target: {fileID: 3829834968911239637, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 3829834968911239637, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3829834968911239637, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 3868787890645716629, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3868787890645716629, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3868787890645716629, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3868787890645716629, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4088869081495123135, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: player
value:
objectReference: {fileID: 1407792871}
- target: {fileID: 4487556644161876901, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 4487556644161876901, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4487556644161876901, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 4637900801277279150, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4637900801277279150, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4637900801277279150, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4637900801277279150, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4864102413907297127, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4864102413907297127, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4864102413907297127, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4864102413907297127, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5156634212059812228, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1571118494}
- target: {fileID: 6054892815323966725, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6054892815323966725, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6054892815323966725, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 200
objectReference: {fileID: 0}
- target: {fileID: 6054892815323966725, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -173.77817
objectReference: {fileID: 0}
- target: {fileID: 6093655991451943081, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6093655991451943081, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6093655991451943081, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 100.00001
objectReference: {fileID: 0}
- target: {fileID: 6093655991451943081, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -25
objectReference: {fileID: 0}
- target: {fileID: 6310781014458571912, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6310781014458571912, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6310781014458571912, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6310781014458571912, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6508712462537823371, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6508712462537823371, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6508712462537823371, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6508712462537823371, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7115721288431601857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7115721288431601857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7115721288431601857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 320.61346
objectReference: {fileID: 0}
- target: {fileID: 7115721288431601857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -25
objectReference: {fileID: 0}
- target: {fileID: 7226858076299792826, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_Pivot.x
value: 0
@ -249,8 +571,139 @@ PrefabInstance:
propertyPath: player
value:
objectReference: {fileID: 1407792871}
- target: {fileID: 8145377689690508936, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8145377689690508936, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8145377689690508936, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8145377689690508936, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8183383574400522882, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8183383574400522882, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8183383574400522882, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 200
objectReference: {fileID: 0}
- target: {fileID: 8183383574400522882, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -34.755634
objectReference: {fileID: 0}
- target: {fileID: 8397818908293747857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8397818908293747857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8397818908293747857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8397818908293747857, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8477939615244931290, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8477939615244931290, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8477939615244931290, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 200
objectReference: {fileID: 0}
- target: {fileID: 8477939615244931290, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -104.26691
objectReference: {fileID: 0}
- target: {fileID: 8537247833070452607, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 8537247833070452607, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8537247833070452607, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 8714066585298625451, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.x
value: 0.775
objectReference: {fileID: 0}
- target: {fileID: 8714066585298625451, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8762152485571598497, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762152485571598497, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762152485571598497, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762152485571598497, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8773558742081360758, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8810935160172039527, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8810935160172039527, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8810935160172039527, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.x
value: 100.00001
objectReference: {fileID: 0}
- target: {fileID: 8810935160172039527, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
propertyPath: m_AnchoredPosition.y
value: -25
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
--- !u!114 &1822990541 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4088869081495123135, guid: 1fbf5b38e74bdfe4185768d47372abe2, type: 3}
m_PrefabInstance: {fileID: 1822990540}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 79b7d4d08379c4a4b9c0c4a91499fb6d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1966667440
GameObject:
m_ObjectHideFlags: 0
@ -376,6 +829,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6969840675499469968, guid: 486166ffed264a842ab4bc0affec38c4, type: 3}
propertyPath: m_ActionEvents.Array.data[13].m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1571118494}
- target: {fileID: 6969840675499469969, guid: 486166ffed264a842ab4bc0affec38c4, type: 3}
propertyPath: m_RootOrder
value: 0

View File

@ -5,9 +5,11 @@ public class GameManager : MonoBehaviour
{
[SerializeField] private PlayerInput _controls;
[SerializeField, ReadOnly] private GameState _state;
[SerializeField] private UIController ui;
public static GameManager Instance { get; private set; }
private void Awake()
{
if (Instance != null && Instance != this)
@ -34,10 +36,24 @@ public class GameManager : MonoBehaviour
// Show Options (Return to Menu / Retry)
_state = GameState.Loss;
}
public void EnterPause(){
_controls.SwitchCurrentActionMap("UI");
_state = GameState.Pause;
ui.EnterPause();
}
public void ExitPause(){
_controls.SwitchCurrentActionMap("Player");
_state = GameState.InGame;
ui.ExitPause();
}
}
public enum GameState
{
MainMenu,
InGame,
Loss
Loss,
Pause
}

View File

@ -7,10 +7,13 @@ public class UIController : MonoBehaviour
{
[SerializeField]private PlayerController player;
[SerializeField]private TMP_Text pointsTxt;
[SerializeField]private Transform pausePnl;
[SerializeField]private Transform optionsPnl;
// Start is called before the first frame update
void Start()
{
pausePnl.gameObject.SetActive(false);
optionsPnl.gameObject.SetActive(false);
}
// Update is called once per frame
@ -18,4 +21,26 @@ public class UIController : MonoBehaviour
{
pointsTxt.text = player.GetPoints().ToString();
}
public void EnterPause(){
pausePnl.gameObject.SetActive(true);
}
public void ExitPause(){
pausePnl.gameObject.SetActive(false);
}
public void OnOptions(){
ExitPause();
optionsPnl.gameObject.SetActive(true);
}
public void OnBack(){
optionsPnl.gameObject.SetActive(false);
EnterPause();
}
public void OnQuit(){
Application.Quit();
}
}

View File

@ -53,6 +53,15 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Pause"",
""type"": ""Button"",
""id"": ""1e10adeb-97dd-4b7c-9f30-b3fce70f993a"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@ -275,6 +284,28 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
""action"": ""Fire"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""53312b67-7bed-4fba-950b-f39295c65c51"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Pause"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""e219b9a4-11c4-4175-b34c-c0a729cf0fe6"",
""path"": ""<Keyboard>/p"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Pause"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
@ -863,6 +894,7 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
m_Player_Look = m_Player.FindAction("Look", throwIfNotFound: true);
m_Player_Fire = m_Player.FindAction("Fire", throwIfNotFound: true);
m_Player_Pause = m_Player.FindAction("Pause", throwIfNotFound: true);
// UI
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
@ -937,6 +969,7 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
private readonly InputAction m_Player_Move;
private readonly InputAction m_Player_Look;
private readonly InputAction m_Player_Fire;
private readonly InputAction m_Player_Pause;
public struct PlayerActions
{
private @ConjureCreativeJam20 m_Wrapper;
@ -944,6 +977,7 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
public InputAction @Move => m_Wrapper.m_Player_Move;
public InputAction @Look => m_Wrapper.m_Player_Look;
public InputAction @Fire => m_Wrapper.m_Player_Fire;
public InputAction @Pause => m_Wrapper.m_Player_Pause;
public InputActionMap Get() { return m_Wrapper.m_Player; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
@ -962,6 +996,9 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
@Fire.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnFire;
@Fire.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnFire;
@Fire.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnFire;
@Pause.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnPause;
@Pause.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnPause;
@Pause.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnPause;
}
m_Wrapper.m_PlayerActionsCallbackInterface = instance;
if (instance != null)
@ -975,6 +1012,9 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
@Fire.started += instance.OnFire;
@Fire.performed += instance.OnFire;
@Fire.canceled += instance.OnFire;
@Pause.started += instance.OnPause;
@Pause.performed += instance.OnPause;
@Pause.canceled += instance.OnPause;
}
}
}
@ -1134,6 +1174,7 @@ public partial class @ConjureCreativeJam20 : IInputActionCollection2, IDisposabl
void OnMove(InputAction.CallbackContext context);
void OnLook(InputAction.CallbackContext context);
void OnFire(InputAction.CallbackContext context);
void OnPause(InputAction.CallbackContext context);
}
public interface IUIActions
{

View File

@ -31,6 +31,15 @@
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Pause",
"type": "Button",
"id": "1e10adeb-97dd-4b7c-9f30-b3fce70f993a",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
@ -253,6 +262,28 @@
"action": "Fire",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "53312b67-7bed-4fba-950b-f39295c65c51",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e219b9a4-11c4-4175-b34c-c0a729cf0fe6",
"path": "<Keyboard>/p",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
}
]
},