2023-04-10 19:45:25 +00:00
|
|
|
[gd_scene load_steps=12 format=3 uid="uid://cpl4tllohhyel"]
|
2023-04-08 15:00:54 +00:00
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://Scripts/EntitySystem/Bunny.gd" id="1_1kj2b"]
|
2023-04-08 20:27:38 +00:00
|
|
|
[ext_resource type="Texture2D" uid="uid://df2fluk0dlqar" path="res://Assets/Sprites/Bunny/bad_bunny_spritesheet.png" id="2_v8p70"]
|
2023-04-08 15:00:54 +00:00
|
|
|
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_sedmr"]
|
|
|
|
|
2023-04-09 14:39:45 +00:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_itvjj"]
|
|
|
|
radius = 14.0
|
|
|
|
|
2023-04-10 19:45:25 +00:00
|
|
|
[sub_resource type="Animation" id="Animation_l8j6b"]
|
|
|
|
resource_name = "MoveLeft"
|
|
|
|
length = 0.5
|
|
|
|
loop_mode = 1
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:frame")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
|
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [5, 6, 7, 8, 9]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_45lfy"]
|
|
|
|
resource_name = "MoveUp"
|
|
|
|
length = 0.5
|
|
|
|
loop_mode = 1
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:frame")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
|
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [15, 16, 17, 18, 19]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_olc18"]
|
|
|
|
resource_name = "MoveDown"
|
|
|
|
length = 0.5
|
|
|
|
loop_mode = 1
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:frame")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
|
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [0, 1, 2, 3, 4]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_agj62"]
|
|
|
|
resource_name = "MoveRight"
|
|
|
|
length = 0.5
|
|
|
|
loop_mode = 1
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:frame")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
|
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [10, 11, 12, 13, 14]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_6br4g"]
|
|
|
|
resource_name = "Idle"
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:frame")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0),
|
|
|
|
"transitions": PackedFloat32Array(1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [0]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_mp212"]
|
|
|
|
length = 0.001
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:frame")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0),
|
|
|
|
"transitions": PackedFloat32Array(1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [0]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_uuf00"]
|
|
|
|
_data = {
|
|
|
|
"Idle": SubResource("Animation_6br4g"),
|
|
|
|
"MoveDown": SubResource("Animation_olc18"),
|
|
|
|
"MoveLeft": SubResource("Animation_l8j6b"),
|
|
|
|
"MoveRight": SubResource("Animation_agj62"),
|
|
|
|
"MoveUp": SubResource("Animation_45lfy"),
|
|
|
|
"RESET": SubResource("Animation_mp212")
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="Bunny" type="CharacterBody2D" node_paths=PackedStringArray("animation_player", "agent")]
|
2023-04-08 15:00:54 +00:00
|
|
|
collision_layer = 4
|
2023-04-09 14:39:45 +00:00
|
|
|
collision_mask = 15
|
2023-04-08 15:00:54 +00:00
|
|
|
script = ExtResource("1_1kj2b")
|
2023-04-10 19:45:25 +00:00
|
|
|
animation_player = NodePath("BunnyAnimator")
|
2023-04-09 14:39:45 +00:00
|
|
|
agent = NodePath("NavigationAgent")
|
2023-04-08 15:00:54 +00:00
|
|
|
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
2023-04-09 14:39:45 +00:00
|
|
|
position = Vector2(0.5, 0)
|
2023-04-08 20:27:38 +00:00
|
|
|
texture = ExtResource("2_v8p70")
|
|
|
|
hframes = 5
|
|
|
|
vframes = 4
|
2023-04-08 15:00:54 +00:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
|
|
shape = SubResource("CircleShape2D_sedmr")
|
2023-04-09 14:39:45 +00:00
|
|
|
|
|
|
|
[node name="NavigationAgent" type="NavigationAgent2D" parent="."]
|
|
|
|
path_metadata_flags = 0
|
|
|
|
|
|
|
|
[node name="Area2D" type="Area2D" parent="."]
|
|
|
|
collision_layer = 64
|
|
|
|
collision_mask = 4
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
|
|
shape = SubResource("CircleShape2D_itvjj")
|
|
|
|
|
2023-04-10 19:45:25 +00:00
|
|
|
[node name="BunnyAnimator" type="AnimationPlayer" parent="."]
|
|
|
|
libraries = {
|
|
|
|
"": SubResource("AnimationLibrary_uuf00")
|
|
|
|
}
|
|
|
|
|
2023-04-09 14:39:45 +00:00
|
|
|
[connection signal="body_entered" from="Area2D" to="." method="_on_collision"]
|
|
|
|
[connection signal="body_exited" from="Area2D" to="." method="_of_collision"]
|