This commit is contained in:
Tabby 2025-09-03 21:34:33 +10:00
parent 6ce339b430
commit 314f485f01
15 changed files with 318 additions and 17 deletions

231
test.tscn
View file

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://daqqurdrnk61h"]
[gd_scene load_steps=50 format=3 uid="uid://daqqurdrnk61h"]
[ext_resource type="Script" uid="uid://bue4xxejdsmqh" path="res://snakeManager.gd" id="1_6uqi0"]
[ext_resource type="PackedScene" uid="uid://bwoeu7ask0fck" path="res://prefabs/snake_segment.tscn" id="1_8uh7m"]
@ -8,10 +8,159 @@
[ext_resource type="Script" uid="uid://b0djy8fmq4qjq" path="res://camera_2d.gd" id="5_ykrsh"]
[ext_resource type="Script" uid="uid://btw5oi52pxy7d" path="res://apple_pit_man.gd" id="6_77dp3"]
[ext_resource type="PackedScene" uid="uid://qpjwodeafyno" path="res://prefabs/apple.tscn" id="6_g14j6"]
[ext_resource type="Texture2D" uid="uid://d1qnbjrs54epd" path="res://assets/applePit.png" id="7_0m0f1"]
[ext_resource type="PackedScene" uid="uid://bl5py87o1qbgr" path="res://prefabs/wall.tscn" id="7_vbegm"]
[ext_resource type="Script" uid="uid://dib0u5gw356nv" path="res://apple_furnace_man.gd" id="8_5tkv4"]
[ext_resource type="Texture2D" uid="uid://dfsa7lnulqunr" path="res://assets/furnace.png" id="9_0m0f1"]
[ext_resource type="Script" uid="uid://cpav6iuq2hrns" path="res://uiman.gd" id="9_xersf"]
[ext_resource type="Texture2D" uid="uid://dyxnlko6tpmui" path="res://icon.svg" id="11_77dp3"]
[sub_resource type="AtlasTexture" id="AtlasTexture_b0q6j"]
atlas = ExtResource("7_0m0f1")
region = Rect2(0, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_mhym6"]
atlas = ExtResource("7_0m0f1")
region = Rect2(128, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_a3se8"]
atlas = ExtResource("7_0m0f1")
region = Rect2(256, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_uty7l"]
atlas = ExtResource("7_0m0f1")
region = Rect2(384, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_45l4g"]
atlas = ExtResource("7_0m0f1")
region = Rect2(512, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_4uo0j"]
atlas = ExtResource("7_0m0f1")
region = Rect2(0, 128, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_vxl6d"]
atlas = ExtResource("7_0m0f1")
region = Rect2(128, 128, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_eski5"]
atlas = ExtResource("7_0m0f1")
region = Rect2(256, 128, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_pdf00"]
atlas = ExtResource("7_0m0f1")
region = Rect2(384, 128, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_a6gra"]
atlas = ExtResource("7_0m0f1")
region = Rect2(512, 128, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_dwqlq"]
atlas = ExtResource("7_0m0f1")
region = Rect2(0, 256, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_15c7i"]
atlas = ExtResource("7_0m0f1")
region = Rect2(128, 256, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_xpeyw"]
atlas = ExtResource("7_0m0f1")
region = Rect2(256, 256, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_dpmuy"]
atlas = ExtResource("7_0m0f1")
region = Rect2(384, 256, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_yww54"]
atlas = ExtResource("7_0m0f1")
region = Rect2(512, 256, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_j75vh"]
atlas = ExtResource("7_0m0f1")
region = Rect2(0, 384, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_rrpoi"]
atlas = ExtResource("7_0m0f1")
region = Rect2(128, 384, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_34fux"]
atlas = ExtResource("7_0m0f1")
region = Rect2(256, 384, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_ppv7d"]
atlas = ExtResource("7_0m0f1")
region = Rect2(384, 384, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_naet1"]
atlas = ExtResource("7_0m0f1")
region = Rect2(512, 384, 128, 128)
[sub_resource type="SpriteFrames" id="SpriteFrames_6qlrc"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_b0q6j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mhym6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a3se8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uty7l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_45l4g")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4uo0j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vxl6d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eski5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pdf00")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a6gra")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dwqlq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_15c7i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xpeyw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dpmuy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yww54")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j75vh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rrpoi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_34fux")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ppv7d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_naet1")
}],
"loop": false,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="LabelSettings" id="LabelSettings_00tp4"]
font_size = 36
@ -22,6 +171,61 @@ outline_color = Color(1, 0.478431, 1, 1)
[sub_resource type="CircleShape2D" id="CircleShape2D_00tp4"]
radius = 64.0
[sub_resource type="AtlasTexture" id="AtlasTexture_6qlrc"]
atlas = ExtResource("9_0m0f1")
region = Rect2(0, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_shobf"]
atlas = ExtResource("9_0m0f1")
region = Rect2(128, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_lb1cv"]
atlas = ExtResource("9_0m0f1")
region = Rect2(256, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_2h37t"]
atlas = ExtResource("9_0m0f1")
region = Rect2(384, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_adp8l"]
atlas = ExtResource("9_0m0f1")
region = Rect2(512, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_dvnpp"]
atlas = ExtResource("9_0m0f1")
region = Rect2(0, 128, 128, 128)
[sub_resource type="SpriteFrames" id="SpriteFrames_ffwl0"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6qlrc")
}],
"loop": false,
"name": &"off",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_shobf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lb1cv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2h37t")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_adp8l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dvnpp")
}],
"loop": true,
"name": &"on",
"speed": 6.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_77dp3"]
radius = 64.0
@ -31,6 +235,9 @@ font_color = Color(1, 0.490271, 0.0740941, 1)
outline_size = 8
outline_color = Color(0.87451, 0, 0, 1)
[sub_resource type="Gradient" id="Gradient_0m0f1"]
colors = PackedColorArray(0, 0.662745, 0, 1, 0, 0.428325, 0.224898, 1)
[sub_resource type="CircleShape2D" id="CircleShape2D_ehkex"]
radius = 50.0
@ -66,15 +273,16 @@ is_head = true
[node name="Braincell" parent="Snake/SegementHolder/SnakeSegment" instance=ExtResource("2_6uqi0")]
[node name="ApplePit" type="Node2D" parent="Snake/SegementHolder/SnakeSegment" node_paths=PackedStringArray("snake_man", "count", "my_area", "brain")]
[node name="ApplePit" type="Node2D" parent="Snake/SegementHolder/SnakeSegment" node_paths=PackedStringArray("snake_man", "count", "my_area", "brain", "pit_sprite")]
script = ExtResource("6_77dp3")
snake_man = NodePath("../../..")
count = NodePath("Label")
my_area = NodePath("Area2D")
brain = NodePath("../Braincell")
pit_sprite = NodePath("Sprite2D")
[node name="Sprite2D" type="Sprite2D" parent="Snake/SegementHolder/SnakeSegment/ApplePit"]
texture = ExtResource("11_77dp3")
[node name="Sprite2D" type="AnimatedSprite2D" parent="Snake/SegementHolder/SnakeSegment/ApplePit"]
sprite_frames = SubResource("SpriteFrames_6qlrc")
[node name="Label" type="Label" parent="Snake/SegementHolder/SnakeSegment/ApplePit"]
offset_left = -80.0
@ -96,15 +304,19 @@ position = Vector2(-320, 0)
next_segment = NodePath("../SnakeSegment")
door_disabled = true
[node name="AppleFurnace" type="Node2D" parent="Snake/SegementHolder/SnakeSegment2" node_paths=PackedStringArray("snake_man", "count", "my_area", "brain")]
[node name="AppleFurnace" type="Node2D" parent="Snake/SegementHolder/SnakeSegment2" node_paths=PackedStringArray("snake_man", "count", "my_area", "brain", "furnace_sprite")]
script = ExtResource("8_5tkv4")
snake_man = NodePath("../../..")
count = NodePath("Label2")
my_area = NodePath("Area2D")
brain = NodePath("../../SnakeSegment/Braincell")
furnace_sprite = NodePath("Sprite2D")
[node name="Sprite2D" type="Sprite2D" parent="Snake/SegementHolder/SnakeSegment2/AppleFurnace"]
texture = ExtResource("11_77dp3")
[node name="Sprite2D" type="AnimatedSprite2D" parent="Snake/SegementHolder/SnakeSegment2/AppleFurnace"]
sprite_frames = SubResource("SpriteFrames_ffwl0")
animation = &"off"
autoplay = "off"
frame_progress = 1.0
[node name="Area2D" type="Area2D" parent="Snake/SegementHolder/SnakeSegment2/AppleFurnace"]
@ -127,8 +339,9 @@ next_segment = NodePath("../SnakeSegment2")
door_disabled = true
[node name="Line2D" type="Line2D" parent="Snake"]
width = 320.0
width = 330.0
default_color = Color(0, 0.662728, 1.54018e-06, 1)
gradient = SubResource("Gradient_0m0f1")
joint_mode = 2
begin_cap_mode = 2
end_cap_mode = 2