changed clamber to ledge grab
This commit is contained in:
@@ -21,7 +21,7 @@ func standard_jump():
|
||||
if Input.is_action_just_pressed("jump"):
|
||||
#first check for clamber, otherwise jump
|
||||
if character.can_clamber():
|
||||
Transitioned.emit(self,"clamber")
|
||||
Transitioned.emit(self,"ledge grab")
|
||||
else:
|
||||
if character.jumps_remaining > 0:
|
||||
character.jumps_remaining -= 1
|
||||
|
||||
@@ -5,14 +5,15 @@ var clamber_point
|
||||
|
||||
func Enter():
|
||||
clamber_point = character.get_clamber_point()
|
||||
character.standing_collision.disabled = true
|
||||
character.crouching_collision.disabled = true
|
||||
|
||||
|
||||
func Physics_Update(delta):
|
||||
character.velocity = Vector3.ZERO
|
||||
character.global_position = clamber_point + Vector3(0,1,0)
|
||||
Transitioned.emit(self,"on foot")
|
||||
|
||||
func Exit():
|
||||
character.standing_collision.disabled = false
|
||||
character.crouching_collision.disabled = false
|
||||
|
||||
character.global_position.y = lerp(character.global_position.y,clamber_point.y,delta * 2)
|
||||
|
||||
if Input.is_action_just_pressed("jump"):
|
||||
jump_with_weight_mod()
|
||||
Transitioned.emit(self,"in air")
|
||||
|
||||
if Input.is_action_just_pressed("crouch"):
|
||||
Transitioned.emit(self,"in air")
|
||||
|
||||
Reference in New Issue
Block a user