Exemplo n.º 1
0
 /// <summary>
 /// 初始化兵器buff
 /// </summary>
 public void Init()
 {
     FloatIncrease = 0;
     initFrame     = 0;
     cDEndFrame    = 0;
     cDAddFrame    = (long)Statics.ClearError((double)CDTime / (double)Global.FrameCost);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 追加buff时间
        /// </summary>
        /// <param name="plusTime">Plus time.</param>
        public void AddTime(float plusTime)
        {
            _plusTimeout = plusTime;
            long plusAddFrame = (long)Statics.ClearError(((double)_plusTimeout + 0.1d) / (double)Global.FrameCost);

            timeoutAddFrame += plusAddFrame;
            timeoutEndFrame += plusAddFrame;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 返回克隆之后的BuffData实体
 /// </summary>
 /// <returns>The clone.</returns>
 public BuffData GetClone(long frame)
 {
     _plusTimeout = 0;
     UpdateTimeout(frame);
     skipAddFrame = (long)Statics.ClearError(1.0d / (double)Global.FrameCost);
     skipEndFrame = frame;
     TookEffect   = false;
     return(GetClone());
 }
Exemplo n.º 4
0
 /// <summary>
 /// 将索引映射成实体类
 /// </summary>
 public void MakeJsonToModel()
 {
     CDTimePlusScale = 0;
     AddedSkillDatas.Clear();
     for (int i = 0; i < ResourceAddedSkillIds.Count; i++)
     {
         AddedSkillDatas.Add(JsonManager.GetInstance().GetMapping <SkillData>("Skills", ResourceAddedSkillIds[i]));
     }
     cDAddFrame = (long)Statics.ClearError((double)CDTime / (double)Global.FrameCost);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 追加cd时间缩放倍率
 /// </summary>
 /// <param name="scale">Scale.</param>
 public void AddCDTimePlusScale(float scale)
 {
     CDTimePlusScale = Mathf.Clamp(CDTimePlusScale + scale, -0.9f, 10);
     cDAddFrame      = (long)Statics.ClearError(((double)CDTime * (1 + CDTimePlusScale)) / (double)Global.FrameCost);
 }
Exemplo n.º 6
0
 /// <summary>
 /// 更新buff时间
 /// </summary>
 /// <param name="frame">Frame.</param>
 /// <param name="timeout">Timeout.</param>
 public void UpdateTimeout(long frame)
 {
     timeoutAddFrame = (long)Statics.ClearError(((double)Timeout + 0.1d) / (double)Global.FrameCost);
     timeoutEndFrame = frame + timeoutAddFrame;
 }