131 lines
4.1 KiB
Text
131 lines
4.1 KiB
Text
[gd_scene load_steps=12 format=3 uid="uid://bwtjfpfkykfdr"]
|
|
|
|
[ext_resource type="Script" uid="uid://bt4bdjyekgh53" path="res://scripts/ball_snake/ball_snake.gd" id="1_7ck2q"]
|
|
[ext_resource type="Script" uid="uid://doitxsfhjpfh0" path="res://objects/rotoboy/roto_boy.gd" id="1_pwab3"]
|
|
[ext_resource type="Texture2D" uid="uid://cvgdwf28yr7fw" path="res://assets/textures/rotoboy/rotoboy.png" id="2_3s2uc"]
|
|
[ext_resource type="Texture2D" uid="uid://ckfu1u3qxssrj" path="res://assets/textures/rotoboy/rotoboy_face.png" id="3_gp51k"]
|
|
[ext_resource type="Texture2D" uid="uid://bmohkn7gmnptg" path="res://assets/textures/rotoboy/rotoboy_smile.png" id="4_qes26"]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_pwab3"]
|
|
radius = 24.0
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o2cr"]
|
|
size = Vector2(48, 8)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_5ig0v"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": ExtResource("4_qes26")
|
|
}],
|
|
"loop": true,
|
|
"name": &"happy",
|
|
"speed": 5.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": ExtResource("3_gp51k")
|
|
}],
|
|
"loop": true,
|
|
"name": &"normal",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="Animation" id="Animation_qes26"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath(".:speed")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [0.0]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_pwab3"]
|
|
resource_name = "on_off"
|
|
length = 3.0
|
|
loop_mode = 1
|
|
step = 0.1
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath(".:speed")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0, 1, 1.1, 2.9, 3),
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
"update": 0,
|
|
"values": [0.0, 0.0, 1.0, 1.0, 1.0]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5ig0v"]
|
|
_data = {
|
|
&"RESET": SubResource("Animation_qes26"),
|
|
&"on_off": SubResource("Animation_pwab3")
|
|
}
|
|
|
|
[node name="RotoBoy" type="Node2D" node_paths=PackedStringArray("rotation_pivot", "collision_shape")]
|
|
script = ExtResource("1_pwab3")
|
|
rotation_speed = 18.8496
|
|
launch_speed = 50.0
|
|
rotation_pivot = NodePath("RotatingPiece")
|
|
collision_shape = NodePath("RotatingPiece/AnimatableBody2D/CollisionShape2D")
|
|
|
|
[node name="PlayerDetector" type="Area2D" parent="."]
|
|
collision_layer = 0
|
|
collision_mask = 16
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerDetector"]
|
|
shape = SubResource("CircleShape2D_pwab3")
|
|
debug_color = Color(0.752941, 0.196078, 1, 0.25098)
|
|
|
|
[node name="RotatingPiece" type="Node2D" parent="."]
|
|
|
|
[node name="SnakeEndLeft" type="Node2D" parent="RotatingPiece"]
|
|
position = Vector2(-20, 0)
|
|
|
|
[node name="SnakeEndRight" type="Node2D" parent="RotatingPiece"]
|
|
position = Vector2(20, 0)
|
|
|
|
[node name="AnimatableBody2D" type="AnimatableBody2D" parent="RotatingPiece"]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RotatingPiece/AnimatableBody2D"]
|
|
shape = SubResource("RectangleShape2D_8o2cr")
|
|
|
|
[node name="BallSnakeLeft" type="Node2D" parent="." node_paths=PackedStringArray("target")]
|
|
script = ExtResource("1_7ck2q")
|
|
texture = ExtResource("2_3s2uc")
|
|
target = NodePath("../RotatingPiece/SnakeEndLeft")
|
|
segments = 2
|
|
tail_segment = false
|
|
auto_density = true
|
|
pixels_per_segment = 6.0
|
|
|
|
[node name="BallSnakeRight" type="Node2D" parent="." node_paths=PackedStringArray("target")]
|
|
script = ExtResource("1_7ck2q")
|
|
texture = ExtResource("2_3s2uc")
|
|
target = NodePath("../RotatingPiece/SnakeEndRight")
|
|
segments = 2
|
|
tail_segment = false
|
|
auto_density = true
|
|
pixels_per_segment = 6.0
|
|
|
|
[node name="Head" type="AnimatedSprite2D" parent="."]
|
|
unique_name_in_owner = true
|
|
sprite_frames = SubResource("SpriteFrames_5ig0v")
|
|
animation = &"happy"
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
&"": SubResource("AnimationLibrary_5ig0v")
|
|
}
|
|
autoplay = "on_off"
|
|
|
|
[connection signal="body_entered" from="PlayerDetector" to="." method="_on_player_detector_body_entered"]
|
|
[connection signal="body_exited" from="PlayerDetector" to="." method="_on_player_detector_body_exited"]
|