Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int startTime;
- public int maxTime;
- void Update ()
- {
- if(charController.velocity.magnitude > 0 && Input.GetKey(KeyCode.LeftShift))
- {
- startTime = startTime - 1;
- if (startTime == 0)
- {
- startTime = maxTime;
- ag.AddExperience(expToGive);
- }
- staminaSlider.value -= Time.deltaTime / staminaFallRate * staminaFallMult;
- staminaText.text = (int)staminaSlider.value + "/100";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement