forked from team-sg/hero-mark-2
added ladder auto dismount
This commit is contained in:
parent
db3ac62f27
commit
74bf75b6e8
6 changed files with 69 additions and 7 deletions
|
@ -149,13 +149,16 @@ func _process_climb():
|
|||
if axis.y == 0: Game.ac_climb.set_stream(null)
|
||||
#Manual Jump,, only works when holding neutral or away from ladder
|
||||
if axis.x != sprite.scale.x: check_jump()
|
||||
#Auto Jump
|
||||
if climb_ray.get_collider() == null:
|
||||
velocity.y = -jump_force
|
||||
Game.ac_climb.set_stream(null)
|
||||
Game.play_sound(Game.a_jump,Game.ac_jump)
|
||||
if axis.y == -1:
|
||||
#Auto Jump
|
||||
velocity.y = -jump_force
|
||||
Game.ac_climb.set_stream(null)
|
||||
Game.play_sound(Game.a_jump,Game.ac_jump)
|
||||
#Auto dismount
|
||||
current_state = State.FALL
|
||||
return
|
||||
|
||||
|
||||
func _process_sword():
|
||||
anims.play("stab")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue