Exemplo n.º 1
0
        private IEnumerator modDashCoroutine(On.Celeste.Player.orig_DashCoroutine orig, Player self)
        {
            // intercept the moment when the dash coroutine sends out the dash time
            // so that we can extend it as long as Dash is pressed.
            IEnumerator coroutine = orig.Invoke(self);

            while (coroutine.MoveNext())
            {
                object o = coroutine.Current;
                if (o != null && o.GetType() == typeof(float))
                {
                    yield return(o);

                    while (Input.Dash.Check && hasHeldDash(self))
                    {
                        yield return(null);
                    }
                }
                else
                {
                    yield return(o);
                }
            }

            yield break;
        }
Exemplo n.º 2
0
        private IEnumerator modDashCoroutine(On.Celeste.Player.orig_DashCoroutine orig, Player self)
        {
            // intercept the moment when the dash coroutine sends out the dash time
            // so that we can extend it as long as Dash is pressed.
            IEnumerator coroutine = orig.Invoke(self);

            while (coroutine.MoveNext())
            {
                object o = coroutine.Current;
                if (o != null && o.GetType() == typeof(float))
                {
                    yield return(o);

                    while (hasHeldDash(self) && (Input.Dash.Check || (crouchDash != null && crouchDashCheck())))
                    {
                        DynData <Player> selfData = new DynData <Player>(self);
                        selfData["dashAttackTimer"]  = 0.15f; // hold the dash attack timer to continue breaking dash blocks and such.
                        selfData["gliderBoostTimer"] = 0.30f; // hold the glider boost timer to still get boosted by jellies.

                        yield return(null);
                    }
                }
                else
                {
                    yield return(o);
                }
            }

            yield break;
        }
Exemplo n.º 3
0
 private IEnumerator onDashCoroutine(On.Celeste.Player.orig_DashCoroutine orig, Player self)
 {
     if (Settings.DashDirection == 0)
     {
         return(orig(self));
     }
     return(modDashCoroutine(orig(self), self));
 }
Exemplo n.º 4
0
 private IEnumerator onDashCoroutine(On.Celeste.Player.orig_DashCoroutine orig, Player self)
 {
     if (!Settings.EnableGrapplingHook)
     {
         return(orig(self));
     }
     else
     {
         return(modDashCoroutine(orig(self), self));
     }
 }