moved debug to scene
This commit is contained in:
parent
42acd93b1d
commit
56d03ac23d
4 changed files with 122 additions and 25 deletions
|
@ -74,8 +74,6 @@ func _physics_process(delta):
|
|||
velocity.y = 0
|
||||
#Apply velocity
|
||||
move_and_slide(velocity,Vector2.UP)
|
||||
#Debug
|
||||
debug()
|
||||
|
||||
func _process_idle():
|
||||
if anims.get_current_animation() != "idle": anims.play("idle")
|
||||
|
@ -253,7 +251,7 @@ func die():
|
|||
Game.arrows = 0
|
||||
Game.lives = 2
|
||||
Game.ac_climb.stop()
|
||||
get_tree().reload_current_scene()
|
||||
Game.change_map(load("res://maps/map01.tscn"))
|
||||
|
||||
|
||||
func _on_AnimationPlayer_animation_finished(anim_name):
|
||||
|
@ -273,14 +271,3 @@ 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())
|
||||
if Input.is_action_just_pressed("debug_1"):
|
||||
Game.save()
|
||||
if Input.is_action_just_pressed("debug_2"):
|
||||
var save = ConfigFile.new()
|
||||
save.load(str("user://file") + str(1) + str(".pr"))
|
||||
Game.score = save.get_value(str(Game.current_level),"Score",0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue