public void Awake() { if (Dolly == null) { Dolly = GetComponent <RailDolly>(); } }
private void getReferences() { minigameService = Service.Get <MinigameService>(); eventDispatcher = Service.Get <EventDispatcher>(); questService = Service.Get <QuestService>(); player = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject; locomotionBroadcaster = player.GetComponent <LocomotionEventBroadcaster>(); fishingRod = getChildByName(player, "FishingRodProp(Clone)"); _rodPropLineEndTransform = getChildByName(fishingRod, "string_end_jnt").transform; playerAnimator = player.GetComponent <Animator>(); fishingRodAnimator = fishingRod.GetComponent <Animator>(); prizeDropContainerAnimator = prizeDropContainer.GetComponentInChildren <Animator>(); _bobberAnimator = bobberRootTransform.GetComponentInChildren <Animator>(); GameObject gameObject = GameObject.Find("CinematicFishing"); cinematicCameraFishingController = gameObject.GetComponent <CameraController>(); GameObject gameObject2 = GameObject.Find("CinematicFishingZoom"); cinematicCameraFishingControllerZoom = gameObject2.GetComponent <CameraController>(); for (int i = 0; i < cinematicCameraFishingController.GoalPlanners.Length; i++) { RailDollyGoalPlanner railDollyGoalPlanner = cinematicCameraFishingController.GoalPlanners[i] as RailDollyGoalPlanner; if (railDollyGoalPlanner != null) { _cameraDolly = railDollyGoalPlanner.Dolly; break; } } RailDollyFramer railDollyFramer = cinematicCameraFishingController.Framer as RailDollyFramer; if (railDollyFramer != null) { _cameraDollyFocus = railDollyFramer.Dolly; } userControl = player.GetComponent <PenguinUserControl>(); }