Start piecing together zones
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Scampz.GameJam
|
||||
public class LoadScene : MonoBehaviour
|
||||
{
|
||||
private bool loaded = false;
|
||||
public Transform spawnPoint;
|
||||
public int sceneIndex;
|
||||
|
||||
void OnTriggerEnter(Collider collider)
|
||||
@@ -15,6 +16,8 @@ namespace Scampz.GameJam
|
||||
loaded = true;
|
||||
|
||||
GameManager.Instance.LoadScene(sceneIndex, LoadSceneMode.Additive);
|
||||
GameObject.FindWithTag("Player").transform.position = spawnPoint.position;
|
||||
GameObject.FindWithTag("Player").transform.rotation = spawnPoint.rotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user