mmm, wavedash

This commit is contained in:
Rakarake 2024-10-25 13:21:58 +02:00
parent 6021b79707
commit cf09d5919e
2 changed files with 8 additions and 0 deletions

View file

@ -37,6 +37,7 @@ var hit_time_tmp: float
var hit_active := false var hit_active := false
@export var pogo_jump: float @export var pogo_jump: float
@export var wavedash_velocity: Vector2
@export var camera_look_aside := 0.0 @export var camera_look_aside := 0.0
@export var camera_look_aside_transition_speed := 0.0 @export var camera_look_aside_transition_speed := 0.0
@ -211,6 +212,12 @@ func _physics_process(delta):
else: else:
dash_time_tmp -= delta dash_time_tmp -= delta
current_state().progression = (dash_time - dash_time_tmp) / dash_time current_state().progression = (dash_time - dash_time_tmp) / dash_time
# Wavedash
if current_state() in [dash]:
if is_on_floor() && Input.is_action_just_pressed("jump") && \
abs(get_dir().x) - abs(get_dir().y) == 0:
stm.transition(air)
velocity = wavedash_velocity * get_dir()
# Hitboxes # Hitboxes
if current_state() in [run, air]: if current_state() in [run, air]:
if hit_active: if hit_active:

View file

@ -231,6 +231,7 @@ double_jump_delay = 0.1
dash_time = 0.22 dash_time = 0.22
hit_time = 0.2 hit_time = 0.2
pogo_jump = 300.0 pogo_jump = 300.0
wavedash_velocity = Vector2(400, 600)
camera_look_aside = 40.0 camera_look_aside = 40.0
camera_look_aside_transition_speed = 3.0 camera_look_aside_transition_speed = 3.0