Add SFX to dialogue, revamp control scheme (broken world map camera)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using Scampz.GameJam.Assets.Scripts;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
@@ -29,7 +30,6 @@ namespace Scampz.GameJam
|
||||
|
||||
private IEnumerator LoadSceneAsync(string sceneName, Transform spawnPoint, LoadSceneMode loadSceneMode)
|
||||
{
|
||||
Debug.Log("Start Level Load");
|
||||
yield return null;
|
||||
var loadSceneOperation = SceneManager.LoadSceneAsync(sceneName, loadSceneMode);
|
||||
loadSceneOperation.allowSceneActivation = false;
|
||||
@@ -43,14 +43,17 @@ namespace Scampz.GameJam
|
||||
loadSceneOperation.allowSceneActivation = true;
|
||||
yield return loadSceneOperation;
|
||||
|
||||
Debug.Log("Stop Level Load");
|
||||
|
||||
if (SceneManager.GetActiveScene().name == sceneName)
|
||||
{
|
||||
Debug.Log("Move Player");
|
||||
var player = GameObject.FindGameObjectWithTag("Player");
|
||||
player.transform.position = spawnPoint.transform.position;
|
||||
player.transform.rotation = spawnPoint.transform.rotation;
|
||||
|
||||
var camera = player.GetComponentInChildren<Camera>();
|
||||
if (SceneManager.GetActiveScene().name == SceneNames.WorldMap)
|
||||
camera.enabled = true;
|
||||
else
|
||||
camera.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user