Example #1
0
    void Charge(string throwButton)
    {
        if (Input.GetButtonDown(throwButton) &&
            pickup.HasPickupable() &&
            Time.time - pickup.GetPickupTime() >= throwAfterPickupTime)
        {
            holdButtonTime = 0.0f;
        }

        if (Input.GetButton(throwButton) && holdButtonTime >= 0.0f)
        {
            holdButtonTime += Time.deltaTime;
        }
    }