forked from team-sg/hero-mark-2
made restart key gover the player
This commit is contained in:
parent
b65dbd834b
commit
db3ac62f27
4 changed files with 19 additions and 23 deletions
|
@ -40,15 +40,8 @@ func _physics_process(delta):
|
|||
console.visible = !console.visible
|
||||
#Restart scene
|
||||
if Input.is_action_just_pressed("debug_restart"):
|
||||
if Game.score > Game.high_score: Game.high_score = Game.score
|
||||
Game.score = 0
|
||||
Game.golds = 0
|
||||
Game.stars = [false,false,false,false,false]
|
||||
Game.shards = 0
|
||||
Game.arrows = 0
|
||||
Game.lives = 2
|
||||
Game.ac_climb.stop()
|
||||
get_tree().reload_current_scene()
|
||||
Game.lives = -1
|
||||
Game.get_map().get_node("Player").die()
|
||||
#Move player to mouse
|
||||
if Input.is_action_pressed("debug_move_player"):
|
||||
Game.get_map().get_node("Player").position = get_viewport().get_mouse_position()
|
||||
|
@ -58,7 +51,7 @@ func _physics_process(delta):
|
|||
Game.change_map(load("res://maps/level_select.tscn"))
|
||||
#Debug 2
|
||||
if Input.is_action_just_pressed("debug_2"):
|
||||
Engine.set_target_fps(1)
|
||||
Debug.print(Game.get_map())
|
||||
|
||||
func print(text):
|
||||
lines += 1
|
||||
|
@ -115,3 +108,5 @@ func _enter_code():
|
|||
Game.play_sound(Game.a_die, Game.ac_die)
|
||||
for enemy in get_tree().get_nodes_in_group("enemy"):
|
||||
enemy.queue_free()
|
||||
"DGSTEEZY":
|
||||
debug = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue