mmm, wavedash
This commit is contained in:
		
							parent
							
								
									6021b79707
								
							
						
					
					
						commit
						cf09d5919e
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -37,6 +37,7 @@ var hit_time_tmp: float
 | 
			
		|||
var hit_active := false
 | 
			
		||||
 | 
			
		||||
@export var pogo_jump: float
 | 
			
		||||
@export var wavedash_velocity: Vector2
 | 
			
		||||
@export var camera_look_aside := 0.0
 | 
			
		||||
@export var camera_look_aside_transition_speed := 0.0
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -211,6 +212,12 @@ func _physics_process(delta):
 | 
			
		|||
		else:
 | 
			
		||||
			dash_time_tmp -= delta
 | 
			
		||||
			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
 | 
			
		||||
	if current_state() in [run, air]:
 | 
			
		||||
		if hit_active:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -231,6 +231,7 @@ double_jump_delay = 0.1
 | 
			
		|||
dash_time = 0.22
 | 
			
		||||
hit_time = 0.2
 | 
			
		||||
pogo_jump = 300.0
 | 
			
		||||
wavedash_velocity = Vector2(400, 600)
 | 
			
		||||
camera_look_aside = 40.0
 | 
			
		||||
camera_look_aside_transition_speed = 3.0
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue