Download NewPlayer/Player/StateMachine/PlayerStateMachine/States/sprint_fall.gd from NeatoGames/saddle-up: direct link, hf CLI and curl.
- Browser
- Download file 536 Bytes
-
https://huggingface.co/datasets/NeatoGames/saddle-up/resolve/main/NewPlayer/Player/StateMachine/PlayerStateMachine/States/sprint_fall.gd
- Command line
-
hf download hf://datasets/NeatoGames/saddle-up/NewPlayer/Player/StateMachine/PlayerStateMachine/States/sprint_fall.gd
-
curl -L -o sprint_fall.gd https://huggingface.co/datasets/NeatoGames/saddle-up/resolve/main/NewPlayer/Player/StateMachine/PlayerStateMachine/States/sprint_fall.gd
536 Bytes
| extends Motion | |
| @export var floor_ray_cast: RayCast3D | |
| signal sprint_ended | |
| func _update(delta: float) -> void: | |
| set_direction() | |
| calculate_gravity(delta) | |
| calculate_velocity(sprint_speed,direction,PLAYER_MOVEMENT_STATS.in_air_acceleration,delta) | |
| direction_updated.emit(input_dir) | |
| sprint_remaining -= delta | |
| if is_on_floor(): | |
| if Input.is_action_pressed("sprint"): | |
| finished.emit("Sprint") | |
| elif direction != Vector3.ZERO: | |
| sprint_ended.emit() | |
| finished.emit("Run") | |
| else: | |
| sprint_ended.emit() | |
| finished.emit("Idle") | |