public void ShowText(string text, float delay) { float duration = 1f; this.TextContent.set_text(text); BaseTweenAlphaBaseTime bta = base.get_transform().GetComponent <BaseTweenAlphaBaseTime>(); bta.TweenAlpha(0f, 1f, 0f, 0.2f, delegate { bta.TweenAlpha(1f, 0f, delay, duration, delegate { this.Show(false); }); }); }
public void DoToastOne(string text, Color textColor, float duration, float delay) { ToastUIItem item = this.FindIdle(); if (item == null) { item = ResourceManager.GetInstantiate2Prefab("ToastUIItem").GetComponent <ToastUIItem>(); item.get_transform().SetParent(this.Pool); item.get_transform().set_localScale(Vector3.get_one()); item.get_transform().set_localPosition(Vector3.get_zero()); this.listPool.Add(item); } item.get_transform().set_localPosition(Vector3.get_zero()); item.Text = text; item.Unused = false; item.get_gameObject().SetActive(true); BaseTweenAlphaBaseTime component = item.GetComponent <BaseTweenAlphaBaseTime>(); component.TweenAlpha(1f, 0f, delay, duration, delegate { item.get_gameObject().SetActive(false); item.Unused = true; }); BaseTweenPostion component2 = item.GetComponent <BaseTweenPostion>(); component2.MoveTo(new Vector3(0f, 180f, 0f), 1f); }
protected override void OnEnable() { SoundManager.PlayUI(10041, false); EventDispatcher.Broadcast <bool, float, float>(ShaderEffectEvent.ENABLE_BG_BLUR, true, 30f, 0f); this.PassTimeNum.set_text(string.Empty); this.countDownText.set_text(string.Empty); this.MyPowerValueDesc.set_text("我的战力:"); this.MyPowerValue.set_text(EntityWorld.Instance.EntSelf.Fighting.ToString()); this.AddUpBtns(); this.AnimationObjs.GetComponent <CanvasGroup>().set_alpha(0f); this.timer = TimerHeap.AddTimer(1000u, 0, delegate { if (this != null && base.get_gameObject() != null && this.AnimationObjs != null) { BaseTweenAlphaBaseTime component = this.AnimationObjs.GetComponent <BaseTweenAlphaBaseTime>(); if (component != null) { component.TweenAlpha(0f, 1f, 0f, 0.5f); } } }); EventDispatcher.Broadcast <bool>(ShaderEffectEvent.PLAYER_DEAD, true); this.PlayAnimation(); this.BtnDamageCal.get_gameObject().SetActive(true); this.BtnDamageCal2.get_gameObject().SetActive(false); this.BtnAgain.get_gameObject().SetActive(true); GuideManager.Instance.StopGuideOfFinish(); }