private void FishReelStarted(FishStats stats, Fish fish) { if (m_currState != FishingState.Waiting) { Debug.LogError("Received fish reel started event while in state (" + m_currState + ")"); } m_currFishingSign.FishingArea.ActivateFish(false); m_fishingController.StartFishing(stats, fish); m_fishingReticle.SetAnimTriggReelStart(); m_fishingRod.SetAnimTriggReelStart(); m_uiManager.ToggleInstructions(""); ChangeState(FishingState.Reeling); }
//TODO - awfull private void _onRightButtonClick(GameObject clickedGO, Vector3 point) { GameObject player = GameObject.FindGameObjectWithTag("PlayerSelf"); FishPool fishPool = clickedGO.GetComponent <FishPool>(); FishingTarget fishingTarget = clickedGO.GetComponent <FishingTarget>(); if (FishingHelper.canStartFishing(fishingController.throwDistance, player.transform.position, point, clickedGO) && fishPool) { // TODO - Fix This fishingController.StartFishing(point, fishPool, player.GetComponent <Player>()); } else if (fishingTarget != null) { fishingTarget.TriggerFishOn(); } else if (UnitSelection.IsSelected(player)) { player.GetComponent <Player>().MoveTo(point); } }