Implementation of the Main- and Options-menu
This commit is contained in:
8
Assets/Images.meta
Normal file
8
Assets/Images.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ab73a99d8466b442bc9626a10e51342
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Images/LurchLoad.png
(Stored with Git LFS)
Normal file
BIN
Assets/Images/LurchLoad.png
(Stored with Git LFS)
Normal file
Binary file not shown.
99
Assets/Images/LurchLoad.png.meta
Normal file
99
Assets/Images/LurchLoad.png.meta
Normal file
@@ -0,0 +1,99 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6670c15714c4db54a98fc9f850e092ff
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Models/StoneyBoye.blend
(Stored with Git LFS)
Normal file
BIN
Assets/Models/StoneyBoye.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
96
Assets/Models/StoneyBoye.blend.meta
Normal file
96
Assets/Models/StoneyBoye.blend.meta
Normal file
@@ -0,0 +1,96 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddf3da377e80bd64fbec2a9b0930f7d7
|
||||
ModelImporter:
|
||||
serializedVersion: 23
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
400000: //RootNode
|
||||
2100000: Material
|
||||
2300000: //RootNode
|
||||
3300000: //RootNode
|
||||
4300000: Cube
|
||||
7400000: Default Take
|
||||
9500000: //RootNode
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
previousCalculatedGlobalScale: 1
|
||||
hasPreviousCalculatedGlobalScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1288
Assets/Prefabs/Menue_Manager.prefab
Normal file
1288
Assets/Prefabs/Menue_Manager.prefab
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Prefabs/Menue_Manager.prefab.meta
Normal file
8
Assets/Prefabs/Menue_Manager.prefab.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12fa2ee3da7cfc74492b3ca6d368347f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1573
Assets/Scenes/MainMenu.unity
Normal file
1573
Assets/Scenes/MainMenu.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/MainMenu.unity.meta
Normal file
7
Assets/Scenes/MainMenu.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25de82ce17d00ae44a4d430a0c69bef6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -351,6 +351,128 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &353969753 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 114123996009525022, guid: 8bcf2afca6664234f83b5ee8381b1975,
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 1187842046}
|
||||
m_Script: {fileID: 11500000, guid: 9a548db4f33b8a24aa4ebca81f61e6dd, type: 3}
|
||||
--- !u!1001 &546080828
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -1.1697227
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 4.084561
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -16.537073
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4034444186376736, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114231797141046820, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: lurchScript
|
||||
value:
|
||||
objectReference: {fileID: 353969753}
|
||||
- target: {fileID: 114907732206292950, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_Value
|
||||
value: 0.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224827299162199612, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.24000001
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224827299162199612, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.44
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224190537634124508, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224190537634124508, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -256.45
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224190537634124508, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 129.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224485806171950896, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224485806171950896, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224485806171950896, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -361.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224471551056386074, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224471551056386074, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224471551056386074, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -361.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224590447434586862, guid: 12fa2ee3da7cfc74492b3ca6d368347f,
|
||||
type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1733452443825242, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 12fa2ee3da7cfc74492b3ca6d368347f, type: 2}
|
||||
m_IsPrefabAsset: 0
|
||||
--- !u!1 &793616625
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -438,6 +560,68 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!1 &1017672842
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1017672845}
|
||||
- component: {fileID: 1017672844}
|
||||
- component: {fileID: 1017672843}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1017672843
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017672842}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1017672844
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017672842}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1017672845
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017672842}
|
||||
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: 0}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1187842046
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -94,6 +94,7 @@ public class LurchMovement : MonoBehaviour {
|
||||
if (lockMouse)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
96
Assets/Scripts/MainMenue.cs
Normal file
96
Assets/Scripts/MainMenue.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MainMenue : MonoBehaviour {
|
||||
|
||||
[Header("Slider")]
|
||||
public Scrollbar sliderAudio;
|
||||
|
||||
[Header("Buttons")]
|
||||
public Button exitButton;
|
||||
public Button playButton;
|
||||
public string levelName;
|
||||
|
||||
[Header("Loading")]
|
||||
public GameObject loadingStuff;
|
||||
public RectTransform loadingIcon;
|
||||
public GameObject finishedLoading;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
loadingStuff.SetActive(false);
|
||||
finishedLoading.SetActive(false);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
Sliders();
|
||||
Buttons();
|
||||
}
|
||||
|
||||
void Sliders()
|
||||
{
|
||||
AudioListener.volume = sliderAudio.value;
|
||||
}
|
||||
|
||||
void Buttons()
|
||||
{
|
||||
|
||||
if (playButton)
|
||||
{
|
||||
playButton.onClick.AddListener(TaskLoadScene);
|
||||
}
|
||||
|
||||
exitButton.onClick.AddListener(TaskExit);
|
||||
}
|
||||
|
||||
void TaskExit()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
void TaskLoadScene()
|
||||
{
|
||||
StartCoroutine(LoadScene());
|
||||
}
|
||||
|
||||
IEnumerator LoadScene()
|
||||
{
|
||||
yield return null;
|
||||
|
||||
//Begin to load the Scene you specify
|
||||
AsyncOperation asyncOperation = SceneManager.LoadSceneAsync(levelName);
|
||||
//Don't let the Scene activate until you allow it to
|
||||
asyncOperation.allowSceneActivation = false;
|
||||
Debug.Log("Pro :" + asyncOperation.progress);
|
||||
//When the load is still in progress, output the Text and progress bar
|
||||
while (!asyncOperation.isDone)
|
||||
{
|
||||
loadingStuff.SetActive(true);
|
||||
float rotPlus = 0.0f;
|
||||
rotPlus -= 0.03f;
|
||||
loadingIcon.Rotate(new Vector3(0, 0, rotPlus));
|
||||
|
||||
if (asyncOperation.progress >= 0.9f)
|
||||
{
|
||||
finishedLoading.SetActive(true);
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
asyncOperation.allowSceneActivation = true;
|
||||
}
|
||||
}
|
||||
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/MainMenue.cs.meta
Normal file
11
Assets/Scripts/MainMenue.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cef20558221ae14a83b89064e674720
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
16
Assets/Scripts/OptionsMenu.cs
Normal file
16
Assets/Scripts/OptionsMenu.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class OptionsMenu : MonoBehaviour {
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/OptionsMenu.cs.meta
Normal file
11
Assets/Scripts/OptionsMenu.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24dcdb215c8fed5408db771f2fc46159
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
79
Assets/Scripts/OptionsMenue.cs
Normal file
79
Assets/Scripts/OptionsMenue.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class OptionsMenue : MonoBehaviour {
|
||||
|
||||
[Header("Basics")]
|
||||
public GameObject optionsMenue;
|
||||
public LurchMovement lurchScript;
|
||||
|
||||
[Header("Slider")]
|
||||
public Scrollbar sliderSensitivity;
|
||||
public Scrollbar sliderAudio;
|
||||
|
||||
[Header("Buttons")]
|
||||
public Button exitButton;
|
||||
public Button resumeButton;
|
||||
public Button playButton;
|
||||
public string levelName;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
optionsMenue.SetActive(false);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
optionsMenue.SetActive(true);
|
||||
if (lurchScript) {
|
||||
lurchScript.enabled = false;
|
||||
}
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
Sliders();
|
||||
Buttons();
|
||||
}
|
||||
|
||||
void Sliders()
|
||||
{
|
||||
lurchScript.mouseSensitivity = sliderSensitivity.value * 4;
|
||||
AudioListener.volume = sliderAudio.value;
|
||||
}
|
||||
|
||||
void Buttons()
|
||||
{
|
||||
if (resumeButton) {
|
||||
resumeButton.onClick.AddListener(TaskResume);
|
||||
}
|
||||
|
||||
if (playButton)
|
||||
{
|
||||
playButton.onClick.AddListener(TaskLoadScene);
|
||||
}
|
||||
|
||||
exitButton.onClick.AddListener(TaskExit);
|
||||
}
|
||||
|
||||
void TaskResume()
|
||||
{
|
||||
lurchScript.enabled =true;
|
||||
optionsMenue.SetActive(false);
|
||||
}
|
||||
|
||||
void TaskExit()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
void TaskLoadScene()
|
||||
{
|
||||
SceneManager.LoadScene(levelName);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/OptionsMenue.cs.meta
Normal file
11
Assets/Scripts/OptionsMenue.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a1cce7599c3ac142bda0dad33d09510
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,6 +5,9 @@ EditorBuildSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainMenu.unity
|
||||
guid: 25de82ce17d00ae44a4d430a0c69bef6
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/SampleScene.unity
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
|
||||
@@ -35,6 +35,8 @@ GraphicsSettings:
|
||||
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
--- !u!310 &1
|
||||
UnityConnectSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Enabled: 0
|
||||
m_Enabled: 1
|
||||
m_TestMode: 0
|
||||
m_TestEventUrl:
|
||||
m_TestConfigUrl:
|
||||
|
||||
Reference in New Issue
Block a user