Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(hasAxe == true && canSwing == true)
- {
- if(Input.GetMouseButtonDown(0))
- {
- animation.Play("Swing");
- animation["Swing"].speed = 2;
- isSwinging = true;
- canSwing = false;
- Debug.Log("swing");
- staminaInfo.staminaBar.fillAmount -= 0.09f;
- }
- if(canSwing == false)
- {
- swingTimer -= 0.7f;
- Debug.Log("Hi");
- }
- if(swingTimer <= 0)
- {
- IEnumerator DestroyTree;
- swingTimer = 0.7f;
- canSwing = true;
- isSwinging = false;
- Debug.Log("BYe");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement