diff options
| author | freddie-a <57713959+freddie-a@users.noreply.github.com> | 2022-10-30 10:59:34 +0000 |
|---|---|---|
| committer | freddie-a <57713959+freddie-a@users.noreply.github.com> | 2022-10-30 10:59:34 +0000 |
| commit | 052fe9c0786d13252a53cb984f125273dac5a598 (patch) | |
| tree | 4183fc32869b2603dc56813568a3ef6a9eb097c1 /Main.gd | |
| parent | bb87759291786cba9378334ed88218e3bb155dbd (diff) | |
Further code cleanup
Diffstat (limited to 'Main.gd')
| -rw-r--r-- | Main.gd | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -3,20 +3,14 @@ extends Node2D export(PackedScene) var enemy_scene onready var globals = get_node("/root/Global") -# Called when the node enters the scene tree for the first time. func _ready(): randomize() get_node("Player").connect("hit", get_node("HUD/HBoxContainer/HealthBar"), "_on_player_hit") get_node("Player").connect("coin", get_node("HUD/HBoxContainer/CoinCount"), "_on_coin_hit") get_node("Player").connect("coin", get_node("HUD/GameOver/GameOverCoinMessage/GameOverCoinCount"), "_on_coin_hit") + yield(get_tree().create_timer(15.0), "timeout") $EnemySpawnTimer.start() - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass - - func _on_EnemySpawnTimer_timeout(): var enemy = enemy_scene.instance() var spawn_loc = get_node("EnemySpawn/EnemySpawnLocation") |
