public void OnClick(ButtonClickEvent e, NewsItemWithUINode newsItem, [JoinAll] UserNode user, [JoinByUser] SingleNode <ClientLocaleComponent> clientLocale) { CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); base.ScheduleEvent(eventInstance, newsItem); if (!eventInstance.TutorialIsActive) { base.Log.InfoFormat("OnClickNewsItem: {0}", newsItem); if (!string.IsNullOrEmpty(newsItem.newsItem.Data.InternalUrl)) { NavigateLinkEvent event3 = new NavigateLinkEvent { Link = newsItem.newsItem.Data.InternalUrl }; base.ScheduleEvent(event3, newsItem); } else { string externalUrl = newsItem.newsItem.Data.ExternalUrl; if (!string.IsNullOrEmpty(externalUrl)) { Application.OpenURL(externalUrl.Replace(ID, user.Entity.Id.ToString()).Replace(RANK, user.userRank.Rank.ToString()).Replace(UID, user.userUid.Uid).Replace(LOCALE, clientLocale.component.LocaleCode)); } } } }
public void Hide() { CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); base.ScheduleEvent(eventInstance, EngineService.EntityStub); if (!eventInstance.TutorialIsActive) { this.Cancel(); } }
public void ShowTooltip(object data) { CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); TooltipShowBehaviour.EngineService.Engine.ScheduleEvent(eventInstance, TooltipShowBehaviour.EngineService.EntityStub); if (!eventInstance.TutorialIsActive) { TooltipController.Instance.ShowTooltip(Input.mousePosition, data, !base.customContentPrefab ? null : base.customPrefab, true); } }
public override void ShowTooltip(Vector3 mousePosition) { base.tooltipShowed = true; Entity moduleEntity = base.GetComponent <ModuleCardItemUIComponent>().ModuleEntity; Engine engine = TooltipShowBehaviour.EngineService.Engine; CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); engine.ScheduleEvent(eventInstance, TooltipShowBehaviour.EngineService.EntityStub); if (!eventInstance.TutorialIsActive) { engine.ScheduleEvent <ModuleTooltipShowEvent>(moduleEntity); } }
public void Fill(NodeAddedEvent e, EnergyCompensationNotificationNode notification, SingleNode <EnergyCompensationDialog> dialogNode, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens) { CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); base.ScheduleEvent(eventInstance, notification); if (eventInstance.TutorialIsActive) { base.ScheduleEvent <NotificationShownEvent>(notification); } else { EnergyCompensationDialog component = dialogNode.component; List <Animator> animators = !screens.IsPresent() ? new List <Animator>() : screens.Get().component.Animators; component.Show(notification.energyCompensationNotification.Charges, notification.energyCompensationNotification.Crys, animators); } }
public void SetRestricted(bool restricted) { this.Restricted = restricted; this.restriction.gameObject.SetActive(restricted); this.blockLayer.gameObject.SetActive(restricted); CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); base.ScheduleEvent(eventInstance, new EntityStub()); this.SetAvailableForSquadMode(false, false, false); if (!restricted && eventInstance.TutorialIsActive) { base.GetComponent <Button>().interactable = false; } else { base.GetComponent <Button>().interactable = !restricted; } }
public override void ShowTooltip(Vector3 mousePosition) { CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); TooltipShowBehaviour.EngineService.Engine.ScheduleEvent(eventInstance, TooltipShowBehaviour.EngineService.EntityStub); if (!eventInstance.TutorialIsActive) { base.tooltipShowed = true; if (this.IsMaxLeague) { TooltipController.Instance.ShowTooltip(mousePosition, base.tipText, null, true); } else { TooltipController.Instance.ShowTooltip(mousePosition, this.leagueData, base.customPrefab, true); } } }
public override void ShowTooltip(Vector3 mousePosition) { Engine engine = TooltipShowBehaviour.EngineService.Engine; CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); engine.ScheduleEvent(eventInstance, TooltipShowBehaviour.EngineService.EntityStub); if (!eventInstance.TutorialIsActive) { base.tooltipShowed = true; if (this.slot.Locked) { this.ShowLockedModuleTooltip(); } else if (this.slot.SlotEntity != null) { engine.ScheduleEvent <ModuleTooltipShowEvent>(this.slot.SlotEntity); } } }
private void LateUpdate() { if ((this.items.Count == 0) || (this.selectedItem < 0)) { this.elapsedTime = 0f; } else { if (this.selectedItem != this.prevSelectedItem) { if (this.prevSelectedItem >= 0) { this.items[this.prevSelectedItem].Deselect(); } this.items[this.selectedItem].Select(); this.onItemSelected(this.items[this.selectedItem]); this.prevSelectedItem = this.selectedItem; } if (this.drag) { this.elapsedTime = 0f; } else { float axis = Input.GetAxis("Horizontal"); CheckForTutorialEvent eventInstance = new CheckForTutorialEvent(); base.ScheduleEvent(eventInstance, EngineService.EntityStub); if (axisBlockedAtCurrentTick || ((axis == 0f) || ((this.inputElapsedTime < this.inputThreshold) || eventInstance.TutorialIsActive))) { this.inputElapsedTime += Time.deltaTime; } else { if (axis > 0f) { this.selectedItem = Mathf.Min((int)(this.selectedItem + 1), (int)(this.itemsCount - 1)); } else if (axis < 0f) { this.selectedItem = Mathf.Max(this.selectedItem - 1, 0); } this.inputElapsedTime = 0f; } axisBlockedAtCurrentTick = false; this.targetPosition = -this.items[this.selectedItem].RectTransform.anchoredPosition.x; if (Mathf.Approximately(this.content.anchoredPosition.x, this.targetPosition)) { this.elapsedTime = 0f; } else { Vector2 anchoredPosition = this.content.anchoredPosition; if (this.elapsedTime == 0f) { this.startPosition = anchoredPosition.x; } anchoredPosition.x = Mathf.MoveTowards(anchoredPosition.x, this.targetPosition, (Time.deltaTime * Mathf.Abs((float)(this.startPosition - this.targetPosition))) / this.fitDuration); this.content.anchoredPosition = anchoredPosition; this.elapsedTime += Time.deltaTime; } } } }