Download NewPlayer/Player/StateMachine/PlayerStateMachine/States/fall.gd from NeatoGames/saddle-up: direct link, hf CLI and curl.
- Browser
- Download file 493 Bytes
-
https://huggingface.co/datasets/NeatoGames/saddle-up/resolve/main/NewPlayer/Player/StateMachine/PlayerStateMachine/States/fall.gd
- Command line
-
hf download hf://datasets/NeatoGames/saddle-up/NewPlayer/Player/StateMachine/PlayerStateMachine/States/fall.gd
-
curl -L -o fall.gd https://huggingface.co/datasets/NeatoGames/saddle-up/resolve/main/NewPlayer/Player/StateMachine/PlayerStateMachine/States/fall.gd
493 Bytes
| extends Motion | |
| @export var floor_ray_cast: RayCast3D | |
| func _update(delta: float) -> void: | |
| set_direction() | |
| calculate_gravity(delta) | |
| calculate_velocity(speed,direction,PLAYER_MOVEMENT_STATS.in_air_acceleration,delta) | |
| if floor_ray_cast.is_colliding(): | |
| if direction != Vector3.ZERO: | |
| animation_change_requested.emit("Run") | |
| else: | |
| animation_change_requested.emit("Idle") | |
| if is_on_floor(): | |
| if direction != Vector3.ZERO: | |
| finished.emit("Run") | |
| else: | |
| finished.emit("Idle") | |