/ youtube_game / scenes / slime.tscn
slime.tscn
 1  [gd_scene load_steps=10 format=3 uid="uid://dkpuctfpk3q3n"]
 2  
 3  [ext_resource type="Script" uid="uid://b0bdui16pevuq" path="res://script/slime.gd" id="1_n6pvg"]
 4  [ext_resource type="Texture2D" uid="uid://bprm7xdkc5bbm" path="res://assets/sprites/slime_purple.png" id="1_p2gj0"]
 5  [ext_resource type="PackedScene" uid="uid://jnyxc8d80s7x" path="res://scenes/killzone.tscn" id="2_n6pvg"]
 6  
 7  [sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
 8  atlas = ExtResource("1_p2gj0")
 9  region = Rect2(0, 24, 24, 24)
10  
11  [sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
12  atlas = ExtResource("1_p2gj0")
13  region = Rect2(24, 24, 24, 24)
14  
15  [sub_resource type="AtlasTexture" id="AtlasTexture_fd6lc"]
16  atlas = ExtResource("1_p2gj0")
17  region = Rect2(48, 24, 24, 24)
18  
19  [sub_resource type="AtlasTexture" id="AtlasTexture_gstla"]
20  atlas = ExtResource("1_p2gj0")
21  region = Rect2(72, 24, 24, 24)
22  
23  [sub_resource type="SpriteFrames" id="SpriteFrames_v5wyi"]
24  animations = [{
25  "frames": [{
26  "duration": 1.0,
27  "texture": SubResource("AtlasTexture_pjw23")
28  }, {
29  "duration": 1.0,
30  "texture": SubResource("AtlasTexture_2npkn")
31  }, {
32  "duration": 1.0,
33  "texture": SubResource("AtlasTexture_fd6lc")
34  }, {
35  "duration": 1.0,
36  "texture": SubResource("AtlasTexture_gstla")
37  }],
38  "loop": true,
39  "name": &"default",
40  "speed": 10.0
41  }]
42  
43  [sub_resource type="RectangleShape2D" id="RectangleShape2D_0l8pv"]
44  size = Vector2(12, 12.5)
45  
46  [node name="Slime" type="Node2D"]
47  script = ExtResource("1_n6pvg")
48  
49  [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
50  sprite_frames = SubResource("SpriteFrames_v5wyi")
51  autoplay = "default"
52  frame_progress = 0.389405
53  flip_h = true
54  
55  [node name="Killzone" parent="." instance=ExtResource("2_n6pvg")]
56  
57  [node name="CollisionShape2D" type="CollisionShape2D" parent="Killzone"]
58  position = Vector2(0, 5.75)
59  shape = SubResource("RectangleShape2D_0l8pv")
60  
61  [node name="RayCastRight" type="RayCast2D" parent="."]
62  position = Vector2(0, 6)
63  target_position = Vector2(12, 0)
64  
65  [node name="RayCastLeft" type="RayCast2D" parent="."]
66  position = Vector2(0, 6)
67  target_position = Vector2(-12, 0)