Beispiel #1
0
 private void ResetDashCooldownWithResetter()
 {
     if (dashing > 0 && dashing != lastDashingReset && dashResetterToUse != null)
     {
         //temp
         StopCoroutine(lastDashAction);
         transform.position = dashResetterToUse.transform.position;
         rb.velocity        = Vector3.zero;
         dashing            = 0;
         ++successiveDashCount;
         fixedGravityScale = true;
         dashResetState    = true;
         ++dashCount;
         StartCoroutine(StopDashResetStateAfterTimer(dashCount));
         //fin temp
         lastDashingReset = dashing;
         dashResetterToUse.Use();
         dashResettersUsed.Add(dashResetterToUse);
         ableToDash     = true;
         dashSlowMotion = true;
         dashResetParticle.Play();
         dashResetterToUse = null;
         timeManager.StopResetTimeScale();
         timeManager.DoSlowMotion();
         dashSlowMotion = true;
     }
 }
Beispiel #2
0
 public void TriggerDashResetter(DashResetter resetter)
 {
     if (resetter.IsUsed())
     {
         return;
     }
     dashResetterToUse = resetter;
     ResetDashCooldownWithResetter();
 }