Fix bug with ShipMoveSides script reference

This commit is contained in:
r.nikolin 2023-10-30 17:26:19 +03:00
parent 996684f064
commit 5c7d84cca8
3 changed files with 349 additions and 532 deletions

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@ public class CutsceneController : MonoBehaviour
private void Awake() private void Awake()
{ {
_shipMoveSides = FindObjectOfType<ShipPathFollower>().GetComponent<ShipMoveSides>(); _shipMoveSides = FindObjectOfType<PlayerInputHandler>().GetComponent<ShipMoveSides>();
_previewModule = FindObjectOfType<PreviewModule>(); _previewModule = FindObjectOfType<PreviewModule>();
} }
@ -28,6 +28,7 @@ public class CutsceneController : MonoBehaviour
private IEnumerator CutsceneCoroutine() private IEnumerator CutsceneCoroutine()
{ {
Debug.Log("Cutscene Coroutine");
_shipMoveSides.ToggleInput(false); _shipMoveSides.ToggleInput(false);
_previewModule.TogglePanel(true); _previewModule.TogglePanel(true);
_cutscene.Play(); _cutscene.Play();

View File

@ -13,7 +13,7 @@ public class FinishController : MonoBehaviour
private void Awake() private void Awake()
{ {
_moveSides = FindObjectOfType<ShipMoveSides>(); _moveSides = FindObjectOfType<PlayerInputHandler>().GetComponent<ShipMoveSides>();
_vTimerCounter = FindObjectOfType<vTimerCounter>(); _vTimerCounter = FindObjectOfType<vTimerCounter>();
_monumentController = FindObjectOfType<MonumentController>(); _monumentController = FindObjectOfType<MonumentController>();
} }