Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. if(hasAxe == true && canSwing == true)
  2. {
  3. if(Input.GetMouseButtonDown(0))
  4. {
  5. animation.Play("Swing");
  6. animation["Swing"].speed = 2;
  7. isSwinging = true;
  8. canSwing = false;
  9. Debug.Log("swing");
  10. staminaInfo.staminaBar.fillAmount -= 0.09f;
  11. }
  12. if(canSwing == false)
  13. {
  14. swingTimer -= 0.7f;
  15. Debug.Log("Hi");
  16. }
  17.  
  18. if(swingTimer <= 0)
  19. {
  20. IEnumerator DestroyTree;
  21. swingTimer = 0.7f;
  22. canSwing = true;
  23. isSwinging = false;
  24. Debug.Log("BYe");
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement