added a start screen and scene manager

This commit is contained in:
slevy14
2023-04-23 22:18:37 -07:00
parent 17f9048e6b
commit 617d45d372
32 changed files with 3010 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneController : MonoBehaviour
{
private int currentSceneIndex = 0;
// this object will always exist!
void Awake() {
DontDestroyOnLoad(this.gameObject);
}
// public void NextScene() {
// currentSceneIndex += 1;
// print("attempting to load scene " + currentSceneIndex);
// if (currentSceneIndex < SceneManager.sceneCount) {
// SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
// } else {
// print("no more scenes!");
// }
// }
public void NextScene() {
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5e67b11a22e4341028302b6c176640cb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: