MAJOR: Re-organize entire project

This commit is contained in:
2022-08-15 11:56:39 -07:00
parent 1e4c73ea1e
commit 49b14df1af
322 changed files with 3010 additions and 33674 deletions

View File

@@ -0,0 +1,29 @@
using Scampz.GameJam.Assets.Scripts;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Scampz.GameJam
{
public class LoadScene : MonoBehaviour
{
private bool loaded = false;
public Transform spawnPoint;
[SerializeField]
private string scene;
void OnTriggerEnter(Collider collider)
{
if (!loaded)
{
loaded = true;
var player = GameObject.FindWithTag("Player");
var cc = player.GetComponent<CharacterController>();
cc.enabled = false;
GameManager.Instance.LoadScene(scene, LoadSceneMode.Additive);
player.transform.position = spawnPoint.position;
player.transform.rotation = spawnPoint.rotation;
cc.enabled = true;
}
}
}
}