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); } }
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(); } } }
private void Update() { OnUpdateEvent?.Invoke(); OnUpdateAction?.Invoke(); }
public void OnUpdate(SwipeLayout p0, int p1, int p2) { IsSwiping = true; OnUpdateAction?.Invoke(p0, p1, p2); }