Background character and enemy

This commit is contained in:
2024-10-26 11:32:56 +02:00
parent 706c85338a
commit f55a15e24e
89 changed files with 1616 additions and 0 deletions

55
scenes/enemy.tscn Normal file
View File

@ -0,0 +1,55 @@
[gd_scene load_steps=9 format=3 uid="uid://cw2jmrfd0fivj"]
[ext_resource type="Script" path="res://scripts/enemy.gd" id="1_lkhbv"]
[ext_resource type="Texture2D" uid="uid://dopuijjnd0opy" path="res://sprites/characters/slime.png" id="1_xgtjh"]
[sub_resource type="AtlasTexture" id="AtlasTexture_8hrfx"]
atlas = ExtResource("1_xgtjh")
region = Rect2(0, 0, 32, 37)
[sub_resource type="AtlasTexture" id="AtlasTexture_gm427"]
atlas = ExtResource("1_xgtjh")
region = Rect2(32, 0, 32, 37)
[sub_resource type="AtlasTexture" id="AtlasTexture_m13qv"]
atlas = ExtResource("1_xgtjh")
region = Rect2(64, 0, 32, 37)
[sub_resource type="AtlasTexture" id="AtlasTexture_vtdp4"]
atlas = ExtResource("1_xgtjh")
region = Rect2(96, 0, 32, 37)
[sub_resource type="SpriteFrames" id="SpriteFrames_igl3y"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_8hrfx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gm427")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m13qv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vtdp4")
}],
"loop": true,
"name": &"idle",
"speed": 6.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_x0h3l"]
radius = 5.0
[node name="Enemy" type="CharacterBody2D"]
script = ExtResource("1_lkhbv")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_igl3y")
animation = &"idle"
autoplay = "idle"
frame_progress = 0.290664
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_x0h3l")