// Triggering normal mode public void TriggerNormalMode() { currentPreset = defaultPreset; ResetJumpCharges(); GameController.instance.CoffeeMode(false); coffeeModeDurationRemaining = 0.0f; }
// Triggering coffee mode public void TriggerCoffeeMode() { currentPreset = coffeePreset; ResetJumpCharges(); GameController.instance.CoffeeMode(true); coffeeModeDurationRemaining = coffeeModeDuration; }
void Start() { currentPreset = defaultPreset; jumpCharges = currentPreset.jumpCharges; rb = GetComponent <Rigidbody2D>(); spriteRenderer = GetComponent <SpriteRenderer>(); animator = GetComponent <Animator>(); defaultGravityScale = rb.gravityScale; audioSource = GetComponent <AudioSource>(); }