示例#1
0
    // Triggering normal mode
    public void TriggerNormalMode()
    {
        currentPreset = defaultPreset;
        ResetJumpCharges();
        GameController.instance.CoffeeMode(false);

        coffeeModeDurationRemaining = 0.0f;
    }
示例#2
0
    // Triggering coffee mode
    public void TriggerCoffeeMode()
    {
        currentPreset = coffeePreset;
        ResetJumpCharges();
        GameController.instance.CoffeeMode(true);

        coffeeModeDurationRemaining = coffeeModeDuration;
    }
示例#3
0
    void Start()
    {
        currentPreset = defaultPreset;
        jumpCharges   = currentPreset.jumpCharges;

        rb             = GetComponent <Rigidbody2D>();
        spriteRenderer = GetComponent <SpriteRenderer>();
        animator       = GetComponent <Animator>();

        defaultGravityScale = rb.gravityScale;

        audioSource = GetComponent <AudioSource>();
    }