Advertisement
fig02

Untitled

Feb 21st, 2022
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. if (this->stickRelX < -30) {
  2. if (this->stickXDir == -1) {
  3. this->inputTimerX--;
  4. if (this->inputTimerX < 0) {
  5. this->inputTimerX = 2;
  6. } else {
  7. this->stickRelX = 0;
  8. }
  9. } else {
  10. this->inputTimerX = 10;
  11. this->stickXDir = -1;
  12. }
  13. } else if (this->stickRelX > 30) {
  14. if (this->stickXDir == 1) {
  15. this->inputTimerX--;
  16. if (this->inputTimerX < 0) {
  17. this->inputTimerX = 2;
  18. } else {
  19. this->stickRelX = 0;
  20. }
  21. } else {
  22. this->inputTimerX = 10;
  23. this->stickXDir = 1;
  24. }
  25. } else {
  26. this->stickXDir = 0;
  27. }
  28.  
  29. if (this->stickRelY < -30) {
  30. if (this->stickYDir == -1) {
  31. this->inputTimerY -= 1;
  32. if (this->inputTimerY < 0) {
  33. this->inputTimerY = 2;
  34. } else {
  35. this->stickRelY = 0;
  36. }
  37. } else {
  38. this->inputTimerY = 10;
  39. this->stickYDir = -1;
  40. }
  41. } else if (this->stickRelY > 30) {
  42. if (this->stickYDir == 1) {
  43. this->inputTimerY -= 1;
  44. if (this->inputTimerY < 0) {
  45. this->inputTimerY = 2;
  46. } else {
  47. this->stickRelY = 0;
  48. }
  49. } else {
  50. this->inputTimerY = 10;
  51. this->stickYDir = 1;
  52. }
  53. } else {
  54. this->stickYDir = 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement