Menue scene mit funktionierenden Buttons und Start Script für den PlayerController

This commit is contained in:
2026-06-11 15:13:17 +02:00
parent 0ff200e5de
commit 572cc5a8b0
10 changed files with 301 additions and 9 deletions
+23
View File
@@ -0,0 +1,23 @@
//Oliver
using UnityEngine;
using UnityEngine.UI;
public class PlayerController : MonoBehaviour
{
private int speed;
Vector3 position = Vector3.zero;
private Text score;
private int points;
Rigidbody rb;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
rb = GetComponent<Rigidbody>;
}
// Update is called once per frame
void Update()
{
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5e857b6f5c4484c449d9e726f2fc5d36
+26
View File
@@ -0,0 +1,26 @@
// Oliver
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class UIHandler : MonoBehaviour
{
public void Start()
{
}
public void ChangeScene(string sceneName)
{
SceneManager.LoadScene(sceneName);
}
public void Quit()
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 039d8264ac1c9ed42a3657361d73ced5