Cyclone-Tracker/Prefabs/cyclone.tscn

72 lines
2.2 KiB
Text
Raw Permalink Normal View History

2025-07-04 15:14:59 +10:00
[gd_scene load_steps=6 format=3 uid="uid://vv75ycmtipn7"]
2025-06-30 20:47:54 +10:00
[ext_resource type="Script" uid="uid://u353j4q7l26d" path="res://cyclone.gd" id="1_khbba"]
[ext_resource type="Texture2D" uid="uid://cdw1vlidvg2yt" path="res://Sprites/Cyclone.png" id="2_7e2hf"]
2025-07-04 15:14:59 +10:00
[sub_resource type="LabelSettings" id="LabelSettings_khbba"]
font_color = Color(0, 0, 0, 1)
[sub_resource type="LabelSettings" id="LabelSettings_7e2hf"]
font_color = Color(0, 0, 0, 1)
2025-06-30 20:47:54 +10:00
[sub_resource type="CircleShape2D" id="CircleShape2D_xr6w1"]
2025-07-04 15:14:59 +10:00
radius = 4.0
2025-06-30 20:47:54 +10:00
2025-07-04 15:14:59 +10:00
[node name="Cyclone" type="RigidBody2D" node_paths=PackedStringArray("sprite", "label", "wind_speed_label", "line", "visuals")]
2025-06-30 20:47:54 +10:00
gravity_scale = 0.0
lock_rotation = true
script = ExtResource("1_khbba")
2025-07-04 15:14:59 +10:00
sprite = NodePath("Visuals/Sprite2D")
label = NodePath("Visuals/cLabel")
wind_speed_label = NodePath("Visuals/wsLabel")
2025-06-30 20:47:54 +10:00
line = NodePath("Line2D")
2025-07-04 15:14:59 +10:00
visuals = NodePath("Visuals")
2025-06-30 20:47:54 +10:00
2025-07-04 15:14:59 +10:00
[node name="Visuals" type="Node2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="Visuals"]
2025-06-30 20:47:54 +10:00
scale = Vector2(0.2, 0.2)
texture = ExtResource("2_7e2hf")
2025-07-04 15:14:59 +10:00
[node name="cLabel" type="Label" parent="Visuals"]
2025-06-30 20:47:54 +10:00
offset_left = -21.0
offset_top = -11.0
offset_right = 19.0
offset_bottom = 12.0
size_flags_horizontal = 4
text = "1"
2025-07-04 15:14:59 +10:00
label_settings = SubResource("LabelSettings_khbba")
2025-06-30 20:47:54 +10:00
horizontal_alignment = 1
vertical_alignment = 1
2025-07-04 15:14:59 +10:00
[node name="wsLabel" type="Label" parent="Visuals"]
2025-06-30 20:47:54 +10:00
offset_left = -21.0
offset_top = -66.0
offset_right = 19.0
offset_bottom = -43.0
size_flags_horizontal = 4
text = "1"
2025-07-04 15:14:59 +10:00
label_settings = SubResource("LabelSettings_7e2hf")
2025-06-30 20:47:54 +10:00
horizontal_alignment = 1
vertical_alignment = 1
2025-07-04 15:14:59 +10:00
[node name="Line2D" type="Line2D" parent="."]
position = Vector2(-572, -229)
width = 2.0
default_color = Color(0.654902, 0, 0.0823529, 0.572549)
joint_mode = 2
2025-06-30 20:47:54 +10:00
[node name="changeTimer" type="Timer" parent="."]
wait_time = 5.0
autostart = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_xr6w1")
[node name="newPointTimer" type="Timer" parent="."]
wait_time = 0.5
autostart = true
[connection signal="timeout" from="changeTimer" to="." method="_on_timer_timeout"]
[connection signal="timeout" from="newPointTimer" to="." method="_on_new_point_timer_timeout"]