Eonirr

Untitled

Aug 20th, 2026
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2. bool isMoving;
  3. void OnEnable()
  4. {
  5. moveAction.started += OnMoveStarted;
  6. moveAction.canceled += OnMoveCanceled;
  7. }
  8.  
  9. void OnMoveStarted(InputAction.CallbackContext ctx) => isMoving = true;
  10. void OnMoveCanceled(InputAction.CallbackContext ctx) => isMoving = false;
  11.  
  12. void Update()
  13. {
  14. if (isMoving)
  15. {
  16. lĂ  tu bouge comme tu veux avec le rb ou char controller ou autre
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment