pennymeat
This commit is contained in:
parent
26a351b408
commit
d6f5925198
4 changed files with 311 additions and 6 deletions
|
@ -14,7 +14,8 @@ const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
|||
## whether to be temporarily invulnerable after respawning
|
||||
export var use_iframes: bool = false
|
||||
## horizontal movement speed
|
||||
export var walk_speed: float = 50.0
|
||||
export var walk_speed: float = 75.0
|
||||
export var air_speed: float = 80.0
|
||||
## frames until walk speed peak (at 60fps reference)
|
||||
export var walk_acceleration_frames: float = 1.0
|
||||
## speed to push pushable objects at
|
||||
|
@ -397,7 +398,7 @@ func _process_grounded(delta: float) -> void:
|
|||
## called when player can move left and rightpass # Repass # Rpass # Replace with function body.eplace with function body.place with function body.
|
||||
func _process_horizontal_movement(delta: float) -> void:
|
||||
var input_dir = sign(Input.get_axis("move_left", "move_right") + get_stick_input(JOY_AXIS_0)) # sign() to normalize
|
||||
velocity.x = input_dir * walk_speed
|
||||
velocity.x = input_dir * air_speed
|
||||
if input_dir != 0.0:
|
||||
graphics.scale.x = input_dir
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue