Exemplo n.º 1
0
 IEnumerator AutoDrag()
 {
     auto = true;
     for (float i = 0; i < autoDragTime; i += Time.deltaTime)
     {
         transform.localPosition = Vector3.Lerp(startPos, targetPos, i / autoDragTime);
         yield return(null);
     }
     completeAbleFeature.OnComplete(firstLock);
 }
Exemplo n.º 2
0
 internal void OnDetach()
 {
     if (rule)
     {
         rule.OnDetach(this);
     }
     completeAbleFeature.OnComplete(firstLock);
 }
Exemplo n.º 3
0
        private IEnumerator AutoRotateTo()
        {
            var target = Direction * triggerAngle + startRot.eulerAngles;
            var start  = operater.eulerAngles;

            for (float timer = 0; timer < autoCompleteTime; timer += Time.deltaTime)
            {
                yield return(null);

                currAngle            = Mathf.Lerp(0, triggerAngle, timer / autoCompleteTime);
                operater.eulerAngles = Vector3.Lerp(start, target, timer / autoCompleteTime);
                RefeshPosition();
            }
            if (Actived)
            {
                completeFeature.OnComplete(firstLock);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 结束与否判断
        /// </summary>
        public void JudgeComplete()
        {
            foreach (var item in completeDatas)
            {
                var currentItems = _currentList.FindAll(x => x.type == item.type);
                if (currentItems.Count == 0)
                {
                    return;
                }

                float full = 0;
                foreach (var charge in currentItems)
                {
                    full += charge.value;
                }
                if (full < item.value)
                {
                    return;
                }
            }
            completeAbleFeature.OnComplete(lockList[0]);
        }
 public void SetComplete()
 {
     completeAbleFeature.OnComplete(firstLock);
 }
Exemplo n.º 6
0
 protected void TriggerComplete()
 {
     completeFeature.OnComplete(firstLock);
 }