public void ShowMap(AdvEngine advEngine, string mapDataName, bool onRead = false) { ShortcutExtensions46.DOFade(this.mapCanvas, 1f, !onRead ? 0.5f : 0f); this.shown = true; this.mapCanvas.set_blocksRaycasts(true); this.engine = advEngine; if (mapDataName.Contains("|")) { mapDataName = this.GetRandomMapData(mapDataName); } this.currentMapData = mapDataName; if (mapDataName.Substring(0, 2).Contains("重")) { mapDataName = mapDataName.Substring(0, 2) + "/" + mapDataName; } string[][] arrayCollection = MyTool.ParseTSV(MyTool.LoadText("MapData/" + mapDataName)); string[] arrayByFirstElement = MyTool.GetArrayByFirstElement(arrayCollection, "Area"); int index = MyTool.ParseInt(MyTool.GetArrayByFirstElement(arrayCollection, "Mode")[2], 1) - 1; List <string> list = new List <string>(arrayByFirstElement); foreach (Button button in this.areaButtons) { bool flag = false; string[] strArray3 = new string[0]; if (list.Contains(button.get_gameObject().get_name())) { flag = true; strArray3 = MyTool.GetArrayByFirstElement(arrayCollection, button.get_gameObject().get_name()); } button.get_gameObject().SetActive(flag); if (flag) {
//退出行动面板,一般在点击按钮开始执行日常时调用 private void ExitActionPanel() { ShortcutExtensions46.DOFade(this.actionCanvas, 0f, 0.5f); this.actionCanvas.set_blocksRaycasts(false); this.wait = false; this.active = false; }
private void Exit() { this.wait = false; this.active = false; ShortcutExtensions46.DOFade(base.get_transform().GetComponent <CanvasGroup>(), 0f, 0f); base.get_transform().GetComponent <CanvasGroup>().set_blocksRaycasts(false); }
public void AddMessage(string content, bool byPlayer, AdvEngine engine) { engine.BacklogManager.AddIMLog(content, !byPlayer ? this.contact : "泠珞"); engine.BacklogManager.AddPage(); GameObject obj2 = Object.Instantiate <GameObject>(!byPlayer ? this.contactMessage : this.playerMessage, this.messageParent, false); obj2.GetComponentInChildren <Text>().set_text(content); RectTransform transform = obj2.get_transform().Find("MessageContent"); if (content.Length > this.maxMessageCharacter) { transform.GetComponent <ContentSizeFitter>().set_horizontalFit(0); transform.set_sizeDelta(new Vector2(this.maxMessageWidth, transform.get_sizeDelta().y)); } else { transform.GetComponent <ContentSizeFitter>().set_horizontalFit(2); } obj2.get_transform().Find("Avatar").GetComponent <Image>().set_sprite(!byPlayer ? this.contactAvatar : this.playerAvatar); ShortcutExtensions46.DOFade(obj2.GetComponent <CanvasGroup>(), 1f, 0.5f); ContentSizeFitter component = this.messageParent.GetComponent <ContentSizeFitter>(); this.messageScroll.set_verticalNormalizedPosition(0f); component.SetLayoutVertical(); LayoutRebuilder.ForceRebuildLayoutImmediate((RectTransform)this.messageParent); base.Invoke("SetPosition", 0.05f); }
public void ShowInputPanel(AdvEngine engine) { this.wait = true; this.active = true; ShortcutExtensions46.DOFade(base.get_transform().GetComponent <CanvasGroup>(), 1f, 0f); base.get_transform().GetComponent <CanvasGroup>().set_blocksRaycasts(true); this.engine = engine; this.Reset(); }
private void PlayAnimation() { Sequence sequence = DOTween.Sequence(); TweenSettingsExtensions.Append(sequence, TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOScaleX(this.child, 1f, 0.2f), 0x1b)); TweenSettingsExtensions.AppendInterval(sequence, 0.3f); TweenSettingsExtensions.Append(sequence, ShortcutExtensions46.DOFade(this.Text_Change, 0f, 0.5f)); TweenSettingsExtensions.Join(sequence, TweenSettingsExtensions.OnUpdate <Tweener>(TweenSettingsExtensions.SetEase <Tweener>(DOTween.To(new DOGetter <int>(this, this.< PlayAnimation > m__0), new DOSetter <int>(this, this.< PlayAnimation > m__1), this.m_after, 0.5f), 3), new TweenCallback(this, this.< PlayAnimation > m__2))); TweenSettingsExtensions.AppendInterval(sequence, 0.3f); TweenSettingsExtensions.Append(sequence, TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOScaleX(this.child, 0f, 0.15f), 5)); TweenSettingsExtensions.AppendCallback(sequence, new TweenCallback(this, this.< PlayAnimation > m__3)); }
public void ShowDate(AdvEngine engine) { DateTime time; ShortcutExtensions46.DOFade(this.dateCanvas, 1f, 0.5f); this.active = true; int parameterInt = engine.Param.GetParameterInt("day"); if (parameterInt <= 11) { time = new DateTime(0x7dd, 5, 0x13).AddDays((double)parameterInt); } else { time = new DateTime(0x7dc, 5, 20).AddDays((double)parameterInt); } engine.Param.SetParameterBoolean("weekday", (time.DayOfWeek != System.DayOfWeek.Sunday) && (time.DayOfWeek != System.DayOfWeek.Saturday)); engine.Param.SetParameterInt("dayOfWeek", (int)time.DayOfWeek); this.FormatDate(time); }
protected override void OnInit() { this.mLoginSate = 0; LocalSave.Instance.DoLogin_Start(new Action(this.OnLoginCallback)); this.bStartLogin = false; this.Text_1.set_color(new Color(1f, 1f, 1f, 0f)); this.Text_2.set_color(new Color(1f, 1f, 1f, 0f)); this.Image_Boss.set_color(new Color(1f, 1f, 1f, 0f)); this.Image_Hero.set_color(new Color(1f, 1f, 1f, 0f)); this.Image_Hero.get_rectTransform().anchoredPosition = new Vector2(0f, -300f); this.KillSequence(); this.seq = DOTween.Sequence(); TweenSettingsExtensions.AppendCallback(this.seq, new TweenCallback(this, this.< OnInit > m__0)); TweenSettingsExtensions.AppendInterval(this.seq, 2f); TweenSettingsExtensions.AppendCallback(this.seq, new TweenCallback(this, this.< OnInit > m__1)); TweenSettingsExtensions.Append(this.seq, ShortcutExtensions46.DOFade(this.Image_Hero, 1f, 1f)); TweenSettingsExtensions.Join(this.seq, ShortcutExtensions46.DOAnchorPosY(this.Image_Hero.get_rectTransform(), 0f, 1f, false)); TweenSettingsExtensions.Append(this.seq, ShortcutExtensions46.DOFade(this.Text_2, 1f, 1f)); TweenSettingsExtensions.AppendInterval(this.seq, 1f); TweenSettingsExtensions.AppendCallback(this.seq, new TweenCallback(this, this.< OnInit > m__2)); TweenSettingsExtensions.AppendCallback(this.seq, new TweenCallback(this, this.< OnInit > m__3)); }
public void Init() { base.transform.localPosition = Vector3.zero; this.canvasgroup.alpha = 1f; if (this.seq != null) { TweenExtensions.Kill(this.seq, false); } Tweener tweener = TweenSettingsExtensions.SetUpdate <Tweener>(TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOLocalMove(base.transform, endpos, 1.5f, false), 15), true); Sequence sequence = DOTween.Sequence(); TweenSettingsExtensions.SetUpdate <Sequence>(sequence, true); TweenSettingsExtensions.Append(sequence, ShortcutExtensions46.DOFade(this.canvasgroup, 0.6f, 0.9f)); TweenSettingsExtensions.Append(sequence, ShortcutExtensions46.DOFade(this.canvasgroup, 0f, 0.6f)); base.transform.localScale = Vector3.one * 0.5f; Tweener tweener2 = ShortcutExtensions.DOScale(base.transform, 1f, 0.45f); this.seq = DOTween.Sequence(); TweenSettingsExtensions.SetUpdate <Sequence>(this.seq, true); TweenSettingsExtensions.Append(this.seq, tweener); TweenSettingsExtensions.Join(this.seq, sequence); TweenSettingsExtensions.Join(this.seq, tweener2); TweenSettingsExtensions.AppendCallback(this.seq, new TweenCallback(this, this.< Init > m__1)); }
public void ShowIM() { ShortcutExtensions46.DOFade(this.iMCanvas, 1f, 0.5f); active = true; }
public void HideIM() { ShortcutExtensions46.DOFade(this.iMCanvas, 0f, 0.5f); active = false; }
public void SetGold(long gold) { this.KillSequence(); this.seq = DOTween.Sequence(); this.child.localPosition = Vector3.zero; this.mCanvasGroup.alpha = 1f; TweenSettingsExtensions.Append(this.seq, ShortcutExtensions.DOLocalMoveY(this.child, 100f, 1f, false)); TweenSettingsExtensions.Join(this.seq, TweenSettingsExtensions.Append(TweenSettingsExtensions.AppendInterval(DOTween.Sequence(), 0.5f), ShortcutExtensions46.DOFade(this.mCanvasGroup, 0f, 0.5f))); TweenSettingsExtensions.AppendCallback(this.seq, new TweenCallback(this, this.< SetGold > m__0)); object[] args = new object[] { gold }; this.text.text = Utils.FormatString("+{0}", args); float num = this.imageRect.sizeDelta.x + this.text.preferredWidth; float x = -num / 2f; float num3 = x + this.imageRect.sizeDelta.x; this.imageRect.anchoredPosition = new Vector2(x, this.imageRect.anchoredPosition.y); this.text.get_rectTransform().anchoredPosition = new Vector2(num3, this.text.get_rectTransform().anchoredPosition.y); }
public void HideMap() { ShortcutExtensions46.DOFade(this.mapCanvas, 0f, 0.5f); this.mapCanvas.set_blocksRaycasts(false); this.shown = false; }
public override void OnHandleNotification(INotification notification) { string name = notification.Name; object body = notification.Body; if (name != null) { if (name == "PUB_UI_UPDATE_CURRENCY") { this.UpdateCurrency(); } else if (name == "CurrencyKeyRotate") { if (this.keyrotate != null) { this.keyrotate.Play("KeyRotate"); } } else if (name == "UseCurrencyKey") { this.SetUseKeyShow(true); if (this.mUseKey != null) { this.mUseKey.alpha = 1f; this.mUseKey.transform.localPosition = Vector3.zero; TweenSettingsExtensions.AppendCallback(TweenSettingsExtensions.Join(TweenSettingsExtensions.Append(DOTween.Sequence(), ShortcutExtensions46.DOFade(this.mUseKey, 0.8f, 1f)), ShortcutExtensions.DOLocalMoveY(this.mUseKey.transform, -100f, 1f, false)), new TweenCallback(this, this.< OnHandleNotification > m__3)); } } else if (name == "UseCurrency") { CurrencyFlyCtrl.CurrencyUseStruct struct2 = (CurrencyFlyCtrl.CurrencyUseStruct)body; if (this.mFlyCtrl == null) { this.mFlyCtrl = new CurrencyFlyCtrl(); } this.mFlyCtrl.UseAction(mCurrencyPathList[struct2.type], base.transform, this.GetUseStartPos(struct2.type), struct2.endpos, struct2.count, struct2.callback); } else if (name == "GetCurrency") { CurrencyFlyCtrl.CurrencyGetStruct struct3 = (CurrencyFlyCtrl.CurrencyGetStruct)body; if (this.mFlyCtrl == null) { this.mFlyCtrl = new CurrencyFlyCtrl(); } this.mFlyCtrl.UseAction(mCurrencyPathList[struct3.type], base.transform, struct3.startpos, this.GetUseStartPos(struct3.type), struct3.count, null); } } }
protected override void OnOpen() { IProxy proxy = Facade.Instance.RetrieveProxy("NetDoingProxy"); this.mTransfer = proxy.Data as NetDoingProxy.Transfer; this.mCanvasGroup.alpha = 0f; this.seq_delay = TweenSettingsExtensions.SetUpdate <Sequence>(TweenSettingsExtensions.Append(TweenSettingsExtensions.AppendInterval(DOTween.Sequence(), 0.6f), ShortcutExtensions46.DOFade(this.mCanvasGroup, 0.6666667f, 1f)), true); this.SetLoading(0); this.seq_load = TweenSettingsExtensions.SetUpdate <Sequence>(TweenSettingsExtensions.SetLoops <Sequence>(TweenSettingsExtensions.AppendCallback(TweenSettingsExtensions.AppendInterval(DOTween.Sequence(), 0.5f), new TweenCallback(this, this.< OnOpen > m__0)), -1), true); Updater.AddUpdate("netdoing", new Action <float>(this.OnUpdate), true); }
public Tweener PlayCanvas(float startalpha, float endalpha, float time) { this.SetAlpha(startalpha); return(ShortcutExtensions46.DOFade(this.mCanvas, endalpha, time)); }
public void HideDate() { ShortcutExtensions46.DOFade(this.dateCanvas, 0f, 0.5f); this.active = false; }
private void Play() { ShortcutExtensions.DOKill(this.Text_Content, false); this.Text_Content.set_color(new Color(this.Text_Content.get_color().r, this.Text_Content.get_color().g, this.Text_Content.get_color().b, 0f)); TweenSettingsExtensions.SetUpdate <Tweener>(TweenSettingsExtensions.SetEase <Tweener>(TweenSettingsExtensions.SetLoops <Tweener>(ShortcutExtensions46.DOFade(this.Text_Content, 1f, 1f), -1, 1), 7), true); this.Text_Content.text = GameLogic.Hold.Language.GetLanguageByTID("TapToClose", Array.Empty <object>()); }
private void Awake() { TweenSettingsExtensions.SetUpdate <Tweener>(TweenSettingsExtensions.SetLoops <Tweener>(ShortcutExtensions46.DOFade(this.Image_NoNet, 0f, 1f), -1, 1), true); }