Exemplo n.º 1
0
        // PRAGMA MARK - Static Public Interface
        public static IPromiseCancellable StartPromiseCoroutine(IEnumerator wrappedCoroutine)
        {
            var promise   = new PromiseCoroutineWrapper();
            var coroutine = CoroutineWrapper.StartCoroutine(PromiseWrapperCoroutine(promise, wrappedCoroutine));

            promise.Init(coroutine);
            return(promise);
        }
Exemplo n.º 2
0
 // PRAGMA MARK - Public Interface
 public void Init(CoroutineWrapper coroutine)
 {
     coroutine_ = coroutine;
 }
 /// <param name="dampingRatio">lower values are less damped and higher values are more damped resulting in less springiness.
 /// should be between 0.01f, 1f to avoid unstable systems.
 public static CoroutineWrapper DoSpringFor(float approximateDuration, float dampingRatio, Action <float> lerpCallback, Action finishedCallback = null)
 {
     return(CoroutineWrapper.StartCoroutine(EasingCoroutines.DoSpringForCoroutine(approximateDuration, dampingRatio, lerpCallback, finishedCallback)));
 }
Exemplo n.º 4
0
 protected virtual void InitializeGame()
 {
     CoroutineWrapper.Initialize();
 }
 // PRAGMA MARK - Static
 public static CoroutineWrapper DoEaseFor(float duration, EaseType easeType, Action <float> lerpCallback, Action finishedCallback = null)
 {
     return(CoroutineWrapper.DoLerpFor(duration, (p) => lerpCallback.Invoke(Easings.Interpolate(p, easeType)), finishedCallback));
 }