private void DisableCutSceneAndReenablePlayer() { LevelHandler.GetPlayer().GetComponent <Player.PlayerController>().LockControls = false; CameraBehavior camB = Dim.LevelHandler.GetCamera().GetComponent <CameraBehavior>(); camB.OnCutSceneEnd -= DisableCutSceneAndReenablePlayer; Destroy(gameObject); }
private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { CameraBehavior camB = Dim.LevelHandler.GetCamera().GetComponent <CameraBehavior>(); if (cutScene != null) { camB.OnCutSceneEnd += DisableCutSceneAndReenablePlayer; camB.SetToCutScene(cutScene); LevelHandler.GetPlayer().GetComponent <Player.PlayerController>().LockControls = true; } } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { CameraBehavior camB = Dim.LevelHandler.GetCamera().GetComponent <CameraBehavior>(); if (!IsSetup) { Debug.LogError("This Camera Transition is not setup."); return; } if (FollowPlayer) { camB.SetToPlayerFollow(FollowRelativePos, Rotation); } else { camB.SetToStatic(StaticPos, Rotation); } } }