Menu camera

This commit is contained in:
nexovec 2022-01-30 11:43:57 +01:00
parent e5a83b0434
commit e66a25df63
4 changed files with 5197 additions and 166 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,9 @@ public class UiController : MonoBehaviour
public TextMeshProUGUI uiDistance;
public TextMeshProUGUI uiHighScore;
public GameObject menuCamera;
public GameObject playerCamera;
public static float distance = 0;
public static int highScore = 0;
private float oldDistance = 0.0f;
@ -23,6 +26,11 @@ public class UiController : MonoBehaviour
UiController.LoadGame();
}
public void OnStartGameBtnClick()
{
menuCamera.SetActive(false);
playerCamera.SetActive(true);
}
public static void SaveGame()
{
if (UiController.distance > UiController.highScore)

View File

@ -7,7 +7,7 @@ public class gizmoManager : MonoBehaviour
void OnDrawGizmos()
{
if (!this.gameObject.transform.parent.name.Contains("chunk"))
if (this.gameObject != null && !this.gameObject.transform.parent.name.Contains("chunk"))
{
Bounds bounds = GetChildRendererBounds(gameObject);
Gizmos.DrawWireCube(bounds.center, bounds.size);

View File

@ -19,89 +19,12 @@ MonoBehaviour:
width: 2560
height: 1357
m_ShowMode: 4
m_Title: Scene
m_RootView: {fileID: 5}
m_MinSize: {x: 875, y: 371}
m_Title: Hierarchy
m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 1
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ProjectBrowser
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 776
width: 632
height: 383
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 18}
m_Panes:
- {fileID: 18}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 11}
- {fileID: 2}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 632
height: 1159
m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 123
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ConsoleWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 1159
width: 2041
height: 148
m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 19}
m_Panes:
- {fileID: 19}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -114,9 +37,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 6}
- {fileID: 8}
- {fileID: 7}
- {fileID: 3}
- {fileID: 5}
- {fileID: 4}
m_Position:
serializedVersion: 2
x: 0
@ -129,7 +52,7 @@ MonoBehaviour:
m_TopViewHeight: 30
m_UseBottomView: 1
m_BottomViewHeight: 20
--- !u!114 &6
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -151,7 +74,7 @@ MonoBehaviour:
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
m_LastLoadedLayoutName:
--- !u!114 &7
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -172,7 +95,7 @@ MonoBehaviour:
height: 20
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
--- !u!114 &8
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -185,19 +108,19 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 9}
- {fileID: 13}
- {fileID: 6}
- {fileID: 12}
m_Position:
serializedVersion: 2
x: 0
y: 30
width: 2560
height: 1307
m_MinSize: {x: 300, y: 300}
m_MaxSize: {x: 24288, y: 24288}
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 16
--- !u!114 &9
controlID: 72
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -210,19 +133,19 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 10}
- {fileID: 4}
- {fileID: 7}
- {fileID: 11}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 2041
height: 1307
m_MinSize: {x: 200, y: 300}
m_MaxSize: {x: 16192, y: 24288}
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
controlID: 17
--- !u!114 &10
controlID: 73
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -235,19 +158,20 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
- {fileID: 12}
- {fileID: 8}
- {fileID: 9}
- {fileID: 10}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 2041
height: 1159
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
height: 791
m_MinSize: {x: 300, y: 100}
m_MaxSize: {x: 24288, y: 8096}
vertical: 0
controlID: 18
--- !u!114 &11
controlID: 74
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -264,8 +188,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 632
height: 776
width: 280
height: 791
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 15}
@ -273,7 +197,7 @@ MonoBehaviour:
- {fileID: 15}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &12
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -288,20 +212,45 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 632
x: 280
y: 0
width: 1409
height: 1159
width: 759
height: 791
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
- {fileID: 16}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: GameView
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 1039
y: 0
width: 1002
height: 791
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 17}
m_Panes:
- {fileID: 17}
m_Selected: 0
m_LastSelected: 2
--- !u!114 &13
m_LastSelected: 0
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -311,7 +260,34 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_Name: ConsoleWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 791
width: 2041
height: 516
m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 19}
m_Panes:
- {fileID: 18}
- {fileID: 19}
m_Selected: 1
m_LastSelected: 0
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: InspectorWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
@ -325,8 +301,37 @@ MonoBehaviour:
m_ActualView: {fileID: 20}
m_Panes:
- {fileID: 20}
- {fileID: 13}
m_Selected: 0
m_LastSelected: 0
m_LastSelected: 1
--- !u!114 &13
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12079, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 390, y: 390}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Lighting
m_Image: {fileID: -1347227620855488341, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 2041
y: 73
width: 518
height: 1286
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
--- !u!114 &14
MonoBehaviour:
m_ObjectHideFlags: 52
@ -347,10 +352,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 632
x: 280
y: 73
width: 1407
height: 1138
width: 757
height: 770
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -382,7 +387,7 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: 0, y: 25}
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: unity-scene-view-toolbar
@ -536,7 +541,7 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 25}
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Particles
@ -552,9 +557,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -30.019299, y: -1.2377149, z: -0.91902}
m_Target: {x: 499.93808, y: 755.19403, z: -21.3553}
speed: 2
m_Value: {x: -30.019299, y: -1.2377149, z: -0.91902}
m_Value: {x: 499.93808, y: 755.19403, z: -21.3553}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -601,13 +606,13 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
m_Target: {x: 0.027451817, y: 0.96783864, z: -0.21877639, w: 0.12141912}
m_Target: {x: -0.017384099, y: 0.8829029, z: 0.03286803, w: 0.46808013}
speed: 2
m_Value: {x: 0.027632907, y: 0.967475, z: -0.22022009, w: 0.1213735}
m_Value: {x: -0.017384106, y: 0.8829033, z: 0.032868046, w: 0.46808034}
m_Size:
m_Target: 3.8080583
m_Target: 10
speed: 2
m_Value: 3.8080583
m_Value: 10
m_Ortho:
m_Target: 0
speed: 2
@ -654,8 +659,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73
width: 631
height: 755
width: 279
height: 770
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -665,7 +670,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: e6faffff
m_ExpandedIDs: 063fdaff5e3fdaffea40daffbc8addffd0fbdefffefbdeff1cfcdeff1efcdeff3a3fe5ff34e3edff36e3edff229beeffa207efffa407effff2a6f1fff4a6f1ff9639f2ffc484f2ff98e4f4ff66edf4ff1817f5ffba50f5ffbc50f5ffa27bf5ffa67bf5ffa87bf5ffec4ef6ff1a4ff6ff3a4ff6ff4841f7ff4064f8ffc6a7f8ffeeadf8ff0eaef8ff76aff8ff2818faff2c18faff1a19faff9419faff2037faff8838faff0cbcfbffb88cfcff8c8dfcffbe8dfcffbe92fcff4493fcffd6f7ffffdaf7ffff32f8ffff00fbffff9c4e00007ca30000b4a3000016010100be0601006e2c0100f25001005c5801003e71010038bb010018dc020042dc02006edc0200a4dc0200
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -681,7 +686,7 @@ MonoBehaviour:
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 11}
m_ClientGUIView: {fileID: 8}
m_SearchString:
m_ExpandedScenes: []
m_CurrenRootInstanceID: 0
@ -737,10 +742,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 505
x: 1039
y: 73
width: 1534
height: 1138
width: 1000
height: 770
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -751,7 +756,7 @@ MonoBehaviour:
m_ShowGizmos: 0
m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
m_TargetSize: {x: 1534, y: 1117}
m_TargetSize: {x: 1000, y: 749}
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
@ -766,10 +771,10 @@ MonoBehaviour:
m_VRangeLocked: 0
hZoomLockedByDefault: 0
vZoomLockedByDefault: 0
m_HBaseRangeMin: -767
m_HBaseRangeMax: 767
m_VBaseRangeMin: -569
m_VBaseRangeMax: 569
m_HBaseRangeMin: -500
m_HBaseRangeMax: 500
m_VBaseRangeMin: -374.5
m_VBaseRangeMax: 374.5
m_HAllowExceedBaseRangeMin: 1
m_HAllowExceedBaseRangeMax: 1
m_VAllowExceedBaseRangeMin: 1
@ -786,24 +791,24 @@ MonoBehaviour:
m_DrawArea:
serializedVersion: 2
x: 0
y: 0
width: 1534
height: 1138
y: 21
width: 1000
height: 749
m_Scale: {x: 1, y: 1}
m_Translation: {x: 767, y: 569}
m_Translation: {x: 500, y: 374.5}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -767
y: -569
width: 1534
height: 1138
x: -500
y: -374.5
width: 1000
height: 749
m_MinimalGUI: 1
m_defaultScale: 1
m_LastWindowPixelSize: {x: 1534, y: 1138}
m_LastWindowPixelSize: {x: 1000, y: 770}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@ -830,9 +835,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 0
y: 849
width: 631
height: 362
y: 864
width: 2040
height: 495
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -850,22 +855,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Prefabs/platforms
- Assets/Scripts
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Prefabs/platforms
- Assets/Scripts
m_LastFoldersGridSize: -1
m_LastProjectPath: C:\Users\sande\Desktop\Gamejam\GGJ2022
m_LastProjectPath: C:\Users\nexovec\Documents\unity\GGJ2022
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 3a4f0000
m_LastClickedID: 20282
m_ExpandedIDs: 00000000104f0000124f00002a4f000000ca9a3b
m_SelectedIDs: 7a4f0000
m_LastClickedID: 20346
m_ExpandedIDs: 00000000704f0000784f000082dc0000fa3c0100b45f010000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -893,7 +898,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000104f0000124f0000
m_ExpandedIDs:
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -918,10 +923,10 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_SelectedInstanceIDs: a0e0dcff
m_LastClickedInstanceID: -2301792
m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: c6230000ae4f0000ca4f0000ac510000b2510000
m_ExpandedInstanceIDs: c6230000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -937,7 +942,7 @@ MonoBehaviour:
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 2}
m_ClientGUIView: {fileID: 12}
m_CreateAssetUtility:
m_EndAction: {fileID: 0}
m_InstanceID: 0
@ -948,7 +953,7 @@ MonoBehaviour:
m_ScrollPosition: {x: 0, y: 0}
m_GridSize: 64
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 293
m_DirectoriesAreaWidth: 115
--- !u!114 &19
MonoBehaviour:
m_ObjectHideFlags: 52
@ -970,9 +975,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 0
y: 1232
y: 864
width: 2040
height: 127
height: 495
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default