First Prototype

This commit is contained in:
Exobyt 2024-09-15 00:04:31 +02:00
parent e18beb6c4c
commit 9e3349eec3
40 changed files with 1100 additions and 48 deletions

View file

@ -4,14 +4,26 @@ extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
randomize()
$Map.spawnObjects()
$Map.spawnEnemies()
stormTimer.start(randi_range(G.GAMETIME.MIN, G.GAMETIME.MAX))
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
G.StormTimeLeft = stormTimer.time_left
func _on_storm_timer_timeout() -> void:
print("Storm")
func _on_player_death() -> void:
get_parent().loadEndScren()
func pause():
get_tree().paused = true
func resume():
get_tree().paused = false

View file

@ -8,11 +8,12 @@
script = ExtResource("1_napbe")
[node name="Player" parent="." instance=ExtResource("3_sjgkj")]
position = Vector2(-24, 0)
position = Vector2(-16, -88)
[node name="Map" parent="." instance=ExtResource("3_vpriv")]
[node name="StormTimer" type="Timer" parent="."]
one_shot = true
[connection signal="death" from="Player" to="." method="_on_player_death"]
[connection signal="timeout" from="StormTimer" to="." method="_on_storm_timer_timeout"]