Add basic enemy behavior and spawning system
The changes introduce enemy mechanics and management - including spawning, movement patterns, shooting timers, and death handling.
This commit is contained in:
parent
85155b1c7d
commit
996a0bb8f7
8 changed files with 300 additions and 7 deletions
|
|
@ -1,10 +1,64 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://oq85kpt7a853"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://ce5rw02b3373d"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ssdtocwmj0wj" path="res://scenes/start.tscn" id="1_0wfyh"]
|
||||
[ext_resource type="PackedScene" uid="uid://brutkgnx73onj" path="res://scenes/gameplay.tscn" id="2_sugp2"]
|
||||
[ext_resource type="Script" uid="uid://b2tub370i3s3v" path="res://scenes/main.gd" id="1_jyhfs"]
|
||||
[ext_resource type="Texture2D" uid="uid://jj8b7vqj3ihx" path="res://resources/Mini Pixel Pack 3/Space_BG (2 frames) (64 x 64).png" id="2_tbgi4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bkuucjejc7p2v" path="res://scenes/player.tscn" id="3_tefeu"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4vq2ytntfvoj" path="res://scenes/enemy.tscn" id="4_o6xl0"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_vcsgt"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Background:region_rect")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Rect2(0, 0, 240, 320)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_rarhs"]
|
||||
resource_name = "scroll"
|
||||
length = 2.0
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Background:region_rect")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Rect2(0, 0, 240, 320), Rect2(0, -64, 240, 320)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_c01mt"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_vcsgt"),
|
||||
&"scroll": SubResource("Animation_rarhs")
|
||||
}
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_jyhfs")
|
||||
|
||||
[node name="Start" parent="." instance=ExtResource("1_0wfyh")]
|
||||
[node name="Background" type="Sprite2D" parent="."]
|
||||
texture_repeat = 2
|
||||
texture = ExtResource("2_tbgi4")
|
||||
centered = false
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 0, 240, 320)
|
||||
|
||||
[node name="Gameplay" parent="." instance=ExtResource("2_sugp2")]
|
||||
[node name="Player" parent="." instance=ExtResource("3_tefeu")]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_c01mt")
|
||||
}
|
||||
autoplay = "scroll"
|
||||
|
||||
[node name="Enemy" parent="." instance=ExtResource("4_o6xl0")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue