private void OnStickDirection(Vector2 steer) { if (steer != Vector2.zero && ResetOnMove && isButtonHighlighted()) { GetTrayInputButton(); if (trayInputButton != null) { trayInputButton.SetState(TrayInputButton.ButtonState.Default); } } }
private bool onSetFishingState(FishingEvents.SetFishingState evt) { if (evt.State == FishingEvents.FishingState.Hold) { trayInputButton.SetState(TrayInputButton.ButtonState.Default); } else if (evt.State == FishingEvents.FishingState.Cast) { trayInputButton.SetState(TrayInputButton.ButtonState.Disabled); } return(false); }
private void setButtonState(bool pulsate) { if (trayInputButton != null) { memberLockedButton.IsLocked = !memberLockedButton.IsPlayerAMember && isInteractingObjectMemberOnly(); if (pulsate) { trayInputButton.SetState(TrayInputButton.ButtonState.Pulsing); } else { trayInputButton.SetState(TrayInputButton.ButtonState.Disabled); } } }
private void updateBaitUI() { isQuest = !string.IsNullOrEmpty(Service.Get <QuestService>().CurrentFishingPrize); if (isQuest) { baitUI.SetActive(value: false); clock.SetActive(value: false); tooltipInputButton.TooltipEnabled = false; if (!casted) { trayInputButton.SetState(TrayInputButton.ButtonState.Pulsing); } else { trayInputButton.SetState(TrayInputButton.ButtonState.Default); } return; } CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>(); if (cPDataEntityCollection.TryGetComponent <MiniGamePlayCountData>(cPDataEntityCollection.LocalPlayerHandle, out var component)) { if (!component.MinigamePlayCounts.ContainsKey("fishing")) { component.SetMinigamePlayCount("fishing", 0); } baitCount = 10 - component.MinigamePlayCounts["fishing"]; baitText.text = baitCount.ToString(); if (baitCount == 0) { baitUI.SetActive(value: false); CalculateTomorrowMidnight(); clock.SetActive(value: true); tooltipInputButton.TooltipEnabled = true; trayInputButton.SetState(TrayInputButton.ButtonState.Highlighted); } else { baitUI.SetActive(value: true); clock.SetActive(value: false); tooltipInputButton.TooltipEnabled = false; setActiveTrayState(); } } else { Log.LogError(this, "Unable to retrieve MiniGamePlayCountData from CPDataEntityCollection."); } }
private bool onActivateBobberButton(FishingEvents.ActivateBobberButton evt) { trayInputButton.SetState(TrayInputButton.ButtonState.Default); return(false); }
private void onButtonClicked() { previousState = trayInputButton.CurrentState; trayInputButton.SetState(TrayInputButton.ButtonState.Disabled); CoroutineRunner.Start(delayedCooldown(), this, "delayedCooldown"); }
private void changeState(bool isSliding) { this.isSliding = isSliding; trayInputButton.SetState((!isSliding) ? TrayInputButton.ButtonState.Default : TrayInputButton.ButtonState.Highlighted); }