adjusted level and barrier

This commit is contained in:
pennyrigate 2022-12-19 21:08:18 -05:00
parent 209884f133
commit b2baccfa57
16 changed files with 138 additions and 46 deletions

View file

@ -14,6 +14,7 @@ enum State {IDLE,WALK,JUMP,FALL,STUNNED,CLIMB,SWORD,SHOOT}
var current_state = State.IDLE
##Runtime
var axis = Vector2.ZERO #Current direction being held
var trail_color = Color(0.25,0,1,0.4)
#Physics
var velocity = Vector2.ZERO
var walk_speed = 50
@ -66,9 +67,7 @@ func _physics_process(delta):
#Apply velocity
move_and_slide(velocity,Vector2.UP)
#Debug
if Input.is_action_pressed("debug_move_player"):
position = get_viewport().get_mouse_position()
print(get_viewport().get_mouse_position())
debug()
func _process_idle():
if anims.get_current_animation() != "idle": anims.play("idle")
@ -246,3 +245,8 @@ func _on_AnimationPlayer_animation_finished(anim_name):
else:
current_state = State.FALL
return
func debug():
#Move player to mouse
if Input.is_action_pressed("debug_move_player"):
position = get_viewport().get_mouse_position()
print(get_viewport().get_mouse_position())