Scripte hinzugefügt, CreditsScene komplett bis auf Audio

This commit is contained in:
2025-09-24 08:59:18 +02:00
parent 45fc820405
commit 004e49ff8d
87 changed files with 62213 additions and 13 deletions

View File

@@ -4,7 +4,9 @@ using UnityEngine.SceneManagement;
public class CreditsScript : MonoBehaviour
{
public float scrollSpeed = 20f;
public float scrollSpeed;
private float maxScrollSpeed = 300f;
[SerializeField] public float maxYPosition;
private RectTransform rectTransform;
@@ -23,9 +25,24 @@ public class CreditsScript : MonoBehaviour
SceneManager.LoadSceneAsync(0);
}
if (Input.GetKeyDown(KeyCode.Space))
if (Input.GetKey(KeyCode.Space))
{
scrollSpeed += 100;
scrollSpeed += 50;
if (scrollSpeed > maxScrollSpeed)
{
scrollSpeed = maxScrollSpeed;
}
}
else
{
scrollSpeed = 100f;
}
if (transform.position.y >= maxYPosition)
{
Debug.Log("The End");
}
}
}