rename move_speed to walk_speed
This commit is contained in:
@@ -11,7 +11,7 @@ static var instance: Player
|
||||
@export var _shape: CollisionShape2D
|
||||
|
||||
@export_group("Metrics")
|
||||
@export var _move_speed: float = 1.5 * 60.0
|
||||
@export var _walk_speed: float = 1.5 * 60.0
|
||||
@export var _jump_speed: float = 3.5 * 60.0
|
||||
@export var _jump_force: float = 8.5 * 60.0 + 20.0
|
||||
@export var _fall_speed: float = 10.0 * 60.0
|
||||
@@ -44,7 +44,7 @@ static func process_movement(
|
||||
is_charging_jump: bool,
|
||||
charge_strength: float,
|
||||
jump_released: bool,
|
||||
move_speed: float,
|
||||
walk_speed: float,
|
||||
jump_speed: float,
|
||||
jump_force: float,
|
||||
fall_speed: float,
|
||||
@@ -59,7 +59,7 @@ static func process_movement(
|
||||
|
||||
# moving
|
||||
if on_floor and is_zero_approx(floor_angle) and new_velocity.y >= 0.0:
|
||||
new_velocity.x = direction * move_speed if not is_charging_jump else 0.0
|
||||
new_velocity.x = direction * walk_speed if not is_charging_jump else 0.0
|
||||
|
||||
# sliding
|
||||
if on_floor and not is_zero_approx(floor_angle):
|
||||
@@ -177,7 +177,7 @@ func _physics_process(delta: float) -> void:
|
||||
_is_charging_jump,
|
||||
_charge_strength,
|
||||
_jump_released,
|
||||
_move_speed,
|
||||
_walk_speed,
|
||||
_jump_speed,
|
||||
_jump_force,
|
||||
_fall_speed,
|
||||
|
||||
@@ -121,9 +121,9 @@ const JUMP_REFERENCE: PackedFloat32Array = [
|
||||
set(value):
|
||||
_player_size = value
|
||||
queue_redraw()
|
||||
@export var _move_speed: float = 1.5 * 60:
|
||||
@export var _walk_speed: float = 1.5 * 60:
|
||||
set(value):
|
||||
_move_speed = value
|
||||
_walk_speed = value
|
||||
queue_redraw()
|
||||
@export var _jump_speed: float = 3.5 * 60.0:
|
||||
set(value):
|
||||
@@ -216,7 +216,7 @@ func _draw() -> void:
|
||||
false,
|
||||
charge_strength,
|
||||
i == 0 and _jump,
|
||||
_move_speed,
|
||||
_walk_speed,
|
||||
_jump_speed,
|
||||
_jump_force,
|
||||
_fall_speed,
|
||||
|
||||
Reference in New Issue
Block a user