summaryrefslogtreecommitdiff
path: root/Stages/Spawn
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-02 19:23:19 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-02 19:23:19 +0200
commitc8bd14d6feeca72fc96b895c9382ebc16a1caf55 (patch)
tree8423bdead9ce57d3dd62759cf362073ac5955eb3 /Stages/Spawn
initial commit
Diffstat (limited to 'Stages/Spawn')
-rw-r--r--Stages/Spawn/Assets/door-01.pngbin0 -> 342 bytes
-rw-r--r--Stages/Spawn/Assets/door-01.png.import34
-rw-r--r--Stages/Spawn/Assets/door-02.pngbin0 -> 438 bytes
-rw-r--r--Stages/Spawn/Assets/door-02.png.import34
-rw-r--r--Stages/Spawn/Assets/door-03.pngbin0 -> 451 bytes
-rw-r--r--Stages/Spawn/Assets/door-03.png.import34
-rw-r--r--Stages/Spawn/Assets/door-04.pngbin0 -> 450 bytes
-rw-r--r--Stages/Spawn/Assets/door-04.png.import34
-rw-r--r--Stages/Spawn/Assets/door-05.pngbin0 -> 503 bytes
-rw-r--r--Stages/Spawn/Assets/door-05.png.import34
-rw-r--r--Stages/Spawn/Assets/door-06.pngbin0 -> 529 bytes
-rw-r--r--Stages/Spawn/Assets/door-06.png.import34
-rw-r--r--Stages/Spawn/Assets/door-07.pngbin0 -> 540 bytes
-rw-r--r--Stages/Spawn/Assets/door-07.png.import34
-rw-r--r--Stages/Spawn/Assets/door-08.pngbin0 -> 520 bytes
-rw-r--r--Stages/Spawn/Assets/door-08.png.import34
-rw-r--r--Stages/Spawn/Assets/door-09.pngbin0 -> 522 bytes
-rw-r--r--Stages/Spawn/Assets/door-09.png.import34
-rw-r--r--Stages/Spawn/Assets/door-10.pngbin0 -> 480 bytes
-rw-r--r--Stages/Spawn/Assets/door-10.png.import34
-rw-r--r--Stages/Spawn/Spawn.tscn67
-rw-r--r--Stages/Spawn/spawn.gd32
22 files changed, 439 insertions, 0 deletions
diff --git a/Stages/Spawn/Assets/door-01.png b/Stages/Spawn/Assets/door-01.png
new file mode 100644
index 0000000..6159976
--- /dev/null
+++ b/Stages/Spawn/Assets/door-01.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-01.png.import b/Stages/Spawn/Assets/door-01.png.import
new file mode 100644
index 0000000..98d6cd9
--- /dev/null
+++ b/Stages/Spawn/Assets/door-01.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dqpmj38rrg4yv"
+path="res://.godot/imported/door-01.png-425ed413c3b954b1db385d8381249853.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-01.png"
+dest_files=["res://.godot/imported/door-01.png-425ed413c3b954b1db385d8381249853.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-02.png b/Stages/Spawn/Assets/door-02.png
new file mode 100644
index 0000000..362786a
--- /dev/null
+++ b/Stages/Spawn/Assets/door-02.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-02.png.import b/Stages/Spawn/Assets/door-02.png.import
new file mode 100644
index 0000000..6511cc9
--- /dev/null
+++ b/Stages/Spawn/Assets/door-02.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://digshkiyn376j"
+path="res://.godot/imported/door-02.png-bfccd5ca6b7dd82f938a290c80515633.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-02.png"
+dest_files=["res://.godot/imported/door-02.png-bfccd5ca6b7dd82f938a290c80515633.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-03.png b/Stages/Spawn/Assets/door-03.png
new file mode 100644
index 0000000..4677b44
--- /dev/null
+++ b/Stages/Spawn/Assets/door-03.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-03.png.import b/Stages/Spawn/Assets/door-03.png.import
new file mode 100644
index 0000000..0af19d1
--- /dev/null
+++ b/Stages/Spawn/Assets/door-03.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bf0yhn5wia5l6"
+path="res://.godot/imported/door-03.png-2eac3b88d51668cd47f69da2b3056ef4.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-03.png"
+dest_files=["res://.godot/imported/door-03.png-2eac3b88d51668cd47f69da2b3056ef4.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-04.png b/Stages/Spawn/Assets/door-04.png
new file mode 100644
index 0000000..d52839f
--- /dev/null
+++ b/Stages/Spawn/Assets/door-04.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-04.png.import b/Stages/Spawn/Assets/door-04.png.import
new file mode 100644
index 0000000..0047c3b
--- /dev/null
+++ b/Stages/Spawn/Assets/door-04.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://i5mtaoqqj00s"
+path="res://.godot/imported/door-04.png-6454bd43184e840722a9f32a03a2acd2.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-04.png"
+dest_files=["res://.godot/imported/door-04.png-6454bd43184e840722a9f32a03a2acd2.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-05.png b/Stages/Spawn/Assets/door-05.png
new file mode 100644
index 0000000..0329a03
--- /dev/null
+++ b/Stages/Spawn/Assets/door-05.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-05.png.import b/Stages/Spawn/Assets/door-05.png.import
new file mode 100644
index 0000000..ebd7531
--- /dev/null
+++ b/Stages/Spawn/Assets/door-05.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://7igief13gf4l"
+path="res://.godot/imported/door-05.png-b9867a7e47e7441beff7b957fdeae68d.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-05.png"
+dest_files=["res://.godot/imported/door-05.png-b9867a7e47e7441beff7b957fdeae68d.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-06.png b/Stages/Spawn/Assets/door-06.png
new file mode 100644
index 0000000..2a76746
--- /dev/null
+++ b/Stages/Spawn/Assets/door-06.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-06.png.import b/Stages/Spawn/Assets/door-06.png.import
new file mode 100644
index 0000000..bc2742f
--- /dev/null
+++ b/Stages/Spawn/Assets/door-06.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dylltm6q4i1k7"
+path="res://.godot/imported/door-06.png-4aef5614278bec57cd4cb0f0bf8e5d82.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-06.png"
+dest_files=["res://.godot/imported/door-06.png-4aef5614278bec57cd4cb0f0bf8e5d82.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-07.png b/Stages/Spawn/Assets/door-07.png
new file mode 100644
index 0000000..d2a43f1
--- /dev/null
+++ b/Stages/Spawn/Assets/door-07.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-07.png.import b/Stages/Spawn/Assets/door-07.png.import
new file mode 100644
index 0000000..1bb71b5
--- /dev/null
+++ b/Stages/Spawn/Assets/door-07.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://by7j765nv5l47"
+path="res://.godot/imported/door-07.png-b6e93bf1de8e53ea7313dd2f5bd6b56f.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-07.png"
+dest_files=["res://.godot/imported/door-07.png-b6e93bf1de8e53ea7313dd2f5bd6b56f.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-08.png b/Stages/Spawn/Assets/door-08.png
new file mode 100644
index 0000000..d9de80c
--- /dev/null
+++ b/Stages/Spawn/Assets/door-08.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-08.png.import b/Stages/Spawn/Assets/door-08.png.import
new file mode 100644
index 0000000..0735c6b
--- /dev/null
+++ b/Stages/Spawn/Assets/door-08.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cbllib07vgno8"
+path="res://.godot/imported/door-08.png-180c28e7b03c689fde553bcaf1fbb124.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-08.png"
+dest_files=["res://.godot/imported/door-08.png-180c28e7b03c689fde553bcaf1fbb124.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-09.png b/Stages/Spawn/Assets/door-09.png
new file mode 100644
index 0000000..1963c02
--- /dev/null
+++ b/Stages/Spawn/Assets/door-09.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-09.png.import b/Stages/Spawn/Assets/door-09.png.import
new file mode 100644
index 0000000..9b04f21
--- /dev/null
+++ b/Stages/Spawn/Assets/door-09.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cyf5ywre6q8ok"
+path="res://.godot/imported/door-09.png-1cac21a3e465ef4c52b29b6de64a3c63.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-09.png"
+dest_files=["res://.godot/imported/door-09.png-1cac21a3e465ef4c52b29b6de64a3c63.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Assets/door-10.png b/Stages/Spawn/Assets/door-10.png
new file mode 100644
index 0000000..cdb369d
--- /dev/null
+++ b/Stages/Spawn/Assets/door-10.png
Binary files differ
diff --git a/Stages/Spawn/Assets/door-10.png.import b/Stages/Spawn/Assets/door-10.png.import
new file mode 100644
index 0000000..271d8f2
--- /dev/null
+++ b/Stages/Spawn/Assets/door-10.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dfr2nlb401ys0"
+path="res://.godot/imported/door-10.png-4edb97ee416bdcfa7244bad622ac24b5.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://Stages/Spawn/Assets/door-10.png"
+dest_files=["res://.godot/imported/door-10.png-4edb97ee416bdcfa7244bad622ac24b5.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/Stages/Spawn/Spawn.tscn b/Stages/Spawn/Spawn.tscn
new file mode 100644
index 0000000..0d61ba4
--- /dev/null
+++ b/Stages/Spawn/Spawn.tscn
@@ -0,0 +1,67 @@
+[gd_scene load_steps=14 format=3 uid="uid://42uq574w0fj7"]
+
+[ext_resource type="Texture2D" uid="uid://dqpmj38rrg4yv" path="res://Stages/Spawn/Assets/door-01.png" id="1_etqfv"]
+[ext_resource type="Script" path="res://Stages/Spawn/spawn.gd" id="1_nbk6k"]
+[ext_resource type="Texture2D" uid="uid://digshkiyn376j" path="res://Stages/Spawn/Assets/door-02.png" id="2_o7g1w"]
+[ext_resource type="Texture2D" uid="uid://bf0yhn5wia5l6" path="res://Stages/Spawn/Assets/door-03.png" id="3_ohm4m"]
+[ext_resource type="Texture2D" uid="uid://i5mtaoqqj00s" path="res://Stages/Spawn/Assets/door-04.png" id="4_giyd8"]
+[ext_resource type="Texture2D" uid="uid://7igief13gf4l" path="res://Stages/Spawn/Assets/door-05.png" id="5_imvge"]
+[ext_resource type="Texture2D" uid="uid://dylltm6q4i1k7" path="res://Stages/Spawn/Assets/door-06.png" id="6_x24l1"]
+[ext_resource type="Texture2D" uid="uid://by7j765nv5l47" path="res://Stages/Spawn/Assets/door-07.png" id="7_b5k74"]
+[ext_resource type="Texture2D" uid="uid://cbllib07vgno8" path="res://Stages/Spawn/Assets/door-08.png" id="8_py1bn"]
+[ext_resource type="Texture2D" uid="uid://cyf5ywre6q8ok" path="res://Stages/Spawn/Assets/door-09.png" id="9_otals"]
+[ext_resource type="Texture2D" uid="uid://dfr2nlb401ys0" path="res://Stages/Spawn/Assets/door-10.png" id="10_ycnwd"]
+[ext_resource type="PackedScene" uid="uid://bj8j72hwnt6mo" path="res://animated_sprite.tscn" id="12_2owri"]
+
+[sub_resource type="SpriteFrames" id="SpriteFrames_tkik1"]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": ExtResource("1_etqfv")
+}, {
+"duration": 1.0,
+"texture": ExtResource("2_o7g1w")
+}, {
+"duration": 1.0,
+"texture": ExtResource("3_ohm4m")
+}, {
+"duration": 1.0,
+"texture": ExtResource("4_giyd8")
+}, {
+"duration": 1.0,
+"texture": ExtResource("5_imvge")
+}, {
+"duration": 1.0,
+"texture": ExtResource("6_x24l1")
+}, {
+"duration": 1.0,
+"texture": ExtResource("7_b5k74")
+}, {
+"duration": 1.0,
+"texture": ExtResource("8_py1bn")
+}, {
+"duration": 1.0,
+"texture": ExtResource("9_otals")
+}, {
+"duration": 1.0,
+"texture": ExtResource("10_ycnwd")
+}],
+"loop": false,
+"name": &"default",
+"speed": 6.0
+}]
+
+[node name="Spawn" type="Node2D"]
+script = ExtResource("1_nbk6k")
+
+[node name="AnimatedSprite" parent="." instance=ExtResource("12_2owri")]
+texture_filter = 1
+sprite_frames = SubResource("SpriteFrames_tkik1")
+centered = false
+
+[node name="SpawnTimer" type="Timer" parent="."]
+
+[node name="SpawnPosition" type="Marker2D" parent="."]
+position = Vector2(21, 14)
+
+[connection signal="timeout" from="SpawnTimer" to="." method="_on_spawn_timer_timeout"]
diff --git a/Stages/Spawn/spawn.gd b/Stages/Spawn/spawn.gd
new file mode 100644
index 0000000..fd7309a
--- /dev/null
+++ b/Stages/Spawn/spawn.gd
@@ -0,0 +1,32 @@
+extends Node2D
+
+
+@export var spawn_count := 10
+@export var spawn_frequency := 2.0
+
+var spawned_count := 0
+
+
+func _ready() -> void:
+ $SpawnTimer.wait_time = spawn_frequency / Game.speed
+ Game.speed_changed.connect(func():
+ $SpawnTimer.wait_time = spawn_frequency / Game.speed
+ # calculate remaining time and set fraction accordingly
+ )
+
+ $AnimatedSprite.play("default")
+ $AnimatedSprite.animation_finished.connect(func():
+ _on_spawn_timer_timeout()
+ $SpawnTimer.start()
+ )
+
+
+
+func _on_spawn_timer_timeout() -> void:
+ var unit: Unit = preload("res://Units/Default.tscn").instantiate()
+ unit.position = $SpawnPosition.global_position
+ get_tree().current_scene.add_child(unit)
+
+ spawned_count += 1
+ if spawned_count == spawn_count:
+ $SpawnTimer.stop()