Level Selection related stuff added

This commit is contained in:
Syntriax 2022-02-24 00:21:59 +03:00
parent ed15d8b75b
commit 8d1bacaf31
21 changed files with 1401 additions and 107 deletions

View File

@ -0,0 +1,522 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1413473222649459454
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6392637838872281331}
- component: {fileID: 6162104096347775627}
- component: {fileID: 7110658289772660020}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6392637838872281331
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1413473222649459454}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3735588448366101350}
m_Father: {fileID: 6660900531265158430}
m_RootOrder: 2
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: 1720, y: 500}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6162104096347775627
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1413473222649459454}
m_CullTransparentMesh: 1
--- !u!114 &7110658289772660020
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1413473222649459454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: c471a796e16900f44b445bea29004a2a, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2120646872644151684
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4779075409259281688}
- component: {fileID: 8565817609160098221}
- component: {fileID: 809963219330998723}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4779075409259281688
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2120646872644151684}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6660900531265158430}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -100}
m_SizeDelta: {x: 1420, y: 100}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &8565817609160098221
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2120646872644151684}
m_CullTransparentMesh: 1
--- !u!114 &809963219330998723
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2120646872644151684}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Levels
'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: fbc77f9554209854ebcb8cec2d5a6500, type: 2}
m_sharedMaterial: {fileID: -3588260055619463648, guid: fbc77f9554209854ebcb8cec2d5a6500, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 72
m_fontSizeBase: 72
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 144
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4080534417285008830
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3735588448366101350}
m_Layer: 5
m_Name: Level Buttons
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3735588448366101350
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4080534417285008830}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6392637838872281331}
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: -200, y: -200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &5478200016571558490
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 6660900531265158430}
m_Modifications:
- target: {fileID: 777263041127367713, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_Name
value: Back
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_SizeDelta.x
value: 500
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchoredPosition.x
value: -100
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchoredPosition.y
value: 100
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 17163941832433796}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: SwitchToCanvas
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: UI.CanvasUIConnection, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
value: Main Menu
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 8836694927704227170, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_text
value: 'Back
'
objectReference: {fileID: 0}
- target: {fileID: 8836694927704227170, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_fontSize
value: 48
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
--- !u!1001 &7785589179834392115
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1107566897619702753, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_Name
value: Level Selection Menu Variant
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_SizeDelta.x
value: 1920
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_SizeDelta.y
value: 1080
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalPosition.z
value: -0.60936356
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_AnchoredPosition.x
value: 960
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_AnchoredPosition.y
value: 540
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
--- !u!114 &17163941832433796 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7797704133434769079, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
m_PrefabInstance: {fileID: 7785589179834392115}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7157669111835512274}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 24e57cccec2e3944e93ca23e706e03a9, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &6660900531265158430 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3493594456440070957, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
m_PrefabInstance: {fileID: 7785589179834392115}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7157669111835512274 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1107566897619702753, guid: 16d5d75ef61cad14f9aba53761139517, type: 3}
m_PrefabInstance: {fileID: 7785589179834392115}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4184295548922517407
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7157669111835512274}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c861d2bd3b90214da0c159643ba1528, type: 3}
m_Name:
m_EditorClassIdentifier:
maxGridSize: {x: 7, y: 2}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c077e52cbda9f004d961ad8fa73dd4c6
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -273,6 +273,38 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 104820794676267161}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: SwitchToCanvas
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: UI.CanvasUIConnection, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument
value: Level Selection Menu
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 8836694927704227170, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_text
value: Play

View File

@ -35,6 +35,7 @@ RectTransform:
- {fileID: 2395952303949800626}
- {fileID: 3478571348516091811}
- {fileID: 3449278017735274394}
- {fileID: 6657227549961222659}
m_Father: {fileID: 8835447878742992447}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -226,6 +227,112 @@ MonoBehaviour:
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_DeselectOnBackgroundClick: 1
m_PointerBehavior: 0
--- !u!1001 &5484988550399773
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 8712347139740347692}
m_Modifications:
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_SizeDelta.x
value: 1920
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_SizeDelta.y
value: 1080
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalPosition.z
value: -0.60936356
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 960
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 540
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7157669111835512274, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_Name
value: Level Selection Menu
objectReference: {fileID: 0}
- target: {fileID: 7157669111835512274, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
--- !u!224 &6657227549961222659 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6660900531265158430, guid: c077e52cbda9f004d961ad8fa73dd4c6, type: 3}
m_PrefabInstance: {fileID: 5484988550399773}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &14934207860601896
PrefabInstance:
m_ObjectHideFlags: 0
@ -549,6 +656,10 @@ PrefabInstance:
propertyPath: m_Name
value: Main Menu
objectReference: {fileID: 0}
- target: {fileID: 7070010764070954447, guid: e39f79604445aa94cb9c7e710be33b3f, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7454378227294013889, guid: e39f79604445aa94cb9c7e710be33b3f, type: 3}
propertyPath: m_fontSize
value: 48

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9d0d473130b7e334c99ae1bfa9b70441
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Resources/UI.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7620005a83ce6594caeafecf762225f2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,152 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &8870488083683404034
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 777263041127367713, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_Name
value: Level Button Variant
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_SizeDelta.x
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalPosition.z
value: 0.60936356
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3632035635143609546, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 7072089412526406432}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: StartLevel
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: UI.LevelButton, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 3806988352586753806, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 8836694927704227170, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_text
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8836694927704227170, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
propertyPath: m_fontSize
value: 48
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
--- !u!1 &8201944925288738083 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 777263041127367713, guid: 5c04a1de900c1474c98622e4b3880522, type: 3}
m_PrefabInstance: {fileID: 8870488083683404034}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7072089412526406432
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8201944925288738083}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 159a88a420256634c8758e2b1501c29a, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7cc267b14b327c24b8540456f358113c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1619,62 +1619,6 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 245926659986223294, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 824769369955617666, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1108797734940297071, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1223623990800834390, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2190229848147629182, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3403585388977359407, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3561650887137008148, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4410568269018354420, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4772454080493380724, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5962319374639302853, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6045445082603185284, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7575667667802855240, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_Alpha
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7575667667802855240, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_Interactable
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7575667667802855240, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_BlocksRaycasts
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7804154879131926840, guid: 4978bf886d6bbe0448d5f68e7eb2b48a, type: 3}
propertyPath: m_Name
value: UI
@ -1898,5 +1842,9 @@ PrefabInstance:
propertyPath: m_Name
value: Key Press Interactable
objectReference: {fileID: 0}
- target: {fileID: 5551167095143660491, guid: 10dc04857fa9e7747b5a5fb9624c4a68, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 10dc04857fa9e7747b5a5fb9624c4a68, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9152a48d03f7bde468d1a3e428225713
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,44 @@
using UnityEngine;
namespace Level
{
public class Level : MonoBehaviour
{
public const string ResourcesDirectory = "Levels/";
public string LevelName { get; private set; } = "";
public Transform StartingPoint { get; private set; } = null;
private GameObject prefab = null;
private GameObject instance = null;
private bool needsRestart = true;
public void SetLevel(string levelName)
{
LevelName = levelName;
prefab = Resources.Load<GameObject>($"{ ResourcesDirectory }{ levelName }");
Disable();
}
public void Enable()
{
gameObject.SetActive(true);
needsRestart = true;
}
public void Disable()
{
if (!needsRestart)
return;
if (instance != null)
Destroy(instance);
instance = Instantiate(prefab, transform.position, Quaternion.identity, transform);
StartingPoint = instance.transform.Find("Starting Point");
gameObject.SetActive(false);
needsRestart = false;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69df2de2c96af5a4484964cc90840292
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using UI;
using UnityEngine;
namespace Level
{
public class LevelManager : MonoBehaviour
{
private static LevelManager _instance = null;
public static LevelManager Instance
{
get
{
if (_instance == null)
{
GameObject gameObject = new GameObject("Level Manager");
_instance = gameObject.AddComponent<LevelManager>();
_instance.Initialize();
}
return _instance;
}
}
private Dictionary<string, Level> _levels = null;
public Dictionary<string, Level> Levels
{
get
{
if (_levels == null)
Initialize();
return _levels;
}
}
private Level currentLevel = null;
private void Awake()
{
if (_instance == null)
_instance = this;
if (_instance != this)
Destroy(this);
}
private void Initialize()
{
GameObject[] levelPrefabs = Resources.LoadAll<GameObject>("Levels/");
Transform levelContainer = new GameObject("Levels").transform;
_levels = new Dictionary<string, Level>(levelPrefabs.Length);
System.Array.Sort(levelPrefabs, (x, y) => Int32.Parse(x.name).CompareTo(Int32.Parse(y.name)));
GameObject levelInstance = null;
Level level = null;
foreach (GameObject levelPrefab in levelPrefabs)
{
levelInstance = new GameObject(levelPrefab.gameObject.name);
levelInstance.transform.SetParent(levelContainer);
level = levelInstance.AddComponent<Level>();
level.SetLevel(levelPrefab.name);
_levels.Add(levelPrefab.gameObject.name, level);
}
}
public void SwitchToLevel(string levelName)
{
DisableAllLevels();
currentLevel = Levels[levelName];
currentLevel.Enable();
// TODO Move Player To currentLevel.StartingPoint
UIManager.Instance.CloseAllCanvases();
}
private void DisableAllLevels()
{
foreach (Level level in Levels.Values)
level.Disable();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 10b4751f48f29094981414367190e392
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
using Level;
using TMPro;
using UnityEngine;
namespace UI
{
public class LevelButton : MonoBehaviour
{
private TMP_Text text = null;
private void Awake() => text = GetComponentInChildren<TMP_Text>();
public void SetLevel(string levelName) => text.text = levelName;
public void StartLevel() => LevelManager.Instance.SwitchToLevel(text.text);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 159a88a420256634c8758e2b1501c29a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,55 @@
using System;
using Level;
using UnityEngine;
namespace UI
{
public class LevelSelectionMenu : MonoBehaviour
{
[SerializeField] private Vector2Int maxGridSize = Vector2Int.one;
private GameObject levelButtonPrefab = null;
private void Awake()
{
levelButtonPrefab = Resources.Load<GameObject>("UI/Level Button Variant");
}
private void Start()
{
LevelButton instance = null;
int rowIndex = 0;
int columnIndex = 0;
int i = 0;
int count = LevelManager.Instance.Levels.Values.Count;
RectTransform rectTransform = levelButtonPrefab.transform.GetComponent<RectTransform>();
float rowOffset = (int)(count / maxGridSize.x) * rectTransform.rect.height * 0.75f;
float columnOffset = -maxGridSize.x * rectTransform.rect.width * 0.75f;
if (maxGridSize.x % 2 == 1)
columnOffset += rectTransform.rect.width * 0.75f;
RectTransform instanceRectTransform = null;
Vector3 instancePosition = Vector3.zero;
foreach (var level in LevelManager.Instance.Levels.Values)
{
if (i > maxGridSize.x * maxGridSize.y)
break;
rowIndex = i / maxGridSize.x;
columnIndex = i % maxGridSize.x;
instance = Instantiate(levelButtonPrefab, transform.position, Quaternion.identity, transform).GetComponent<LevelButton>();
instance.SetLevel(level.name);
instanceRectTransform = instance.transform.GetComponent<RectTransform>();
instancePosition.y = rowOffset - rowIndex * instanceRectTransform.rect.height * 1.5f;
instancePosition.x = columnOffset + columnIndex * instanceRectTransform.rect.width * 1.5f;
instanceRectTransform.localPosition = instancePosition;
i++;
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8c861d2bd3b90214da0c159643ba1528
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -29,6 +29,8 @@ namespace UI
public void CloseAllCanvases()
{
Initialize();
foreach (Canvas canvas in canvases.Values)
canvas.gameObject.SetActive(false);
}

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,9 @@ EditorUserSettings:
RecentlyUsedSceneGuid-2:
value: 5002060403010b5f0f560e7a47260a444f4f1e2e2f2e27312f7f4536e0b6633d
flags: 0
RecentlyUsedSceneGuid-3:
value: 06550c57540350025c0b0f2747220a44174f4b73297070642b714465b0e6366e
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
flags: 0