コード例 #1
0
        void SetupCdTimer()
        {
            mCdTimer = new DCDurationTimer(mSkillCfg.mCdDuration, OnCdEnd);
            mCdTimer.SetAutoDestroy(true);
            mCdTimer.CreateNormal();

            ViewGen.cdImage.fillAmount = 1;
            ViewGen.cdImage.enabled    = true;
        }
コード例 #2
0
 /// <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();
     }
 }