Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int _dashTiles;
- private Vector3 _direction;
- void Update(){
- if (_dashTiles > 0) {
- characterController.Move(_direction);
- _dashTiles--;
- }
- }
- private void Movement() {
- ...
- if (Input.GetKey(KeyCode.LeftShift) && _dashTiles == 0) {
- _dashTiles = 5;
- _direction = Vector3.right;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement