Add SFX to dialogue, revamp control scheme (broken world map camera)

This commit is contained in:
2022-08-17 22:12:53 -07:00
parent 294b113598
commit bc8092d454
29 changed files with 1413 additions and 485 deletions

View File

@@ -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;
}
}
}