void SetupCdTimer() { mCdTimer = new DCDurationTimer(mSkillCfg.mCdDuration, OnCdEnd); mCdTimer.SetAutoDestroy(true); mCdTimer.CreateNormal(); ViewGen.cdImage.fillAmount = 1; ViewGen.cdImage.enabled = true; }
/// <summary> /// 开始播放cd倒计时 /// </summary> public void OnKeySkillCreate(Skill skill) { mSkillCfg = skill.GetSkillCfg(); if (mSkillCfg.mCdWaitDuration > 0) { mWaitCdTimer = new DCDurationTimer(mSkillCfg.mCdWaitDuration, OnWaitCdEnd); mWaitCdTimer.SetAutoDestroy(true); mWaitCdTimer.CreateNormal(); } }