Slime with tracking
This commit is contained in:
parent
5a16c33249
commit
0d9fa06557
6 changed files with 195 additions and 1 deletions
54
scenes/enemies/slime.tscn
Normal file
54
scenes/enemies/slime.tscn
Normal file
|
@ -0,0 +1,54 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://cyvqa6g64cw37"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/enemies/slime.gd" id="1_hnufy"]
|
||||
[ext_resource type="Texture2D" uid="uid://devrwnq1oj3qv" path="res://ressources/images/blob-1.png.png" id="1_n4mgf"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0cua5ecp7bfw" path="res://ressources/images/blob-2-4.png.png" id="2_w8gqg"]
|
||||
[ext_resource type="Texture2D" uid="uid://cc1kqgdbwm1dh" path="res://ressources/images/blob-3.png.png" id="3_pwpfc"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_qfla8"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_n4mgf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_w8gqg")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"idle",
|
||||
"speed": 3.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_n4mgf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_w8gqg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_pwpfc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_w8gqg")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"walk_down",
|
||||
"speed": 3.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"]
|
||||
radius = 20.0
|
||||
|
||||
[node name="Slime" type="CharacterBody2D"]
|
||||
script = ExtResource("1_hnufy")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(-3, 12)
|
||||
sprite_frames = SubResource("SpriteFrames_qfla8")
|
||||
animation = &"idle"
|
||||
frame = 1
|
||||
frame_progress = 1.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_bokrm")
|
||||
disabled = true
|
Loading…
Add table
Add a link
Reference in a new issue