Commit 31006064 authored by Markus Schlösser's avatar Markus Schlösser

Finished main menu

parent fd5e9843
......@@ -234,78 +234,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
scene: Assets/_Game/MainMenu/MainMenu.unity
delay: 5
--- !u!1 &290534362
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 290534363}
- component: {fileID: 290534365}
- component: {fileID: 290534364}
m_Layer: 5
m_Name: TMP SubMeshUI [tetri SDF Material + LiberationSans SDF Atlas]
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &290534363
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 290534362}
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: 2133193051}
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!114 &290534364
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 290534362}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 058cba836c1846c3aa1c5fd2e28aea77, 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_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_spriteAsset: {fileID: 0}
m_material: {fileID: 0}
m_sharedMaterial: {fileID: 0}
m_isDefaultMaterial: 0
m_padding: 1.25
m_canvasRenderer: {fileID: 290534365}
m_TextComponent: {fileID: 2133193052}
m_materialReferenceIndex: 1
--- !u!222 &290534365
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 290534362}
m_CullTransparentMesh: 0
--- !u!1 &480427843
GameObject:
m_ObjectHideFlags: 0
......@@ -551,8 +479,7 @@ RectTransform:
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:
- {fileID: 290534363}
m_Children: []
m_Father: {fileID: 251314230}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -579,7 +506,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "A problem has been detectedand system has been shutdown to prevent damage
m_text: "A problem has been detected and system has been shutdown to prevent damage
to your computer.\n\nPROCESS1_INITIALIZATION_FAILED\n\nIf this is the first time
you\xB4ve seen this stop error screen, restart your computer, if this screen appears
again, follow these steps:\n\nCheck to make sure any new hardware or software
......@@ -635,7 +562,7 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: 855
m_firstOverflowCharacterIndex: 856
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
......@@ -659,10 +586,10 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 2133193052}
characterCount: 893
characterCount: 894
spriteCount: 0
spaceCount: 141
wordCount: 134
spaceCount: 142
wordCount: 135
linkCount: 0
lineCount: 30
pageCount: 1
......@@ -673,7 +600,7 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 290534364}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
......
This diff is collapsed.
fileFormatVersion: 2
guid: ac5fca7ca4ee3ee4f8806a0b12017d41
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: 84c523596ac9b3048a65aa0732219edd, type: 3}
m_Name: Scribble Fall
m_EditorClassIdentifier:
scenePath: Assets/_Game/Scribble Fall/Scenes/Gameplay.unity
displayName: Scribble Fall
sprite: {fileID: 21300000, guid: f4c1de1ab073a344e9e145415cbcd97c, type: 3}
fileFormatVersion: 2
guid: 1bc9ca6600f9f9042b0e5c45fe686b9b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 699b3cabdbebb6a4c87394789c9dc4ba
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a521dc573a29d0d45ace203d4977786f
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: VCR OSD Mono
fontNames:
- VCR OSD Mono
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: ac5fca7ca4ee3ee4f8806a0b12017d41
guid: 4a9bb80e052f9f545b3f7d094c6fbfc9
DefaultImporter:
externalObjects: {}
userData:
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3098848323997019428
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6804092524612662238}
- component: {fileID: 6763393063470543290}
- component: {fileID: 8765433713456036908}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6804092524612662238
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3098848323997019428}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2565163144796709128}
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: 10, y: 10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6763393063470543290
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3098848323997019428}
m_CullTransparentMesh: 0
--- !u!114 &8765433713456036908
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3098848323997019428}
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_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
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 &6809626927723439284
GameObject:
m_ObjectHideFlags: 0
......@@ -27,7 +100,7 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 9082363233416221665}
- {fileID: 2565163144796709128}
m_Father: {fileID: 4994692637312868614}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -36,6 +109,58 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -100, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &7059942173420372750
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2565163144796709128}
- component: {fileID: 7237730556862581959}
m_Layer: 5
m_Name: Pivot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2565163144796709128
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7059942173420372750}
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:
- {fileID: 6804092524612662238}
- {fileID: 9082363233416221665}
m_Father: {fileID: 8729743269950843928}
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.5, y: 0.5}
--- !u!114 &7237730556862581959
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7059942173420372750}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 3
m_AspectRatio: 1
--- !u!1 &7718283016460092572
GameObject:
m_ObjectHideFlags: 0
......@@ -86,7 +211,6 @@ GameObject:
- component: {fileID: 9082363233416221671}
- component: {fileID: 9082363233416221670}
- component: {fileID: 9082363233416221674}
- component: {fileID: 1447884624026788190}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
......@@ -105,11 +229,11 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8729743269950843928}
m_RootOrder: 0
m_Father: {fileID: 2565163144796709128}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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}
......@@ -151,7 +275,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -182,10 +306,10 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.7058824, g: 0.7058824, b: 0.7058824, a: 1}
m_PressedColor: {r: 0.43137255, g: 0.43137255, b: 0.43137255, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_HighlightedColor: {r: 0.7058824, g: 0.7058824, b: 0, a: 1}
m_PressedColor: {r: 0.43137255, g: 0.43137255, b: 0, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
......@@ -200,7 +324,7 @@ MonoBehaviour:
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 9082363233416221671}
m_TargetGraphic: {fileID: 8765433713456036908}
m_OnClick:
m_PersistentCalls:
m_Calls: []
......@@ -247,17 +371,3 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1447884624026788190
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9082363233416221664}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 3
m_AspectRatio: 1
......@@ -15,7 +15,7 @@ public class GameSelectButton : MonoBehaviour {
public void Initialize(Game g) {
this.game = g;
button.image.sprite = game.Sprite;
GetComponent<Image>().sprite = game.Sprite;
}
private void OnEnable() {
......
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class MainMenuController : MonoBehaviour {
[SerializeField] [ScenePath] private string bluescreenScene;
......@@ -28,6 +33,10 @@ public class MainMenuController : MonoBehaviour {
GameSelectButton button = obj.GetComponentInChildren<GameSelectButton>();
button.Initialize(game);
if (game == games[0]) {
button.GetComponent<Selectable>().Select();
}
RectTransform tr = obj.GetComponent<RectTransform>();
if (pos.x + ButtonSize.x > RowWidth) {
......@@ -59,4 +68,14 @@ public class MainMenuController : MonoBehaviour {
public void LoadGame(Game game) {
SceneManager.LoadScene(string.IsNullOrWhiteSpace(game.ScenePath) ? bluescreenScene : game.ScenePath);
}
public void CloseGame() {
#if UNITY_EDITOR
EditorApplication.isPlaying = false;
#elif UNITY_WEBGL
Application.OpenURL("about:blank");
#else
Application.Quit(0);
#endif
}
}
......@@ -7,10 +7,13 @@ EditorBuildSettings:
m_Scenes:
- enabled: 1
path: Assets/_Game/MainMenu/MainMenu.unity
guid: ac5fca7ca4ee3ee4f8806a0b12017d41
guid: 4a9bb80e052f9f545b3f7d094c6fbfc9
- enabled: 1
path: Assets/_Game/MainMenu/Bluescreen.unity
guid: b5c669e19a490ac409259bbcef1be499
- enabled: 1
path: Assets/_Game/MainMenu/Credits.unity
guid: ac5fca7ca4ee3ee4f8806a0b12017d41
- enabled: 1
path: Assets/_Game/SpaceAttacker/SpaceAttacker.unity
guid: 82451a917be44ff45aa07b5ed3128438
......@@ -20,4 +23,7 @@ EditorBuildSettings:
- enabled: 1
path: Assets/_Game/Peng/Peng.unity
guid: 2640b24037f31db489ade4bb30098a84
- enabled: 1
path: Assets/_Game/Scribble Fall/Scenes/Gameplay.unity
guid: 868016437747f494ab4c5371ffcfb51f
m_configObjects: {}
......@@ -126,7 +126,7 @@ QualitySettings:
skinWeights: 2
textureQuality: 0
anisotropicTextures: 0
antiAliasing: 0
antiAliasing: 4
softParticles: 0
softVegetation: 1
realtimeReflectionProbes: 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment