Änderungen am 17.03.2025 aus der Schule getroffen.
This commit is contained in:
25
Assets/Scripts/MenuScene/ChangeScene.cs
Normal file
25
Assets/Scripts/MenuScene/ChangeScene.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Change scene
|
||||
/// </summary>
|
||||
|
||||
public class ChangeScene : MonoBehaviour
|
||||
{
|
||||
public void MoveToGameScene()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("GameScene");
|
||||
}
|
||||
|
||||
public void Quit()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
#else
|
||||
Application.Quit();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/MenuScene/ChangeScene.cs.meta
Normal file
11
Assets/Scripts/MenuScene/ChangeScene.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45e7dae11c5b90043b7b716843727a0a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,7 +5,7 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
public class MenuScript : MonoBehaviour
|
||||
{
|
||||
// time logic
|
||||
/* // time logic
|
||||
public TextMeshProUGUI TimeText;
|
||||
|
||||
void Start()
|
||||
@@ -26,6 +26,7 @@ public class MenuScript : MonoBehaviour
|
||||
|
||||
// gameObject.transform.Rotate(0, 0, -400 * Time.deltaTime);
|
||||
}
|
||||
*/
|
||||
public void ChangeScene()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("GameScene");
|
||||
|
||||
Reference in New Issue
Block a user