protected override void Awake() { base.Awake(); this.downloadingLabel.text = StringMaster.GetString("AssetDownloadTitle"); this.adviceLabel.text = StringMaster.GetString("AssetDownloadCaution"); this.SetFrontUIs(false); this.partsGaugePoint = base.GetComponentInChildren <PartsGaugePoint>(); this.swipeController = base.gameObject.AddComponent <SwipeControllerLR>(); this.swipeController.SetThreshold(30f); this.swipeController.SetActionSwipe(new Action(this.OnPushedRightButton), new Action(this.OnPushedLeftButton)); }
public IEnumerator OpenWindow(List <string> pageResourcesNames, bool isDisplayThumbnail, Action closedAction, Action closeButtonClickAction = null) { this.nowPageIndex = 0; this.pageNum = pageResourcesNames.Count; if (isDisplayThumbnail) { Vector3 localPosition = base.transform.localPosition; localPosition.x += 100f; base.transform.localPosition = localPosition; } for (int i = 0; i < pageResourcesNames.Count; i++) { if (i >= this.pages.Length) { this.AddPages(); } yield return(base.StartCoroutine(this.LoadPage(pageResourcesNames[i], this.pages[i]))); } this.pageMark.Initialize(pageResourcesNames.Count); this.pageArrow.Initialize(pageResourcesNames.Count); this.actionCloseWindow = closedAction; this.actionCloseButtonClick = closeButtonClickAction; this.pages[0].SetActive(true); this.StartWindowAnimation(true, TutorialImageWindow.WindowMoveType.ACTIVE); this.pageMark.StartDisplay(); if (this.swipeCont == null) { this.swipeCont = base.gameObject.AddComponent <SwipeControllerLR>(); } this.swipeCont.SetThreshold(30f); this.SetSwipeActionByEnd(); this.closeButton.SetActive(true); TweenAlpha tweenAlpha = this.closeButton.GetComponent <TweenAlpha>(); tweenAlpha.from = 0f; tweenAlpha.to = 1f; tweenAlpha.PlayForward(); this.pageButton.gameObject.SetActive(true); this.DisplayedCloseButton(); yield break; }