예제 #1
0
 IEnumerator CoIncrease(int addAmount)
 {
     while (true)
     {
         currentVal += addAmount;
         UpdateText();
         OnUpdateAction?.Invoke();
         if (IsCompare(addAmount))
         {
             currentVal = realVal;
             UpdateText();
             isUpdate = false;
             OnEndAction?.Invoke();
             yield break;
         }
         yield return(null);
     }
 }
예제 #2
0
파일: State.cs 프로젝트: Hengle/Hermit
        public virtual void Update(float deltaTime)
        {
            // Only update the latest state
            if (ActiveStates.Count > 0)
            {
                ActiveStates.Peek().Update(deltaTime);
                return;
            }

            OnUpdateAction?.Invoke(deltaTime);

            ElapsedTime += deltaTime;

            // Check if condition meets
            foreach (var conditionPair in _conditions)
            {
                if (conditionPair.Key.Invoke())
                {
                    conditionPair.Value?.Invoke();
                }
            }
        }
예제 #3
0
 private void Update()
 {
     OnUpdateEvent?.Invoke();
     OnUpdateAction?.Invoke();
 }
예제 #4
0
 public void OnUpdate(SwipeLayout p0, int p1, int p2)
 {
     IsSwiping = true;
     OnUpdateAction?.Invoke(p0, p1, p2);
 }