private void OnTriggerExit(Collider other) { if (other.transform.tag == GameController.instance.GetPlayerTag()) { CameraAnimationController camAnimationController = other.GetComponentInChildren <CameraAnimationController>(); ProcessTriggerExit(camAnimationController); } }
private void OnTriggerEnter(Collider other) { if (other.transform.tag == GameController.instance.GetPlayerTag()) { CameraAnimationController camAnimationController = other.GetComponentInChildren <CameraAnimationController>(); if (camAnimationController == null) { Debug.LogError("No camera animation controller found on player"); } ProcessTriggerEnter(camAnimationController); } }
private void Awake() { _controllers = new Controllers(); Initialization(); ScreenInterface.GetInstance().Execute(ScreenType.GameMenu); _mainCanvas = GameObject.FindGameObjectWithTag("MainCanvas").GetComponent <Canvas>(); _gameMenu = _mainCanvas.GetComponentInChildren <GameMenuBehaviour>(); _helpButton = _gameMenu.GameMenuHelpButton; _tutorialHand = _mainCanvas.GetComponentInChildren <TutorialHandBehaviour>(); CardDealerController = (CardDealerController)_controllers._initializations[0]; DifficultyController = (DifficultyController)_controllers._initializations[1]; CameraAnimationController = GetComponentInChildren <CameraAnimationController>(); }
protected abstract void ProcessTriggerExit(CameraAnimationController cam);
protected override void ProcessTriggerExit(CameraAnimationController cam) { cam.ResetCenteredView(); }
protected override void ProcessTriggerEnter(CameraAnimationController cam) { cam.PlayCenterToRightAnimation(); }