Esempio n. 1
0
        private IEnumerator modBadelineBoostRoutine(On.Celeste.BadelineBoost.orig_BoostRoutine orig, BadelineBoost self, Player player)
        {
            badelineBoosting = true;
            yield return(new SwapImmediately(orig(self, player)));

            badelineBoosting = false;
        }
Esempio n. 2
0
        private IEnumerator modBadelineBoostRoutine(On.Celeste.BadelineBoost.orig_BoostRoutine orig, BadelineBoost self, Player player)
        {
            IEnumerator coroutine = orig(self, player);

            while (coroutine.MoveNext())
            {
                yield return(coroutine.Current);
            }

            // apply the dash refill rules here (this does not call RefillDash)
            if (Settings.DashCount != -1)
            {
                // this will run in 0.15 seconds: if (player.Dashes < player.Inventory.Dashes) player.Dashes++;
                // let's take that into account and deduce 1 from the dash count if required.
                if (Settings.DashCount < player.Inventory.Dashes)
                {
                    player.Dashes = Settings.DashCount - 1;
                }
                else
                {
                    player.Dashes = Settings.DashCount;
                }
            }

            // using a Badeline Boost refills dashes
            OnDashRefill?.Invoke();

            yield break;
        }
        private IEnumerator modBadelineBoostRoutine(On.Celeste.BadelineBoost.orig_BoostRoutine orig, BadelineBoost self, Player player)
        {
            badelineBoosting = true;
            IEnumerator coroutine = orig(self, player);

            while (coroutine.MoveNext())
            {
                yield return(coroutine.Current);
            }
            badelineBoosting = false;
        }