1
0
Fork 0

Fixed missing bgm

This commit is contained in:
Himusoka 2018-04-23 22:01:07 +02:00
parent 4c40b6b165
commit 98816e4f5b

View file

@ -283,16 +283,18 @@ public class GameController : MonoBehaviour {
StartObjective goal = new StartObjective(start, playerPrefab); StartObjective goal = new StartObjective(start, playerPrefab);
start.SetObjective(goal); start.SetObjective(goal);
start.OnPlayerEnter(player); start.OnPlayerEnter(player);
player = goal.GetPlayer(); player = goal.GetPlayer();
cam.GetComponent<AudioControl>().LevelBgm();
if ( player != null ) { if ( player != null ) {
cam.GetComponent<CameraControl>().SetFollow(player.gameObject); cam.GetComponent<CameraControl>().SetFollow(player.gameObject);
GetUI().InitHealthController(player); GetUI().InitHealthController(player);
GetUI().InitBrakeController(player); GetUI().InitBrakeController(player);
} else { } else {
Debug.Log("No Player spawned!"); Debug.Log("No Player spawned!");
} }
finish.SetObjective(new FinishObjective(finish)); finish.SetObjective(new FinishObjective(finish));
cam.GetComponent<AudioControl>().LevelBgm();
} }
private void Running() { private void Running() {