protected override void OnCharge(Vector3 center, ChargeData data, UnityAction onComplete)
 {
     if (onComplete != null)
     {
         scaleCtrl.AddAsync(data, animTime);
         StartAsync(onComplete);
     }
     else
     {
         scaleCtrl.Add(data);
     }
 }
Пример #2
0
        protected override void OnLoad(Vector3 center, ChargeData data, UnityAction onComplete)
        {
            if (onComplete != null)
            {
                StartAsync(onComplete);//先执行异步计时,不然重置动画的依据不足

                scaleCtrl.AddAsync(data, animTime);
                animCtrl.PlayAnim(loadAnimName, center, animTime);
            }
            else
            {
                scaleCtrl.Add(data);
            }
        }