Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. public IEnumerator LoadBow()
  2. {
  3. this.gameObject.GetComponent<Animation>().CrossFade("Load_Bow");
  4. yield return new WaitForSeconds(this.gameObject.GetComponent<Animation>()["Load_Bow"].length);
  5. aimStates = AimStates.Draw;
  6. }
  7.  
  8. public IEnumerator DrawBow()
  9. {
  10. this.gameObject.GetComponent<Animation>().CrossFade("Draw_Bow");
  11. yield return new WaitForSeconds(this.gameObject.GetComponent<Animation>()["Draw_Bow"].length);
  12. aimStates = AimStates.Aim;
  13. }
  14.  
  15. public void Aiming()
  16. {
  17. moveTarget.SetActive(false);
  18. switch(aimStates)
  19. {
  20. case AimStates.Load:
  21. StartCoroutine(LoadBow());
  22. break;
  23.  
  24. case AimStates.Draw:
  25. StartCoroutine(DrawBow());
  26. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement