This repository has been archived on 2026-05-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
instructions-clear/scripts/states/idle.gd
T

15 lines
575 B
GDScript

extends State
func process_physics(delta: float) -> State:
if not Main.is_server_or_predicting(subject.player_id, subject.client_prediction): return
subject.apply_input_velocity(delta, Vector2.ZERO, 0.0, subject.acceleration)
if not subject.is_on_floor(): return %Fall
if has_node("%Lunge") and %Input.primary_interact: return %Lunge # TODO: Lunge attacks currently do nothing so Chasers can't move when they click in
var input_direction = %Input.direction
if input_direction.length() < 0.05: return
if has_node("%Walk") and %Input.walk: return %Walk
return %Run