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); }
private void Awake() { this.m_floatNode = base.get_transform().FindChild("FloatNode"); this.m_BaseTweenAlphaBaseTime = this.m_floatNode.GetComponent <BaseTweenAlphaBaseTime>(); this.m_BaseTweenPostion = this.m_floatNode.GetComponent <BaseTweenPostion>(); this.m_lblText = this.m_floatNode.GetChild(0).GetComponent <Text>(); }
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(); }
protected override void InitUI() { base.InitUI(); this.m_spBackground = base.FindTransform("Background").GetComponent <Image>(); this.m_lblTalkContent = base.FindTransform("TalkContent").GetComponent <Text>(); this.m_BaseTweenAlphaBaseTime = this.m_myTransform.GetComponent <BaseTweenAlphaBaseTime>(); }
private void Awake() { this.DisplayAttrUnitTween = base.get_transform().FindChild("DisplayAttrUnitOffest/DisplayAttrUnitTween"); this.baseTweenAlphaBaseTime = this.DisplayAttrUnitTween.GetComponent <BaseTweenAlphaBaseTime>(); this.baseTweenPostion = this.DisplayAttrUnitTween.GetComponent <BaseTweenPostion>(); this.DisplayAttrUnitText = this.DisplayAttrUnitTween.GetChild(0).GetComponent <Text>(); }
private void Awake() { this.m_floatNode = base.get_transform().FindChild("FloatNode"); this.m_BaseTweenAlphaBaseTime = this.m_floatNode.GetComponent <BaseTweenAlphaBaseTime>(); this.m_BaseTweenPostion = this.m_floatNode.GetComponent <BaseTweenPostion>(); this.mBackground = (this.m_floatNode.FindChild("Background") as RectTransform); this.m_lblText = this.m_floatNode.FindChild("Text").GetComponent <Text>(); }
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); }); }); }
private void Awake() { this.TextShow = base.get_transform().FindChild("TextShow").GetComponent <Text>(); this.baseTweenPostion = base.GetComponent <BaseTweenPostion>(); this.baseTweenAlphaBaseTime = base.GetComponent <BaseTweenAlphaBaseTime>(); }