Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. // state of pressing right
  2. if (moveDirection.x > 0)
  3. {
  4. if (percReset == 0)
  5. {
  6. perc = 0;
  7. percReset++;
  8.  
  9. }
  10.  
  11. if (percReset >= 1)
  12. {
  13. startPos = 0;
  14. endPos = moveDirection.x;
  15. moveDirection.x = Mathf.Lerp(startPos, endPos, perc);
  16. currLerpTime += Time.deltaTime;
  17. }
  18. if (perc == 1)
  19. {
  20.  
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement