summaryrefslogtreecommitdiff
path: root/Stages
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-03 12:51:49 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-03 12:51:49 +0200
commit5442988a8ccecb9c323fc98557391a15ff245b87 (patch)
tree1864a03602291e2c495a8846b80ec90414060f61 /Stages
parentc8bd14d6feeca72fc96b895c9382ebc16a1caf55 (diff)
next commit
Diffstat (limited to 'Stages')
-rw-r--r--Stages/Goal/Goal.tscn12
-rw-r--r--Stages/Goal/goal.gd2
-rw-r--r--Stages/Spawn/spawn.gd4
-rw-r--r--Stages/world_01.tscn2
4 files changed, 10 insertions, 10 deletions
diff --git a/Stages/Goal/Goal.tscn b/Stages/Goal/Goal.tscn
index 2e208ec..bb5de7b 100644
--- a/Stages/Goal/Goal.tscn
+++ b/Stages/Goal/Goal.tscn
@@ -1,6 +1,7 @@
-[gd_scene load_steps=10 format=3 uid="uid://erjn41cnb3ha"]
+[gd_scene load_steps=11 format=3 uid="uid://erjn41cnb3ha"]
[ext_resource type="Script" path="res://Stages/Goal/goal.gd" id="1_olpsd"]
+[ext_resource type="PackedScene" uid="uid://bj8j72hwnt6mo" path="res://animated_sprite.tscn" id="2_5nfwa"]
[ext_resource type="Texture2D" uid="uid://dfd06s7jdcoh2" path="res://Stages/Goal/Assets/goal-01.png" id="2_fv7o7"]
[ext_resource type="Texture2D" uid="uid://cc5dx2nohiq0e" path="res://Stages/Goal/Assets/goal-02.png" id="3_55ojj"]
[ext_resource type="Texture2D" uid="uid://cllb8yhfyxo2c" path="res://Stages/Goal/Assets/goal-03.png" id="4_vme42"]
@@ -8,7 +9,7 @@
[ext_resource type="Texture2D" uid="uid://crfbfk6vwy5vg" path="res://Stages/Goal/Assets/goal-05.png" id="6_iyyas"]
[ext_resource type="Texture2D" uid="uid://rrwn2c4rwgvx" path="res://Stages/Goal/Assets/goal-06.png" id="7_dvlyc"]
-[sub_resource type="SpriteFrames" id="SpriteFrames_0huga"]
+[sub_resource type="SpriteFrames" id="SpriteFrames_mhkqq"]
animations = [{
"frames": [{
"duration": 1.0,
@@ -35,15 +36,14 @@ animations = [{
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_7oxgv"]
-size = Vector2(8, 2)
+size = Vector2(4, 2)
[node name="Goal" type="Node2D"]
script = ExtResource("1_olpsd")
-[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
+[node name="AnimatedSprite" parent="." instance=ExtResource("2_5nfwa")]
texture_filter = 1
-sprite_frames = SubResource("SpriteFrames_0huga")
-frame_progress = 0.883034
+sprite_frames = SubResource("SpriteFrames_mhkqq")
centered = false
[node name="Area2D" type="Area2D" parent="."]
diff --git a/Stages/Goal/goal.gd b/Stages/Goal/goal.gd
index 6854d7a..934a071 100644
--- a/Stages/Goal/goal.gd
+++ b/Stages/Goal/goal.gd
@@ -2,7 +2,7 @@ extends Node2D
func _ready() -> void:
- $AnimatedSprite2D.play("default")
+ $AnimatedSprite.play("default")
func _on_area_2d_body_entered(body: Node2D) -> void:
diff --git a/Stages/Spawn/spawn.gd b/Stages/Spawn/spawn.gd
index fd7309a..0189632 100644
--- a/Stages/Spawn/spawn.gd
+++ b/Stages/Spawn/spawn.gd
@@ -16,7 +16,7 @@ func _ready() -> void:
$AnimatedSprite.play("default")
$AnimatedSprite.animation_finished.connect(func():
- _on_spawn_timer_timeout()
+ #_on_spawn_timer_timeout()
$SpawnTimer.start()
)
@@ -28,5 +28,5 @@ func _on_spawn_timer_timeout() -> void:
get_tree().current_scene.add_child(unit)
spawned_count += 1
- if spawned_count == spawn_count:
+ if spawned_count >= spawn_count:
$SpawnTimer.stop()
diff --git a/Stages/world_01.tscn b/Stages/world_01.tscn
index 577c4b2..3f8f06f 100644
--- a/Stages/world_01.tscn
+++ b/Stages/world_01.tscn
@@ -24,7 +24,7 @@ clip_children = 1
tile_map_data = PackedByteArray("AAABAAwAAgAAAAAAAAACAAwAAgABAAAAAAADAAwAAgABAAAAAAAEAAwAAgABAAAAAAAFAAwAAgABAAAAAAAGAAwAAgABAAAAAAAHAAwAAgABAAAAAAAIAAwAAgABAAAAAAAJAAwAAgABAAAAAAAKAAwAAgABAAAAAAALAAwAAgABAAAAAAAMAAwAAgABAAAAAAANAAwAAgABAAAAAAAOAAwAAgABAAAAAAAPAAwAAgABAAAAAAAQAAwAAgABAAAAAAARAAwAAgAAAAAAAAABAAsAAgAAAAAAAAARAAsAAgAAAAAAAAA=")
[node name="Spawn" parent="." instance=ExtResource("2_r2f03")]
-position = Vector2(31, 21)
+position = Vector2(32, 16)
spawn_count = 50
spawn_frequency = 1.0