Compare commits

..

1 Commits

Author SHA1 Message Date
kziolkowski 9499c27444 🚧 WIP: trying to rework the detection system (it fails) 2025-12-09 17:51:00 +01:00
83 changed files with 770 additions and 3570 deletions
-1
View File
@@ -1 +0,0 @@
Babushka
-3
View File
@@ -1,3 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="project" />
</component>
-3
View File
@@ -8,7 +8,4 @@
<Folder Include="prefabs\UI\Inventory\" /> <Folder Include="prefabs\UI\Inventory\" />
<Folder Include="scripts\CSharp\Low Code\Randomizer\" /> <Folder Include="scripts\CSharp\Low Code\Randomizer\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
</Project> </Project>
@@ -4,22 +4,19 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://b3kyrsoobmkhp" uid="uid://b3kyrsoobmkhp"
path="res://.godot/imported/best_house_blender.blend-ac89c74aef2f275bdf4b4baadee17c0c.scn" valid=false
[deps] [deps]
source_file="res://art/mockups/3d/best_house_blender.blend" source_file="res://art/mockups/3d/best_house_blender.blend"
dest_files=["res://.godot/imported/best_house_blender.blend-ac89c74aef2f275bdf4b4baadee17c0c.scn"]
[params] [params]
nodes/root_type="" nodes/root_type=""
nodes/root_name="" nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true nodes/apply_root_scale=true
nodes/root_scale=1.0 nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true meshes/ensure_tangents=true
meshes/generate_lods=true meshes/generate_lods=true
@@ -34,9 +31,6 @@ animation/trimming=false
animation/remove_immutable_tracks=true animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false animation/import_rest_as_RESET=false
import_script/path="" import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={} _subresources={}
blender/nodes/visible=0 blender/nodes/visible=0
blender/nodes/active_collection_only=false blender/nodes/active_collection_only=false
@@ -56,4 +50,3 @@ blender/materials/export_materials=1
blender/animation/limit_playback=true blender/animation/limit_playback=true
blender/animation/always_sample=true blender/animation/always_sample=true
blender/animation/group_tracks=true blender/animation/group_tracks=true
gltf/naming_version=0
+1 -1
View File
@@ -1,7 +1,7 @@
[quest_complete quest_resource="res://resources/quests/demo/7_talk_yeli_inside_1.tres"] [quest_complete quest_resource="res://resources/quests/demo/7_talk_yeli_inside_1.tres"]
join Yeli right join Yeli right
Yeli: Thank you for your help out there. Yeli: Thank you for your help out there.
Yeli: You must be tired. Please rest. I prepared a bed for you. It's the door in the middle. Yeli: You must be tired. Please rest. I prepared a bed for you. It's in the room to the left.
Yeli: There is nothing interesting to see here. Yeli: There is nothing interesting to see here.
leave Yeli leave Yeli
[quest_activate quest_resource="res://resources/quests/demo/8_goto_bed.tres"] [quest_activate quest_resource="res://resources/quests/demo/8_goto_bed.tres"]
+4 -2
View File
@@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="_builds/Babushka_win_0_5/Babushka.exe" export_path="_builds/Babushka_showcase_6a/Babushka.exe"
patches=PackedStringArray() patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
@@ -26,6 +26,7 @@ debug/export_console_wrapper=1
binary_format/embed_pck=false binary_format/embed_pck=false
texture_format/s3tc_bptc=true texture_format/s3tc_bptc=true
texture_format/etc2_astc=false texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64" binary_format/architecture="x86_64"
codesign/enable=false codesign/enable=false
codesign/timestamp=true codesign/timestamp=true
@@ -79,7 +80,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="_builds/Babushka_linux_0_5/Babushka.x86_64" export_path="_builds/Babushka_showcase_lux_06a/Babushka.x86_64"
patches=PackedStringArray() patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
@@ -96,6 +97,7 @@ debug/export_console_wrapper=1
binary_format/embed_pck=false binary_format/embed_pck=false
texture_format/s3tc_bptc=true texture_format/s3tc_bptc=true
texture_format/etc2_astc=false texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64" binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/host="user@host_ip"
+2 -22
View File
@@ -1,30 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://l1hdihubffeg"] [gd_scene load_steps=2 format=3 uid="uid://l1hdihubffeg"]
[ext_resource type="Script" uid="uid://b5i41b6502xam" path="res://scripts/CSharp/Common/Fight/FighterDamageIndicatorFlyingNumber.cs" id="1_m0ub6"] [ext_resource type="Script" uid="uid://b5i41b6502xam" path="res://scripts/CSharp/Common/Fight/FighterDamageIndicatorFlyingNumber.cs" id="1_m0ub6"]
[ext_resource type="Texture2D" uid="uid://do0y56t1moi2" path="res://art/mockups/erdbeeren.png" id="2_ctnqp"]
[node name="DamageFlyingNuber" type="Node2D" node_paths=PackedStringArray("_label", "_sprite")] [node name="DamageFlyingNuber" type="Node2D" node_paths=PackedStringArray("_label")]
script = ExtResource("1_m0ub6") script = ExtResource("1_m0ub6")
_label = NodePath("Label") _label = NodePath("Label")
_sprite = NodePath("TextureRect")
[node name="TextureRect" type="TextureRect" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -61.0
offset_top = -61.0
offset_right = 61.0
offset_bottom = 61.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2_ctnqp")
expand_mode = 1
stretch_mode = 5
[node name="Label" type="Label" parent="."] [node name="Label" type="Label" parent="."]
custom_minimum_size = Vector2(200, 100) custom_minimum_size = Vector2(200, 100)
+1 -5
View File
@@ -1,10 +1,6 @@
[gd_scene load_steps=4 format=3 uid="uid://n5cj71bxxjkk"] [gd_scene load_steps=2 format=3 uid="uid://n5cj71bxxjkk"]
[ext_resource type="Script" uid="uid://dqe1i2qmpttwf" path="res://scripts/CSharp/Common/Fight/FightWorld.cs" id="1_tnyce"] [ext_resource type="Script" uid="uid://dqe1i2qmpttwf" path="res://scripts/CSharp/Common/Fight/FightWorld.cs" id="1_tnyce"]
[ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="2_lxs0o"]
[ext_resource type="Resource" uid="uid://0mnsr4anoaiq" path="res://resources/items/beet.tres" id="3_008v8"]
[node name="FightWorldAutoload" type="Node2D"] [node name="FightWorldAutoload" type="Node2D"]
script = ExtResource("1_tnyce") script = ExtResource("1_tnyce")
_itemToDropByEnemyGroup = ExtResource("2_lxs0o")
itemBeetrootToEatForHealth = ExtResource("3_008v8")
@@ -14,9 +14,5 @@ position = Vector2(23, -96)
scale = Vector2(0.547474, 0.547474) scale = Vector2(0.547474, 0.547474)
texture = SubResource("AtlasTexture_ane0o") texture = SubResource("AtlasTexture_ane0o")
[node name="CollisionShape2D" parent="TargetSelection/Click" index="0"]
position = Vector2(25.215, -195)
scale = Vector2(0.72370636, 1)
[node name="Sprite2D" parent="TargetSelection/HoverIndicator" index="0"] [node name="Sprite2D" parent="TargetSelection/HoverIndicator" index="0"]
position = Vector2(0.84, -126) position = Vector2(1, -126)
+13 -5
View File
@@ -1,12 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://pflu0uaig7vv"] [gd_scene load_steps=4 format=3 uid="uid://pflu0uaig7vv"]
[ext_resource type="Script" uid="uid://ccc6m6c5khd2x" path="res://scripts/CSharp/Common/CharacterControls/DetectionCross.cs" id="1_va8tx"] [ext_resource type="Script" uid="uid://ccc6m6c5khd2x" path="res://scripts/CSharp/Common/CharacterControls/DetectionCross.cs" id="1_va8tx"]
[ext_resource type="PackedScene" uid="uid://dugr6ff1g7hi0" path="res://prefabs/interactions/detector.tscn" id="2_8hh05"] [ext_resource type="PackedScene" uid="uid://dugr6ff1g7hi0" path="res://prefabs/interactions/detector.tscn" id="2_8hh05"]
[ext_resource type="Script" uid="uid://b4n0nlu4ckqga" path="res://scripts/CSharp/Common/CharacterControls/RaycastDetector.cs" id="2_va8tx"]
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_detector")] [node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_collider", "_detector")]
script = ExtResource("1_va8tx") script = ExtResource("1_va8tx")
_detector = NodePath("detector") _collider = NodePath("detector")
_xOffset = 400.0 _detector = NodePath("Raycast")
_yOffset = 300.0 _xOffset = 200.0
_yOffset = 200.0
[node name="Raycast" type="RayCast2D" parent="."]
top_level = true
target_position = Vector2(257, -149)
collide_with_areas = true
script = ExtResource("2_va8tx")
[node name="detector" parent="." instance=ExtResource("2_8hh05")] [node name="detector" parent="." instance=ExtResource("2_8hh05")]
+3 -3
View File
@@ -2,13 +2,13 @@
[ext_resource type="Script" uid="uid://c3pd60biootsx" path="res://scripts/CSharp/Common/CharacterControls/Detector.cs" id="1_6pib0"] [ext_resource type="Script" uid="uid://c3pd60biootsx" path="res://scripts/CSharp/Common/CharacterControls/Detector.cs" id="1_6pib0"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qwv4c"] [sub_resource type="CircleShape2D" id="CircleShape2D_6pib0"]
size = Vector2(100, 400) radius = 200.0
[node name="detector" type="Area2D"] [node name="detector" type="Area2D"]
collision_layer = 4 collision_layer = 4
script = ExtResource("1_6pib0") script = ExtResource("1_6pib0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_qwv4c") shape = SubResource("CircleShape2D_6pib0")
debug_color = Color(0.9459047, 7.2196126e-06, 0.5925879, 0.41960785) debug_color = Color(0.9459047, 7.2196126e-06, 0.5925879, 0.41960785)
@@ -1,6 +1,7 @@
[gd_scene load_steps=6 format=3 uid="uid://cqc72e4hq6bcd"] [gd_scene load_steps=7 format=3 uid="uid://cqc72e4hq6bcd"]
[ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_5ajrf"] [ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_5ajrf"]
[ext_resource type="Resource" uid="uid://clwqh3w5aqi5e" path="res://resources/low code/interactables/var_interactableToTrigger.tres" id="2_o1drf"]
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/simple_interactable_outline.tres" id="2_qoey7"] [ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/simple_interactable_outline.tres" id="2_qoey7"]
[ext_resource type="Script" uid="uid://cp2q4k62sjo6h" path="res://scripts/CSharp/Common/CharacterControls/DetectableInteractionArea.cs" id="3_2wrrq"] [ext_resource type="Script" uid="uid://cp2q4k62sjo6h" path="res://scripts/CSharp/Common/CharacterControls/DetectableInteractionArea.cs" id="3_2wrrq"]
@@ -13,13 +14,15 @@ default_font_size = 30
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")] [node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")]
script = ExtResource("1_5ajrf") script = ExtResource("1_5ajrf")
_interactableToTrigger = ExtResource("2_o1drf")
_area = NodePath("Area2D") _area = NodePath("Area2D")
_label = NodePath("Area2D/CanvasLayer/MarginContainer/Label") _label = NodePath("Area2D/CanvasLayer/MarginContainer/Label")
_outlineMaterial = ExtResource("2_qoey7") _outlineMaterial = ExtResource("2_qoey7")
[node name="Area2D" type="Area2D" parent="."] [node name="Area2D" type="Area2D" parent="." node_paths=PackedStringArray("interactionArea2D")]
collision_mask = 4 collision_mask = 4
script = ExtResource("3_2wrrq") script = ExtResource("3_2wrrq")
interactionArea2D = NodePath("..")
[node name="CollisionShape3D" type="CollisionShape2D" parent="Area2D"] [node name="CollisionShape3D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_npluf") shape = SubResource("CircleShape2D_npluf")
+4 -5
View File
@@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="Babushka" config/name="Babushka"
run/main_scene="uid://66pmq4efjip8" run/main_scene="uid://bopv10dqm1knc"
config/features=PackedStringArray("4.5", "C#", "Forward Plus") config/features=PackedStringArray("4.5", "C#", "Forward Plus")
run/max_fps=120 run/max_fps=120
boot_splash/fullsize=false boot_splash/fullsize=false
@@ -176,6 +176,7 @@ directories/tres_directory={
"unselected_stylebox": "res://addons/dialogic/Editor/Events/styles/unselected_stylebox.tres", "unselected_stylebox": "res://addons/dialogic/Editor/Events/styles/unselected_stylebox.tres",
"var_ColorTestValue": "res://resources/low code/test/var_ColorTestValue.tres", "var_ColorTestValue": "res://resources/low code/test/var_ColorTestValue.tres",
"var_Counter": "res://resources/low code/test/var_Counter.tres", "var_Counter": "res://resources/low code/test/var_Counter.tres",
"var_interactableToTrigger": "res://resources/low code/interactables/var_interactableToTrigger.tres",
"var_sceneNameProvider": "res://resources/low code/farming/var_sceneNameProvider.tres", "var_sceneNameProvider": "res://resources/low code/farming/var_sceneNameProvider.tres",
"var_wateredFieldPosition": "res://resources/low code/farming/var_wateredFieldPosition.tres", "var_wateredFieldPosition": "res://resources/low code/farming/var_wateredFieldPosition.tres",
"vesna_style": "res://addons/dialogic/vesna_style.tres", "vesna_style": "res://addons/dialogic/vesna_style.tres",
@@ -186,10 +187,8 @@ directories/tres_directory={
[display] [display]
window/size/viewport_width=1920 window/size/viewport_width=1980
window/size/viewport_height=1080 window/size/viewport_height=1020
window/size/window_width_override=1200
window/size/window_height_override=720
window/stretch/mode="viewport" window/stretch/mode="viewport"
window/stretch/aspect="keep_height" window/stretch/aspect="keep_height"
@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="VariableResource" load_steps=2 format=3 uid="uid://clwqh3w5aqi5e"]
[ext_resource type="Script" uid="uid://dtvx2cakx0bey" path="res://scripts/CSharp/Low Code/Variables/VariableResource.cs" id="1_casar"]
[resource]
script = ExtResource("1_casar")
Payload = null
metadata/_custom_type_script = "uid://dtvx2cakx0bey"
+401 -42
View File
@@ -21,6 +21,7 @@
[ext_resource type="Texture2D" uid="uid://dldk8n51ag8fh" path="res://art/nature/baum märz 2025/backtreebois team brandon.png" id="13_d53cn"] [ext_resource type="Texture2D" uid="uid://dldk8n51ag8fh" path="res://art/nature/baum märz 2025/backtreebois team brandon.png" id="13_d53cn"]
[ext_resource type="Shader" uid="uid://xnky830dtfsn" path="res://shader/repeat_texture.gdshader" id="13_kt1wx"] [ext_resource type="Shader" uid="uid://xnky830dtfsn" path="res://shader/repeat_texture.gdshader" id="13_kt1wx"]
[ext_resource type="Texture2D" uid="uid://bmjjfd5ngptxe" path="res://art/nature/baum märz 2025/backtreebois team kennedy.png" id="14_1uen0"] [ext_resource type="Texture2D" uid="uid://bmjjfd5ngptxe" path="res://art/nature/baum märz 2025/backtreebois team kennedy.png" id="14_1uen0"]
[ext_resource type="Texture2D" uid="uid://dv2jepy2el544" path="res://art/mockups/Kenney_Backgrounds/PNG/Flat/tree11.png" id="14_d53cn"]
[ext_resource type="Texture2D" uid="uid://451bkvxcxab7" path="res://art/nature/baum märz 2025/gräser und büsche.png" id="14_mrwmr"] [ext_resource type="Texture2D" uid="uid://451bkvxcxab7" path="res://art/nature/baum märz 2025/gräser und büsche.png" id="14_mrwmr"]
[ext_resource type="Texture2D" uid="uid://btea6eyucsyxj" path="res://art/farm/farming/farmobjekte/zaun/tilable fence middle part.png" id="20_if5vh"] [ext_resource type="Texture2D" uid="uid://btea6eyucsyxj" path="res://art/farm/farming/farmobjekte/zaun/tilable fence middle part.png" id="20_if5vh"]
[ext_resource type="Texture2D" uid="uid://3ed3dgq3irn2" path="res://art/farm/farming/farmobjekte/zaun/tilable fence end part2.png" id="21_if5vh"] [ext_resource type="Texture2D" uid="uid://3ed3dgq3irn2" path="res://art/farm/farming/farmobjekte/zaun/tilable fence end part2.png" id="21_if5vh"]
@@ -37,7 +38,6 @@
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="35_64mdn"] [ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="35_64mdn"]
[ext_resource type="Texture2D" uid="uid://65e44yde224q" path="res://art/farm/Babushka_house_01.png" id="36_e5b7x"] [ext_resource type="Texture2D" uid="uid://65e44yde224q" path="res://art/farm/Babushka_house_01.png" id="36_e5b7x"]
[ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="36_fv1t2"] [ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="36_fv1t2"]
[ext_resource type="Resource" uid="uid://0mnsr4anoaiq" path="res://resources/items/beet.tres" id="36_q1g8e"]
[ext_resource type="AudioStream" uid="uid://cfqg50am0swb7" path="res://audio/Music/Farming_90BPM_69Bars_Loop.wav" id="37_8ey8m"] [ext_resource type="AudioStream" uid="uid://cfqg50am0swb7" path="res://audio/Music/Farming_90BPM_69Bars_Loop.wav" id="37_8ey8m"]
[ext_resource type="AudioStream" uid="uid://dku1rq5cocisg" path="res://audio/Music/Farming_90BPM_69Bars.wav" id="37_di1ed"] [ext_resource type="AudioStream" uid="uid://dku1rq5cocisg" path="res://audio/Music/Farming_90BPM_69Bars.wav" id="37_di1ed"]
[ext_resource type="Shader" uid="uid://braevmqauoek7" path="res://shader/swaying_plant.gdshader" id="37_taxvr"] [ext_resource type="Shader" uid="uid://braevmqauoek7" path="res://shader/swaying_plant.gdshader" id="37_taxvr"]
@@ -90,13 +90,13 @@ shader_parameter/value_mult = 1.0
shader_parameter/brightness_add = 0.0 shader_parameter/brightness_add = 0.0
shader_parameter/contrast_mult = 1.0 shader_parameter/contrast_mult = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_065st"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_w1kgo"]
shader = ExtResource("13_7p0hq") shader = ExtResource("13_7p0hq")
shader_parameter/hue_shift = -0.18299996119249995 shader_parameter/hue_shift = -0.17599996086000003
shader_parameter/saturation_mult = 0.8530000405175 shader_parameter/saturation_mult = 0.73600003496
shader_parameter/value_mult = 1.0 shader_parameter/value_mult = 0.8490000403275
shader_parameter/brightness_add = 4.7499999933364734e-08 shader_parameter/brightness_add = 0.038000049304999894
shader_parameter/contrast_mult = 0.9630000457425 shader_parameter/contrast_mult = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8ey8m"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_8ey8m"]
shader = ExtResource("13_7p0hq") shader = ExtResource("13_7p0hq")
@@ -279,7 +279,7 @@ metadata/_custom_type_script = "uid://be54lnb6gg81f"
[node name="BabushkaSceneFarmOutside2d" type="Node2D"] [node name="BabushkaSceneFarmOutside2d" type="Node2D"]
script = ExtResource("34_e5b7x") script = ExtResource("34_e5b7x")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_common_room.tscn", "res://scenes/Babushka_scene_outside_beets.tscn") _sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_kitchen.tscn", "res://scenes/Babushka_scene_outside_beets.tscn")
[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("_followNode")] [node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("_followNode")]
position = Vector2(3180, 1961) position = Vector2(3180, 1961)
@@ -367,13 +367,13 @@ centered = false
offset = Vector2(0, -100) offset = Vector2(0, -100)
[node name="background layer 3" type="ParallaxLayer" parent="ParallaxBackground"] [node name="background layer 3" type="ParallaxLayer" parent="ParallaxBackground"]
visible = false
z_index = -250 z_index = -250
position = Vector2(18, -713) position = Vector2(18, -713)
motion_scale = Vector2(0.25, 0.25) motion_scale = Vector2(0.25, 0.25)
motion_mirroring = Vector2(5424, 0) motion_mirroring = Vector2(5424, 0)
[node name="Kenney assets" type="Node2D" parent="ParallaxBackground/background layer 3"] [node name="Kenney assets" type="Node2D" parent="ParallaxBackground/background layer 3"]
modulate = Color(0.56078434, 0.89411765, 0.8235294, 1)
position = Vector2(0, -39) position = Vector2(0, -39)
scale = Vector2(1.2, 1.2) scale = Vector2(1.2, 1.2)
@@ -491,6 +491,119 @@ position = Vector2(0, -82)
motion_scale = Vector2(0.5, 0.5) motion_scale = Vector2(0.5, 0.5)
motion_mirroring = Vector2(10480, 0) motion_mirroring = Vector2(10480, 0)
[node name="Kenney Assets" type="Node2D" parent="ParallaxBackground/background layer 4"]
visible = false
[node name="hills" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.525643, 0.556909, 0.560815, 1)
position = Vector2(0, 1420)
scale = Vector2(4, 4)
texture = ExtResource("7_sbyqw")
centered = false
offset = Vector2(-200, -80)
[node name="hills 1" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.525643, 0.556909, 0.560815, 1)
position = Vector2(3999, 1420)
scale = Vector2(4, 4)
texture = ExtResource("8_kt1wx")
centered = false
offset = Vector2(-200, -80)
[node name="tree" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(128, 784)
scale = Vector2(5.11066, 3.99823)
texture = ExtResource("14_d53cn")
[node name="tree2" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(976, 952)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree9" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(1160, 976)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree3" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(1368, 800)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree4" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(2328, 880)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree5" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(3112, 944)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree6" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(4248, 960)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree10" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(5376, 848)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree11" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(5624, 976)
scale = Vector2(2.93619, 1.96107)
texture = ExtResource("14_d53cn")
[node name="tree12" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(5856.97, 753.531)
scale = Vector2(3.3702, 3.05266)
texture = ExtResource("14_d53cn")
[node name="tree13" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(6888, 912)
scale = Vector2(3.3702, 3.05266)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree14" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(7088.48, 752.766)
scale = Vector2(3.69909, 3.46732)
texture = ExtResource("14_d53cn")
[node name="tree15" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(7224, 888)
scale = Vector2(3.1922, 3.25497)
texture = ExtResource("14_d53cn")
[node name="tree7" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(4392, 1152)
scale = Vector2(2.55123, 1.88928)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree8" type="Sprite2D" parent="ParallaxBackground/background layer 4/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(2944, 992)
scale = Vector2(3.008, 2.76803)
texture = ExtResource("14_d53cn")
[node name="JelenaMockupBg02" type="Sprite2D" parent="ParallaxBackground/background layer 4"] [node name="JelenaMockupBg02" type="Sprite2D" parent="ParallaxBackground/background layer 4"]
z_index = -200 z_index = -200
material = SubResource("ShaderMaterial_wtdui") material = SubResource("ShaderMaterial_wtdui")
@@ -506,27 +619,298 @@ scale = Vector2(2.75, 2.75)
texture = ExtResource("13_0qu0h") texture = ExtResource("13_0qu0h")
[node name="background layer 5" type="ParallaxLayer" parent="ParallaxBackground"] [node name="background layer 5" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -200 z_index = -190
position = Vector2(0, -82) position = Vector2(8685, -127)
scale = Vector2(-1, 1)
motion_scale = Vector2(0.5, 0.5) motion_scale = Vector2(0.5, 0.5)
motion_offset = Vector2(1000, 0)
motion_mirroring = Vector2(10480, 0) motion_mirroring = Vector2(10480, 0)
[node name="Kenney Assets" type="Node2D" parent="ParallaxBackground/background layer 5"]
visible = false
[node name="hills" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.525643, 0.556909, 0.560815, 1)
position = Vector2(0, 1420)
scale = Vector2(4, 4)
texture = ExtResource("7_sbyqw")
centered = false
offset = Vector2(-200, -80)
[node name="hills 1" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.525643, 0.556909, 0.560815, 1)
position = Vector2(3999, 1420)
scale = Vector2(4, 4)
texture = ExtResource("8_kt1wx")
centered = false
offset = Vector2(-200, -80)
[node name="tree" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(128, 784)
scale = Vector2(5.11066, 3.99823)
texture = ExtResource("14_d53cn")
[node name="tree2" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(976, 952)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree9" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(1160, 976)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree3" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(1368, 800)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree4" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(2328, 880)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree5" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(3112, 944)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree6" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(4248, 960)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
[node name="tree10" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(5376, 848)
scale = Vector2(3.7465, 2.76803)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree11" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(5624, 976)
scale = Vector2(2.93619, 1.96107)
texture = ExtResource("14_d53cn")
[node name="tree12" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(5856.97, 753.531)
scale = Vector2(3.3702, 3.05266)
texture = ExtResource("14_d53cn")
[node name="tree13" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(6888, 912)
scale = Vector2(3.3702, 3.05266)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree14" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(7088.48, 752.766)
scale = Vector2(3.69909, 3.46732)
texture = ExtResource("14_d53cn")
[node name="tree15" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(7224, 888)
scale = Vector2(3.1922, 3.25497)
texture = ExtResource("14_d53cn")
[node name="tree7" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(4392, 1152)
scale = Vector2(2.55123, 1.88928)
texture = ExtResource("14_d53cn")
flip_h = true
[node name="tree8" type="Sprite2D" parent="ParallaxBackground/background layer 5/Kenney Assets"]
modulate = Color(0.431357, 0.282353, 0.415717, 1)
position = Vector2(2944, 992)
scale = Vector2(3.008, 2.76803)
texture = ExtResource("14_d53cn")
[node name="JelenaMockupBg02" type="Sprite2D" parent="ParallaxBackground/background layer 5"] [node name="JelenaMockupBg02" type="Sprite2D" parent="ParallaxBackground/background layer 5"]
z_index = -200 z_index = -200
material = SubResource("ShaderMaterial_065st") material = SubResource("ShaderMaterial_w1kgo")
position = Vector2(2668, 726) position = Vector2(2668, 726)
scale = Vector2(2.75, 2.75) scale = Vector2(2.75, 2.75)
texture = ExtResource("13_0qu0h") texture = ExtResource("13_0qu0h")
flip_h = true
[node name="JelenaMockupBg03" type="Sprite2D" parent="ParallaxBackground/background layer 5"] [node name="JelenaMockupBg03" type="Sprite2D" parent="ParallaxBackground/background layer 5"]
z_index = -200 z_index = -200
material = SubResource("ShaderMaterial_065st") material = SubResource("ShaderMaterial_w1kgo")
position = Vector2(7923, 727) position = Vector2(7923, 727)
scale = Vector2(2.75, 2.75) scale = Vector2(2.75, 2.75)
texture = ExtResource("13_0qu0h") texture = ExtResource("13_0qu0h")
[node name="back back trees layer2" type="ParallaxLayer" parent="ParallaxBackground"]
modulate = Color(0.5019608, 0.8509804, 0.6627451, 1)
z_index = -160
position = Vector2(17801, -387)
rotation = -3.1415927
scale = Vector2(1, -1)
motion_scale = Vector2(0.5, 0.6)
motion_mirroring = Vector2(9965, 0)
[node name="hills" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
modulate = Color(0.345703, 0.360648, 0.242876, 1)
position = Vector2(993, 1576)
scale = Vector2(5, 5)
texture = ExtResource("7_sbyqw")
centered = false
offset = Vector2(-200, -80)
[node name="hills 1" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
modulate = Color(0.345703, 0.360648, 0.242876, 1)
position = Vector2(5961, 1582)
scale = Vector2(5, 5)
texture = ExtResource("8_kt1wx")
centered = false
offset = Vector2(-200, -80)
[node name="tree" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(3017.3, 536.15)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(770, 3, 304, 979)
[node name="tree2" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(1807.5, 1408)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(399, 420, 228, 493)
[node name="tree4" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(3321.3, 600.15)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(1770, -4, 289, 930)
[node name="tree11" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(460, 622)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(1770, -4, 289, 930)
[node name="tree5" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(5081.3, 696.15)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(2283, 2, 186, 840)
[node name="tree10" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(8470, 694)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(2283, 2, 186, 840)
[node name="tree3" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(6596.8, 1566.35)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(399, 420, 228, 493)
[node name="tree8" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(8110.6, 758.5)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(1770, -4, 289, 930)
[node name="tree9" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(10240, 850)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(2283, 2, 186, 840)
[node name="tree6" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(5641.3, 1168.15)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(2609, 434, 304, 467)
[node name="tree7" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(5161.3, 608.15)
scale = Vector2(1.7, 1.7)
texture = ExtResource("13_1uen0")
region_enabled = true
region_rect = Rect2(3111, -4, 167, 949)
[node name="bush" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(3239.5, 1288)
texture = ExtResource("14_mrwmr")
region_enabled = true
region_rect = Rect2(149, 15, 464, 478)
[node name="bush2" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(1791.5, 1448)
texture = ExtResource("14_mrwmr")
flip_h = true flip_h = true
region_enabled = true
region_rect = Rect2(130, 0, 201, 278)
[node name="bush3" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(1255.5, 1392)
texture = ExtResource("14_mrwmr")
flip_h = true
region_enabled = true
region_rect = Rect2(0, 604, 248, 228)
[node name="bush4" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(5471.5, 1432)
texture = ExtResource("14_mrwmr")
flip_h = true
region_enabled = true
region_rect = Rect2(1837, 651, 139, 180)
[node name="bush5" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(5007.5, 1312)
texture = ExtResource("14_mrwmr")
region_enabled = true
region_rect = Rect2(1368, 673, 186, 136)
[node name="bush6" type="Sprite2D" parent="ParallaxBackground/back back trees layer2"]
material = SubResource("ShaderMaterial_8ey8m")
position = Vector2(3583.5, 1248)
scale = Vector2(0.575, 0.575)
texture = ExtResource("14_mrwmr")
flip_h = true
region_enabled = true
region_rect = Rect2(358, 523, 345, 289)
[node name="back back trees layer" type="ParallaxLayer" parent="ParallaxBackground"] [node name="back back trees layer" type="ParallaxLayer" parent="ParallaxBackground"]
z_index = -150 z_index = -150
@@ -803,16 +1187,12 @@ z_index = -50
motion_mirroring = Vector2(3779, 0) motion_mirroring = Vector2(3779, 0)
[node name="Sonnenblumeseamless" type="Sprite2D" parent="ParallaxBackground/sunflower field"] [node name="Sonnenblumeseamless" type="Sprite2D" parent="ParallaxBackground/sunflower field"]
modulate = Color(1, 1, 1, 0.7921569) position = Vector2(1892, 1863)
position = Vector2(0, 1863)
texture = ExtResource("23_d77e7") texture = ExtResource("23_d77e7")
offset = Vector2(1892, 0)
[node name="Sonnenblumeseamless2" type="Sprite2D" parent="ParallaxBackground/sunflower field"] [node name="Sonnenblumeseamless2" type="Sprite2D" parent="ParallaxBackground/sunflower field"]
modulate = Color(1, 1, 1, 0.7921569) position = Vector2(9411, 1863)
position = Vector2(0, 1863)
texture = ExtResource("23_d77e7") texture = ExtResource("23_d77e7")
offset = Vector2(9450, 0)
[node name="ground layer" type="ParallaxLayer" parent="ParallaxBackground"] [node name="ground layer" type="ParallaxLayer" parent="ParallaxBackground"]
position = Vector2(80, 208) position = Vector2(80, 208)
@@ -1044,24 +1424,6 @@ shape = SubResource("CircleShape2D_tm0yg")
[node name="Icon" parent="YSorted/SeedPickup" index="4"] [node name="Icon" parent="YSorted/SeedPickup" index="4"]
scale = Vector2(1, 1) scale = Vector2(1, 1)
[node name="BeetPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
position = Vector2(5787, 2269)
_finiteSupply = 3
metadata/SaveID = "e1bbe13f-0622-42b8-97f3-87a8af369dc0"
[node name="SpawnWithItem" parent="YSorted/BeetPickup" index="0"]
_blueprint = ExtResource("36_q1g8e")
[node name="PickupInteractionArea" parent="YSorted/BeetPickup" index="3" node_paths=PackedStringArray("_spritesToOutline")]
_spritesToOutline = [NodePath("../../SeedPickup/Icon")]
metadata/SaveID = "ad152c51-3631-42c1-9aa4-4df896b35d8c"
[node name="CollisionShape3D" parent="YSorted/BeetPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_tm0yg")
[node name="Icon" parent="YSorted/BeetPickup" index="4"]
scale = Vector2(1, 1)
[node name="SeedPickup2" parent="YSorted" instance=ExtResource("25_hukxv")] [node name="SeedPickup2" parent="YSorted" instance=ExtResource("25_hukxv")]
position = Vector2(10705, 2257) position = Vector2(10705, 2257)
_finiteSupply = 3 _finiteSupply = 3
@@ -2526,7 +2888,6 @@ script = ExtResource("80_w1kgo")
[connection signal="SuccessfulPickUp" from="YSorted/CanGenericPickup" to="YSorted/Vesna" method="HandlePickUp"] [connection signal="SuccessfulPickUp" from="YSorted/CanGenericPickup" to="YSorted/Vesna" method="HandlePickUp"]
[connection signal="SuccessfulPickUp" from="YSorted/RakeGenericPickup" to="YSorted/Vesna" method="HandlePickUp"] [connection signal="SuccessfulPickUp" from="YSorted/RakeGenericPickup" to="YSorted/Vesna" method="HandlePickUp"]
[connection signal="SuccessfulPickUp" from="YSorted/SeedPickup" to="YSorted/Vesna" method="HandlePickUp"] [connection signal="SuccessfulPickUp" from="YSorted/SeedPickup" to="YSorted/Vesna" method="HandlePickUp"]
[connection signal="SuccessfulPickUp" from="YSorted/BeetPickup" to="YSorted/Vesna" method="HandlePickUp"]
[connection signal="SuccessfulPickUp" from="YSorted/SeedPickup2" to="YSorted/Vesna" method="HandlePickUp"] [connection signal="SuccessfulPickUp" from="YSorted/SeedPickup2" to="YSorted/Vesna" method="HandlePickUp"]
[connection signal="InteractedTool" from="YSorted/Farm visuals/Static/EnterHouseInteraction" to="." method="LoadSceneAtIndex"] [connection signal="InteractedTool" from="YSorted/Farm visuals/Static/EnterHouseInteraction" to="." method="LoadSceneAtIndex"]
[connection signal="InteractedTool" from="YSorted/Blocker/InteractionArea" to="." method="LoadSceneAtIndex"] [connection signal="InteractedTool" from="YSorted/Blocker/InteractionArea" to="." method="LoadSceneAtIndex"]
@@ -2551,8 +2912,6 @@ script = ExtResource("80_w1kgo")
[editable path="YSorted/RakeGenericPickup/PickupInteractionArea"] [editable path="YSorted/RakeGenericPickup/PickupInteractionArea"]
[editable path="YSorted/SeedPickup"] [editable path="YSorted/SeedPickup"]
[editable path="YSorted/SeedPickup/PickupInteractionArea"] [editable path="YSorted/SeedPickup/PickupInteractionArea"]
[editable path="YSorted/BeetPickup"]
[editable path="YSorted/BeetPickup/PickupInteractionArea"]
[editable path="YSorted/SeedPickup2"] [editable path="YSorted/SeedPickup2"]
[editable path="YSorted/SeedPickup2/PickupInteractionArea"] [editable path="YSorted/SeedPickup2/PickupInteractionArea"]
[editable path="YSorted/Blocker/InteractionArea"] [editable path="YSorted/Blocker/InteractionArea"]
+3 -27
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://cjshlwk8ajpnp"] [gd_scene load_steps=14 format=3 uid="uid://cjshlwk8ajpnp"]
[ext_resource type="Script" uid="uid://cnhpnn8o0gybd" path="res://scripts/CSharp/Common/Fight/FightHappeningSceneSetup.cs" id="1_fiutj"] [ext_resource type="Script" uid="uid://cnhpnn8o0gybd" path="res://scripts/CSharp/Common/Fight/FightHappeningSceneSetup.cs" id="1_fiutj"]
[ext_resource type="Script" uid="uid://c76mhhqyk4lgh" path="res://scripts/CSharp/Common/Fight/FightHappening.cs" id="1_gsk03"] [ext_resource type="Script" uid="uid://c76mhhqyk4lgh" path="res://scripts/CSharp/Common/Fight/FightHappening.cs" id="1_gsk03"]
@@ -6,7 +6,6 @@
[ext_resource type="Script" uid="uid://dwsqst8fhhqlc" path="res://scripts/CSharp/Common/Fight/AllFightersVisual.cs" id="2_lu4y4"] [ext_resource type="Script" uid="uid://dwsqst8fhhqlc" path="res://scripts/CSharp/Common/Fight/AllFightersVisual.cs" id="2_lu4y4"]
[ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="2_phrlx"] [ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="2_phrlx"]
[ext_resource type="PackedScene" uid="uid://7jsxokx67gpq" path="res://prefabs/fight/fighterVisuals/vesna_fighter_visual.tscn" id="4_qo0gi"] [ext_resource type="PackedScene" uid="uid://7jsxokx67gpq" path="res://prefabs/fight/fighterVisuals/vesna_fighter_visual.tscn" id="4_qo0gi"]
[ext_resource type="Script" uid="uid://cdrjvgm82pxoj" path="res://scripts/CSharp/Common/Fight/FightHappeningAnimationContext.cs" id="4_v5rv6"]
[ext_resource type="PackedScene" uid="uid://0vm3jb1hnkkb" path="res://prefabs/fight/fighterVisuals/blob_fighter_visual.tscn" id="4_vp8s0"] [ext_resource type="PackedScene" uid="uid://0vm3jb1hnkkb" path="res://prefabs/fight/fighterVisuals/blob_fighter_visual.tscn" id="4_vp8s0"]
[ext_resource type="Script" uid="uid://buiwuf7pjfq8" path="res://scripts/CSharp/Common/Fight/FightHappeningStateReaction.cs" id="4_ydj1i"] [ext_resource type="Script" uid="uid://buiwuf7pjfq8" path="res://scripts/CSharp/Common/Fight/FightHappeningStateReaction.cs" id="4_ydj1i"]
[ext_resource type="PackedScene" uid="uid://bydwj3pbvqrhb" path="res://prefabs/minigame/minigame.tscn" id="8_2b3cf"] [ext_resource type="PackedScene" uid="uid://bydwj3pbvqrhb" path="res://prefabs/minigame/minigame.tscn" id="8_2b3cf"]
@@ -14,30 +13,20 @@
[ext_resource type="Script" uid="uid://bwm0nhvt1083k" path="res://scripts/CSharp/Common/Fight/FightMinigameHandler.cs" id="8_falfe"] [ext_resource type="Script" uid="uid://bwm0nhvt1083k" path="res://scripts/CSharp/Common/Fight/FightMinigameHandler.cs" id="8_falfe"]
[ext_resource type="Script" uid="uid://d2ugtb3dalrg3" path="res://scripts/CSharp/Common/Fight/FightHappeningStateDebugger.cs" id="8_tv7cl"] [ext_resource type="Script" uid="uid://d2ugtb3dalrg3" path="res://scripts/CSharp/Common/Fight/FightHappeningStateDebugger.cs" id="8_tv7cl"]
[ext_resource type="Script" uid="uid://2f7rqk50gtdg" path="res://scripts/CSharp/Common/Fight/SwitchSceneOnFightEnd.cs" id="10_qqd8u"] [ext_resource type="Script" uid="uid://2f7rqk50gtdg" path="res://scripts/CSharp/Common/Fight/SwitchSceneOnFightEnd.cs" id="10_qqd8u"]
[ext_resource type="Script" uid="uid://6nniwfxye8ss" path="res://scripts/CSharp/Common/Fight/UsedItemIndicatorVisual.cs" id="14_b4ll5"]
[ext_resource type="Script" uid="uid://71mdwp2m4rta" path="res://scripts/CSharp/Common/Fight/UI/HealButtonVisual.cs" id="14_oy2wu"]
[ext_resource type="Resource" uid="uid://0mnsr4anoaiq" path="res://resources/items/beet.tres" id="15_k4fcr"]
[ext_resource type="PackedScene" uid="uid://l1hdihubffeg" path="res://prefabs/fight/damage_flying_nuber.tscn" id="15_oy2wu"]
[ext_resource type="Texture2D" uid="uid://djewfwrdt4iv3" path="res://art/ui/UI/icons/icon-fruit-beetroot.png" id="16_k4fcr"]
[node name="BabushkaSceneFightHappening" type="Node2D"] [node name="BabushkaSceneFightHappening" type="Node2D"]
[node name="FightHappening" type="Node" parent="."] [node name="FightHappening" type="Node" parent="."]
script = ExtResource("1_gsk03") script = ExtResource("1_gsk03")
[node name="ActionAnimationController" type="Node" parent="." node_paths=PackedStringArray("_allFightersVisual", "_animationContext")] [node name="ActionAnimationController" type="Node" parent="." node_paths=PackedStringArray("_allFightersVisual")]
script = ExtResource("2_7kjgs") script = ExtResource("2_7kjgs")
_allFightersVisual = NodePath("../FightVisuals") _allFightersVisual = NodePath("../FightVisuals")
_animationContext = NodePath("AnimationContext")
[node name="StateReactionActionAnimation" type="Node" parent="ActionAnimationController"] [node name="StateReactionActionAnimation" type="Node" parent="ActionAnimationController"]
script = ExtResource("4_ydj1i") script = ExtResource("4_ydj1i")
_fightState = 10 _fightState = 10
[node name="AnimationContext" type="Node" parent="ActionAnimationController" node_paths=PackedStringArray("useHealItemIndicator")]
script = ExtResource("4_v5rv6")
useHealItemIndicator = NodePath("../../UseItemIndicator")
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
[node name="FightSetup" type="Node2D" parent="."] [node name="FightSetup" type="Node2D" parent="."]
@@ -157,12 +146,7 @@ theme_override_constants/margin_bottom = 10
[node name="Talk Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3"] [node name="Talk Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3"]
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 41 theme_override_font_sizes/font_size = 41
text = "x19 - Heal" text = "Talk"
icon = ExtResource("16_k4fcr")
alignment = 0
expand_icon = true
script = ExtResource("14_oy2wu")
_healItemBlueprint = ExtResource("15_k4fcr")
[node name="MarginContainer4" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"] [node name="MarginContainer4" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2 layout_mode = 2
@@ -184,7 +168,6 @@ theme_override_constants/margin_left = 200
theme_override_constants/margin_right = 200 theme_override_constants/margin_right = 200
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"] [node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"]
visible = false
layout_mode = 2 layout_mode = 2
theme_override_constants/margin_left = 10 theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10 theme_override_constants/margin_top = 10
@@ -223,12 +206,6 @@ offset_right = 794.0
offset_bottom = -472.0 offset_bottom = -472.0
text = "Hello world" text = "Hello world"
[node name="UseItemIndicator" type="Node2D" parent="."]
position = Vector2(214, 319)
script = ExtResource("14_b4ll5")
_flyingIndicatorPrefab = ExtResource("15_oy2wu")
_itemTexture = ExtResource("16_k4fcr")
[connection signal="SignalTransitionState" from="FightHappening" to="ActionAnimationController/StateReactionActionAnimation" method="FightHappeningStateTransitioned"] [connection signal="SignalTransitionState" from="FightHappening" to="ActionAnimationController/StateReactionActionAnimation" method="FightHappeningStateTransitioned"]
[connection signal="SignalTransitionState" from="FightHappening" to="FightVisuals" method="FightHappeningStateChange"] [connection signal="SignalTransitionState" from="FightHappening" to="FightVisuals" method="FightHappeningStateChange"]
[connection signal="SignalTransitionState" from="FightHappening" to="ActionSelect/StateReactionInputActionSelect" method="FightHappeningStateTransitioned"] [connection signal="SignalTransitionState" from="FightHappening" to="ActionSelect/StateReactionInputActionSelect" method="FightHappeningStateTransitioned"]
@@ -243,5 +220,4 @@ _itemTexture = ExtResource("16_k4fcr")
[connection signal="pressed" from="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer4/Flee Button" to="ActionSelect" method="SelectAction" binds= [4]] [connection signal="pressed" from="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer4/Flee Button" to="ActionSelect" method="SelectAction" binds= [4]]
[connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="show"] [connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="show"]
[connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="StateEntered"] [connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="StateEntered"]
[connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3/Talk Button" method="UpdateText"]
[connection signal="OnStateExited" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="hide"] [connection signal="OnStateExited" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="hide"]
+35 -36
View File
@@ -40,14 +40,13 @@
[ext_resource type="Script" uid="uid://dbu8afaiohpdh" path="res://scripts/CSharp/Common/Fight/FightRoomSceneSetup.cs" id="40_cvg1r"] [ext_resource type="Script" uid="uid://dbu8afaiohpdh" path="res://scripts/CSharp/Common/Fight/FightRoomSceneSetup.cs" id="40_cvg1r"]
[ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="40_elhbh"] [ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="40_elhbh"]
[ext_resource type="PackedScene" uid="uid://qfdiudt3vpai" path="res://prefabs/fight/roaming_enemy_group.tscn" id="41_cvg1r"] [ext_resource type="PackedScene" uid="uid://qfdiudt3vpai" path="res://prefabs/fight/roaming_enemy_group.tscn" id="41_cvg1r"]
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="41_x3yi1"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ruj2u"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_ruj2u"]
shader = ExtResource("16_0fard") shader = ExtResource("16_0fard")
shader_parameter/hue_shift = 0.0 shader_parameter/hue_shift = 0.0
shader_parameter/saturation_mult = 0.603 shader_parameter/saturation_mult = 0.603
shader_parameter/value_mult = 1.0 shader_parameter/value_mult = 1.0
shader_parameter/brightness_add = -0.4369999732574999 shader_parameter/brightness_add = -0.43699997325749995
shader_parameter/contrast_mult = 1.138000054055 shader_parameter/contrast_mult = 1.138000054055
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q1iw4"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_q1iw4"]
@@ -779,6 +778,7 @@ region_enabled = true
region_rect = Rect2(0, 0, 1405.76, 1244) region_rect = Rect2(0, 0, 1405.76, 1244)
[node name="YSorted" type="Node2D" parent="."] [node name="YSorted" type="Node2D" parent="."]
z_index = 1
y_sort_enabled = true y_sort_enabled = true
[node name="Vesna" parent="YSorted" instance=ExtResource("24_ffcio")] [node name="Vesna" parent="YSorted" instance=ExtResource("24_ffcio")]
@@ -881,9 +881,10 @@ region_rect = Rect2(1699, 76, 280, 230)
[node name="bush4" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/left side"] [node name="bush4" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/left side"]
modulate = Color(0.8428, 0.8771, 0.98, 1) modulate = Color(0.8428, 0.8771, 0.98, 1)
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(16912, 1803) position = Vector2(16878, 2099)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(0, 604, 248, 228) region_rect = Rect2(0, 604, 248, 228)
@@ -1078,9 +1079,10 @@ position = Vector2(13188, 30)
[node name="bush" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(4383, 1691) position = Vector2(4360, 2049)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(0, -237)
region_enabled = true region_enabled = true
region_rect = Rect2(130, 0, 201, 278) region_rect = Rect2(130, 0, 201, 278)
@@ -1108,10 +1110,10 @@ region_rect = Rect2(130, 0, 201, 278)
[node name="bush7" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush7" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(5060, 1855) position = Vector2(5051, 2217)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-4.5, -56) offset = Vector2(0, -237)
region_enabled = true region_enabled = true
region_rect = Rect2(1368, 673, 186, 136) region_rect = Rect2(1368, 673, 186, 136)
@@ -1119,20 +1121,20 @@ region_rect = Rect2(1368, 673, 186, 136)
modulate = Color(0.8428, 0.8771, 0.98, 1) modulate = Color(0.8428, 0.8771, 0.98, 1)
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(4015, 1894) position = Vector2(4008, 2250)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-3.5, -59) offset = Vector2(0, -237)
region_enabled = true region_enabled = true
region_rect = Rect2(1368, 673, 186, 136) region_rect = Rect2(1368, 673, 186, 136)
[node name="bush9" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush9" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(5324.6553, 1847.6593) position = Vector2(5325, 2263)
scale = Vector2(-1.86739, 2.34145) scale = Vector2(-1.86739, 2.34145)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-0.18457031, -59.61389) offset = Vector2(0, -237)
region_enabled = true region_enabled = true
region_rect = Rect2(1368, 673, 186, 136) region_rect = Rect2(1368, 673, 186, 136)
@@ -1150,20 +1152,20 @@ region_rect = Rect2(1699, 76, 280, 230)
[node name="bush4" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush4" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(7369, 1881) position = Vector2(7361, 2026)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-4, -99.5) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(0, 604, 248, 228) region_rect = Rect2(0, 604, 248, 228)
[node name="bush10" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush10" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(7747, 1840) position = Vector2(7757, 2032)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(5, -76) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1837, 651, 139, 180) region_rect = Rect2(1837, 651, 139, 180)
@@ -1192,20 +1194,20 @@ region_rect = Rect2(1837, 651, 139, 180)
[node name="bush11" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush11" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(9010, 1845) position = Vector2(8981, 2112)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-14.5, -38.5) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1464, 419, 144, 115) region_rect = Rect2(1464, 419, 144, 115)
[node name="bush12" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush12" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(9267, 1881) position = Vector2(9208, 2026)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-29.5, -99.5) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1699, 76, 280, 230) region_rect = Rect2(1699, 76, 280, 230)
@@ -1247,39 +1249,40 @@ region_rect = Rect2(130, 0, 201, 278)
modulate = Color(0.8428, 0.8771, 0.98, 1) modulate = Color(0.8428, 0.8771, 0.98, 1)
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(3343, 1522.0002) position = Vector2(3348, 2074)
scale = Vector2(-2.40318, 3.59175) scale = Vector2(-2.40318, 3.59175)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(130, 0, 201, 278) region_rect = Rect2(130, 0, 201, 278)
[node name="bush17" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush17" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(9542.094, 1883.9717) position = Vector2(9556, 2071)
scale = Vector2(-2.40318, 3.59175) scale = Vector2(-2.40318, 3.59175)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-5.786621, -119.928345) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(130, 0, 201, 278) region_rect = Rect2(130, 0, 201, 278)
[node name="bush18" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush18" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(9879.163, 1914.8691) position = Vector2(9887, 2216)
scale = Vector2(-1.87764, 2.59175) scale = Vector2(-1.87764, 2.59175)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-4.173828, -55.811768) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1368, 673, 186, 136) region_rect = Rect2(1368, 673, 186, 136)
[node name="bush19" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush19" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(10073, 1998) position = Vector2(10074, 2216)
scale = Vector2(1.53273, 1.82378) scale = Vector2(1.53273, 1.82378)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(0.65234375, -52.468018) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1368, 673, 186, 136) region_rect = Rect2(1368, 673, 186, 136)
@@ -1327,10 +1330,10 @@ region_rect = Rect2(1368, 673, 186, 136)
[node name="bush26" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"] [node name="bush26" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/right side"]
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(10960.999, 3436) position = Vector2(10963, 3651)
scale = Vector2(1.41694, 1.75208) scale = Vector2(1.41694, 1.75208)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(1.4121094, -49.288696) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1368, 673, 186, 136) region_rect = Rect2(1368, 673, 186, 136)
@@ -1349,10 +1352,10 @@ region_rect = Rect2(0, 604, 248, 228)
z_index = 1 z_index = 1
y_sort_enabled = true y_sort_enabled = true
material = SubResource("ShaderMaterial_yvxfs") material = SubResource("ShaderMaterial_yvxfs")
position = Vector2(10960.506, 3678.0952) position = Vector2(10963, 3820)
scale = Vector2(-1.93815, 1.5875) scale = Vector2(-1.93815, 1.5875)
texture = ExtResource("19_edja8") texture = ExtResource("19_edja8")
offset = Vector2(-1.2871094, -82.611084) offset = Vector2(0, -172)
region_enabled = true region_enabled = true
region_rect = Rect2(1837, 651, 139, 180) region_rect = Rect2(1837, 651, 139, 180)
@@ -1582,10 +1585,9 @@ region_rect = Rect2(332, 194, 179, 154)
[node name="grass3" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/grass"] [node name="grass3" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/grass"]
modulate = Color(0.954868, 0.882599, 0.798501, 1) modulate = Color(0.954868, 0.882599, 0.798501, 1)
z_index = -5 z_index = -5
position = Vector2(18274, 1857) position = Vector2(18189, 1960)
scale = Vector2(5.77602, 3.87779) scale = Vector2(5.77602, 3.87779)
texture = ExtResource("30_cmmg6") texture = ExtResource("30_cmmg6")
offset = Vector2(-14.715942, 26.561523)
region_enabled = true region_enabled = true
region_rect = Rect2(7, 4, 256, 220) region_rect = Rect2(7, 4, 256, 220)
@@ -1685,11 +1687,10 @@ region_rect = Rect2(7, 4, 267, 239)
[node name="grass40" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/grass"] [node name="grass40" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/grass"]
z_index = -5 z_index = -5
position = Vector2(24144.207, 3443.7068) position = Vector2(23915, 3644)
rotation = 3.40339 rotation = 3.40339
scale = Vector2(5.52625, 5.81879) scale = Vector2(5.52625, 5.81879)
texture = ExtResource("29_pjemw") texture = ExtResource("29_pjemw")
offset = Vector2(30.682373, -43.44397)
region_enabled = true region_enabled = true
region_rect = Rect2(317, 219, 185, 159) region_rect = Rect2(317, 219, 185, 159)
@@ -1767,10 +1768,9 @@ region_rect = Rect2(29, 204, 219, 159)
[node name="grass52" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/grass"] [node name="grass52" type="Sprite2D" parent="YSorted/ForestVisuals/Static/greenery/grass"]
modulate = Color(0.856076, 0.855033, 0.937369, 1) modulate = Color(0.856076, 0.855033, 0.937369, 1)
z_index = -5 z_index = -5
position = Vector2(23751, 2994) position = Vector2(23634, 2698)
scale = Vector2(5.35495, 4.49236) scale = Vector2(5.35495, 4.49236)
texture = ExtResource("29_pjemw") texture = ExtResource("29_pjemw")
offset = Vector2(-21.848877, -65.88965)
region_enabled = true region_enabled = true
region_rect = Rect2(29, 204, 219, 159) region_rect = Rect2(29, 204, 219, 159)
@@ -2176,7 +2176,6 @@ _sceneRoot = NodePath("..")
script = ExtResource("40_cvg1r") script = ExtResource("40_cvg1r")
_enemyGroupSpawns = [NodePath("../YSorted/EnemyGroupSpawns/Spawn1"), NodePath("../YSorted/EnemyGroupSpawns/Spawn2"), NodePath("../YSorted/EnemyGroupSpawns/Spawn3"), NodePath("../YSorted/EnemyGroupSpawns/Spawn4")] _enemyGroupSpawns = [NodePath("../YSorted/EnemyGroupSpawns/Spawn1"), NodePath("../YSorted/EnemyGroupSpawns/Spawn2"), NodePath("../YSorted/EnemyGroupSpawns/Spawn3"), NodePath("../YSorted/EnemyGroupSpawns/Spawn4")]
_roamingEnemyGroupPrefab = ExtResource("41_cvg1r") _roamingEnemyGroupPrefab = ExtResource("41_cvg1r")
_itemOnGroundPrefab = ExtResource("41_x3yi1")
_fightSceneSwitcher = NodePath("../FightSceneSwitcher") _fightSceneSwitcher = NodePath("../FightSceneSwitcher")
[editable path="YSorted/Vesna"] [editable path="YSorted/Vesna"]
+72 -90
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=41 format=3 uid="uid://bm21nqepnwaik"] [gd_scene load_steps=40 format=3 uid="uid://bm21nqepnwaik"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_3vr4f"] [ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_3vr4f"]
[ext_resource type="Texture2D" uid="uid://cnhsxxps2cw5" path="res://art/indoor/room export/Room_01_table.png" id="2_ubg3a"] [ext_resource type="Texture2D" uid="uid://cnhsxxps2cw5" path="res://art/indoor/room export/Room_01_table.png" id="2_ubg3a"]
@@ -30,13 +30,16 @@
[ext_resource type="AudioStream" uid="uid://r2f6xmjvyyjv" path="res://audio/sfx/Animals/SFX_Cat_Purr_01.wav" id="21_ytap8"] [ext_resource type="AudioStream" uid="uid://r2f6xmjvyyjv" path="res://audio/sfx/Animals/SFX_Cat_Purr_01.wav" id="21_ytap8"]
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="22_tggq2"] [ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="22_tggq2"]
[ext_resource type="Resource" uid="uid://cbpurnewhyefa" path="res://resources/quests/beetRoot.tres" id="22_yd2gv"] [ext_resource type="Resource" uid="uid://cbpurnewhyefa" path="res://resources/quests/beetRoot.tres" id="22_yd2gv"]
[ext_resource type="Texture2D" uid="uid://da67c7avarwq2" path="res://art/indoor/kitchen_bgAssets.png" id="23_d7yky"]
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="24_yd2gv"] [ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="24_yd2gv"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"]
resource_local_to_scene = true resource_local_to_scene = true
size = Vector2(3836, 1086) size = Vector2(3836, 1086)
[sub_resource type="CircleShape2D" id="CircleShape2D_yd2gv"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_gpagp"] [sub_resource type="CircleShape2D" id="CircleShape2D_gpagp"]
resource_local_to_scene = true resource_local_to_scene = true
radius = 300.0 radius = 300.0
@@ -207,10 +210,6 @@ _data = {
&"hand_stretch": SubResource("Animation_8o6or") &"hand_stretch": SubResource("Animation_8o6or")
} }
[sub_resource type="CircleShape2D" id="CircleShape2D_yd2gv"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_wuntg"] [sub_resource type="CircleShape2D" id="CircleShape2D_wuntg"]
resource_local_to_scene = true resource_local_to_scene = true
radius = 400.0 radius = 400.0
@@ -219,7 +218,7 @@ radius = 400.0
z_index = 1 z_index = 1
y_sort_enabled = true y_sort_enabled = true
script = ExtResource("1_3vr4f") script = ExtResource("1_3vr4f")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_vesnas_room.tscn", "res://scenes/Babushka_scene_indoor_kitchen.tscn", "res://scenes/Babushka_scene_farm_outside_2d.tscn") _sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_vesnas_room.tscn", "res://scenes/Babushka_scene_indoor_kitchen.tscn")
[node name="Foreground" type="Node" parent="."] [node name="Foreground" type="Node" parent="."]
@@ -305,6 +304,34 @@ region_rect = Rect2(111, 292, 3323, 2160)
position = Vector2(950, -419) position = Vector2(950, -419)
shape = SubResource("RectangleShape2D_a2ood") shape = SubResource("RectangleShape2D_a2ood")
[node name="Room01DorrR" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(936, -216)
texture = ExtResource("6_blyw3")
region_enabled = true
region_rect = Rect2(3161, 313, 679, 1050)
[node name="OutsideDoor" parent="BackWall/Room01DorrR" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-7, 248)
scale = Vector2(1.5, 1.5)
_spritesToOutline = [NodePath("..")]
_id = 1
[node name="Room01DoorL" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-3296, 48)
texture = ExtResource("7_yd2gv")
region_enabled = true
region_rect = Rect2(0, 0, 3840, 2160)
[node name="VesnasRoomDoor" parent="BackWall/Room01DoorL" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-1559, -16)
_spritesToOutline = [NodePath("..")]
_id = 0
[node name="CollisionShape3D" parent="BackWall/Room01DoorL/VesnasRoomDoor/Area2D" index="0"]
shape = SubResource("CircleShape2D_yd2gv")
[node name="Room01Pechka" type="Sprite2D" parent="BackWall"] [node name="Room01Pechka" type="Sprite2D" parent="BackWall"]
z_index = -80 z_index = -80
position = Vector2(-224, -392) position = Vector2(-224, -392)
@@ -314,14 +341,14 @@ region_rect = Rect2(2236, 0, 724, 1392)
[node name="Room01Window2" type="Sprite2D" parent="BackWall"] [node name="Room01Window2" type="Sprite2D" parent="BackWall"]
z_index = -50 z_index = -50
position = Vector2(-5870, -408) position = Vector2(-3192, -344)
texture = ExtResource("9_aoesu") texture = ExtResource("9_aoesu")
region_enabled = true region_enabled = true
region_rect = Rect2(1020, 338, 607, 757) region_rect = Rect2(1020, 338, 607, 757)
[node name="Room01Window3" type="Sprite2D" parent="BackWall"] [node name="Room01Window3" type="Sprite2D" parent="BackWall"]
z_index = -50 z_index = -50
position = Vector2(-3931, -397) position = Vector2(-1792, -336)
texture = ExtResource("9_aoesu") texture = ExtResource("9_aoesu")
region_enabled = true region_enabled = true
region_rect = Rect2(1020, 338, 607, 757) region_rect = Rect2(1020, 338, 607, 757)
@@ -347,39 +374,46 @@ texture = ExtResource("11_as3nm")
region_enabled = true region_enabled = true
region_rect = Rect2(2469, 459, 247, 131) region_rect = Rect2(2469, 459, 247, 131)
[node name="Room01Shelf" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-880, -416)
texture = ExtResource("12_bu2a1")
region_enabled = true
region_rect = Rect2(1846, 471, 348, 490)
[node name="Bench" type="Sprite2D" parent="BackWall"] [node name="Bench" type="Sprite2D" parent="BackWall"]
z_index = -10 z_index = -10
y_sort_enabled = true y_sort_enabled = true
position = Vector2(-5070, 1051) position = Vector2(-3240, 224)
texture = ExtResource("13_rongr") texture = ExtResource("13_rongr")
flip_h = true flip_h = true
region_enabled = true region_enabled = true
region_rect = Rect2(1156, 1185, 940, 189) region_rect = Rect2(1156, 1185, 940, 189)
[node name="Katze" type="Sprite2D" parent="BackWall/Bench"] [node name="Bench2" type="Sprite2D" parent="BackWall"]
z_index = -10 z_index = -10
position = Vector2(61, -87) position = Vector2(-1824, 224)
texture = ExtResource("13_rongr")
region_enabled = true
region_rect = Rect2(1156, 1185, 940, 189)
[node name="Katze" type="Sprite2D" parent="BackWall"]
z_index = -10
position = Vector2(-4051, 332)
scale = Vector2(2, 2) scale = Vector2(2, 2)
texture = ExtResource("15_sndxu") texture = ExtResource("15_sndxu")
offset = Vector2(-8, -126) offset = Vector2(-8, -126)
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="BackWall/Bench/Katze"] [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="BackWall/Katze"]
stream = SubResource("AudioStreamRandomizer_b6vf7") stream = SubResource("AudioStreamRandomizer_b6vf7")
bus = &"SFX" bus = &"SFX"
script = ExtResource("22_tggq2") script = ExtResource("22_tggq2")
[node name="InteractionArea" parent="BackWall/Bench/Katze" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")] [node name="InteractionArea" parent="BackWall/Katze" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-6.5, -44) position = Vector2(-6.5, -44)
scale = Vector2(0.5, 0.5) scale = Vector2(0.5, 0.5)
_spritesToOutline = [NodePath("..")] _spritesToOutline = [NodePath("..")]
[node name="Bench2" type="Sprite2D" parent="BackWall"]
z_index = -10
position = Vector2(-2906, 243)
texture = ExtResource("13_rongr")
region_enabled = true
region_rect = Rect2(1156, 1185, 940, 189)
[node name="Room assets" type="Node" parent="BackWall"] [node name="Room assets" type="Node" parent="BackWall"]
[node name="wood" type="Sprite2D" parent="BackWall/Room assets"] [node name="wood" type="Sprite2D" parent="BackWall/Room assets"]
@@ -400,10 +434,19 @@ offset = Vector2(-14.6475, -97.651)
region_enabled = true region_enabled = true
region_rect = Rect2(3157, 688, 118.519, 221) region_rect = Rect2(3157, 688, 118.519, 221)
[node name="vase" type="Sprite2D" parent="BackWall/Room assets"]
z_index = -10
y_sort_enabled = true
position = Vector2(-857, -37.5)
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2748, 432, 174, 191)
[node name="candle" type="Sprite2D" parent="BackWall/Room assets"] [node name="candle" type="Sprite2D" parent="BackWall/Room assets"]
z_index = -10 z_index = -10
y_sort_enabled = true y_sort_enabled = true
position = Vector2(-852, -187) position = Vector2(-425, -77.5)
rotation = -0.0663225 rotation = -0.0663225
texture = ExtResource("4_27bwy") texture = ExtResource("4_27bwy")
offset = Vector2(0, -296) offset = Vector2(0, -296)
@@ -491,66 +534,6 @@ offset = Vector2(0, -296)
region_enabled = true region_enabled = true
region_rect = Rect2(2576, 802, 219, 64) region_rect = Rect2(2576, 802, 219, 64)
[node name="Doors" type="Node2D" parent="BackWall"]
[node name="Door_Kitchen" type="Sprite2D" parent="BackWall/Doors"]
z_index = -50
position = Vector2(923, -221)
texture = ExtResource("6_blyw3")
region_enabled = true
region_rect = Rect2(3161, 313, 679, 1050)
[node name="KitchendoorInteraction" parent="BackWall/Doors/Door_Kitchen" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-7, 248)
scale = Vector2(1.5, 1.5)
_spritesToOutline = [NodePath("..")]
_id = 1
[node name="Door_Outside" type="Sprite2D" parent="BackWall/Doors"]
z_index = -50
position = Vector2(-4917, -226)
texture = ExtResource("23_d7yky")
region_enabled = true
region_rect = Rect2(3009, 666, 679, 1050)
[node name="OutsideDoor" parent="BackWall/Doors/Door_Outside" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-7, 248)
scale = Vector2(1.5, 1.5)
_spritesToOutline = [NodePath("..")]
_id = 2
[node name="Door_Bedroom" type="Sprite2D" parent="BackWall/Doors"]
z_index = -50
position = Vector2(-1620, -259)
texture = ExtResource("7_yd2gv")
region_enabled = true
region_rect = Rect2(0, 165, 763, 1224)
[node name="VesnasRoomDoor" parent="BackWall/Doors/Door_Bedroom" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(2, 233)
_spritesToOutline = [NodePath("..")]
_id = 0
[node name="CollisionShape3D" parent="BackWall/Doors/Door_Bedroom/VesnasRoomDoor/Area2D" index="0"]
shape = SubResource("CircleShape2D_yd2gv")
[node name="Shelf" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-880, -416)
texture = ExtResource("12_bu2a1")
region_enabled = true
region_rect = Rect2(1846, 471, 348, 490)
[node name="vase" type="Sprite2D" parent="BackWall/Shelf"]
visible = false
z_index = -10
y_sort_enabled = true
position = Vector2(23, 378.5)
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2748, 432, 174, 191)
[node name="Vesna" parent="." instance=ExtResource("15_7a68a")] [node name="Vesna" parent="." instance=ExtResource("15_7a68a")]
y_sort_enabled = false y_sort_enabled = false
position = Vector2(-920, 319) position = Vector2(-920, 319)
@@ -558,18 +541,18 @@ position = Vector2(-920, 319)
[node name="Yeli" parent="." instance=ExtResource("16_dhsxs")] [node name="Yeli" parent="." instance=ExtResource("16_dhsxs")]
z_index = 0 z_index = 0
y_sort_enabled = false y_sort_enabled = false
position = Vector2(-2841, 198) position = Vector2(-1395, 16)
_timelinesToPlay = PackedStringArray("yeli_intro_05") _timelinesToPlay = PackedStringArray("yeli_intro_05")
[node name="InteractionArea" parent="Yeli" index="0"] [node name="InteractionArea" parent="Yeli" index="0"]
position = Vector2(0, -63) position = Vector2(-373, -63)
[node name="CollisionShape3D" parent="Yeli/InteractionArea/Area2D" index="0"] [node name="CollisionShape3D" parent="Yeli/InteractionArea/Area2D" index="0"]
position = Vector2(-225.99994, 33) position = Vector2(-225.99994, 33)
shape = SubResource("CircleShape2D_wuntg") shape = SubResource("CircleShape2D_wuntg")
[node name="AnimatedSprite" parent="Yeli/TalkingControl" index="0"] [node name="AnimatedSprite" parent="Yeli/TalkingControl" index="0"]
position = Vector2(-224, 373) position = Vector2(-576, 368)
[node name="CollisionShape2D" parent="Yeli/AnimatableBody2D" index="0"] [node name="CollisionShape2D" parent="Yeli/AnimatableBody2D" index="0"]
position = Vector2(-565, 464) position = Vector2(-565, 464)
@@ -597,16 +580,15 @@ _followNode = NodePath("../Vesna/CharacterBody2D")
[node name="CanvasLayer" parent="." instance=ExtResource("24_yd2gv")] [node name="CanvasLayer" parent="." instance=ExtResource("24_yd2gv")]
[connection signal="InteractedTool" from="BackWall/Room01DorrR/OutsideDoor" to="." method="LoadSceneAtIndex"]
[connection signal="InteractedTool" from="BackWall/Room01DoorL/VesnasRoomDoor" to="." method="LoadSceneAtIndex"]
[connection signal="Interacted" from="BackWall/Room01PechkaDoor/InteractionArea" to="BackWall/Room01PechkaDoor/InteractionArea" method="ToggleActive"] [connection signal="Interacted" from="BackWall/Room01PechkaDoor/InteractionArea" to="BackWall/Room01PechkaDoor/InteractionArea" method="ToggleActive"]
[connection signal="Interacted" from="BackWall/Room01PechkaDoor/InteractionArea" to="BackWall/Room assets/hand" method="PlayAnimation"] [connection signal="Interacted" from="BackWall/Room01PechkaDoor/InteractionArea" to="BackWall/Room assets/hand" method="PlayAnimation"]
[connection signal="Interacted" from="BackWall/Bench/Katze/InteractionArea" to="BackWall/Bench/Katze/AudioStreamPlayer2D" method="PlayOneShot"] [connection signal="Interacted" from="BackWall/Katze/InteractionArea" to="BackWall/Katze/AudioStreamPlayer2D" method="PlayOneShot"]
[connection signal="InteractedTool" from="BackWall/Doors/Door_Kitchen/KitchendoorInteraction" to="." method="LoadSceneAtIndex"]
[connection signal="InteractedTool" from="BackWall/Doors/Door_Outside/OutsideDoor" to="." method="LoadSceneAtIndex"]
[connection signal="InteractedTool" from="BackWall/Doors/Door_Bedroom/VesnasRoomDoor" to="." method="LoadSceneAtIndex"]
[connection signal="timelineEnded" from="Yeli/dialogic_toggle" to="Yeli/Beetroot Quest trigger" method="Trigger"] [connection signal="timelineEnded" from="Yeli/dialogic_toggle" to="Yeli/Beetroot Quest trigger" method="Trigger"]
[editable path="BackWall/Room01DoorL/VesnasRoomDoor"]
[editable path="BackWall/Room01PechkaDoor/InteractionArea"] [editable path="BackWall/Room01PechkaDoor/InteractionArea"]
[editable path="BackWall/Doors/Door_Bedroom/VesnasRoomDoor"]
[editable path="Vesna"] [editable path="Vesna"]
[editable path="Yeli"] [editable path="Yeli"]
[editable path="Yeli/InteractionArea"] [editable path="Yeli/InteractionArea"]
+19 -16
View File
@@ -1,8 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://bvp5ju36h1vl2"] [gd_scene load_steps=9 format=3 uid="uid://bvp5ju36h1vl2"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_ftmt4"] [ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_ftmt4"]
[ext_resource type="Texture2D" uid="uid://da67c7avarwq2" path="res://art/indoor/kitchen_bgAssets.png" id="2_qsw8g"] [ext_resource type="Texture2D" uid="uid://da67c7avarwq2" path="res://art/indoor/kitchen_bgAssets.png" id="2_qsw8g"]
[ext_resource type="Texture2D" uid="uid://x7trh4dgsvoe" path="res://art/indoor/room export/Room_01_assets.png" id="5_3wvmt"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_6mpmc"] [ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_6mpmc"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="25_58hm8"] [ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="25_58hm8"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="30_wqpex"] [ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="30_wqpex"]
@@ -10,7 +9,7 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"]
resource_local_to_scene = true resource_local_to_scene = true
size = Vector2(4757.2813, 1086) size = Vector2(3836, 1086)
[sub_resource type="CircleShape2D" id="CircleShape2D_yd2gv"] [sub_resource type="CircleShape2D" id="CircleShape2D_yd2gv"]
resource_local_to_scene = true resource_local_to_scene = true
@@ -20,7 +19,7 @@ radius = 300.0
z_index = 1 z_index = 1
y_sort_enabled = true y_sort_enabled = true
script = ExtResource("1_ftmt4") script = ExtResource("1_ftmt4")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_common_room.tscn") _sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_farm_outside_2d.tscn", "res://scenes/Babushka_scene_indoor_common_room.tscn")
[node name="Foreground" type="Node" parent="."] [node name="Foreground" type="Node" parent="."]
@@ -37,7 +36,7 @@ position = Vector2(-4344, 3056)
scale = Vector2(2, 2) scale = Vector2(2, 2)
[node name="CollisionShape2D" type="CollisionShape2D" parent="SideColliderLeft"] [node name="CollisionShape2D" type="CollisionShape2D" parent="SideColliderLeft"]
position = Vector2(-2461.1406, -1168) position = Vector2(-2892, -1168)
shape = SubResource("RectangleShape2D_a2ood") shape = SubResource("RectangleShape2D_a2ood")
[node name="SideColliderRight" type="StaticBody2D" parent="."] [node name="SideColliderRight" type="StaticBody2D" parent="."]
@@ -45,7 +44,7 @@ position = Vector2(10992, 2856)
scale = Vector2(2, 2) scale = Vector2(2, 2)
[node name="CollisionShape2D" type="CollisionShape2D" parent="SideColliderRight"] [node name="CollisionShape2D" type="CollisionShape2D" parent="SideColliderRight"]
position = Vector2(-2863.5, -1165) position = Vector2(-2892, -1168)
shape = SubResource("RectangleShape2D_a2ood") shape = SubResource("RectangleShape2D_a2ood")
[node name="Background" type="Node2D" parent="."] [node name="Background" type="Node2D" parent="."]
@@ -172,6 +171,18 @@ texture = ExtResource("2_qsw8g")
region_enabled = true region_enabled = true
region_rect = Rect2(0, 2246, 3840, 912) region_rect = Rect2(0, 2246, 3840, 912)
[node name="Room01DorrR" type="Sprite2D" parent="Background"]
position = Vector2(-250, -216)
texture = ExtResource("2_qsw8g")
region_enabled = true
region_rect = Rect2(3009, 666, 679, 1050)
[node name="OutsideDoor" parent="Background/Room01DorrR" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_6mpmc")]
position = Vector2(-7, 248)
scale = Vector2(1.5, 1.5)
_spritesToOutline = [NodePath("..")]
_id = 0
[node name="Room01DoorL" type="Sprite2D" parent="Background"] [node name="Room01DoorL" type="Sprite2D" parent="Background"]
position = Vector2(-4000, -221) position = Vector2(-4000, -221)
texture = ExtResource("2_qsw8g") texture = ExtResource("2_qsw8g")
@@ -180,7 +191,7 @@ region_rect = Rect2(92, 458, 641, 1050)
[node name="CommonRoomDoor" parent="Background/Room01DoorL" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_6mpmc")] [node name="CommonRoomDoor" parent="Background/Room01DoorL" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_6mpmc")]
_spritesToOutline = [NodePath("..")] _spritesToOutline = [NodePath("..")]
_id = 0 _id = 1
[node name="CollisionShape3D" parent="Background/Room01DoorL/CommonRoomDoor/Area2D" index="0"] [node name="CollisionShape3D" parent="Background/Room01DoorL/CommonRoomDoor/Area2D" index="0"]
shape = SubResource("CircleShape2D_yd2gv") shape = SubResource("CircleShape2D_yd2gv")
@@ -235,15 +246,6 @@ flip_h = true
region_enabled = true region_enabled = true
region_rect = Rect2(3037, 440, 701, 170) region_rect = Rect2(3037, 440, 701, 170)
[node name="vase" type="Sprite2D" parent="BackItems/wallshelf"]
z_index = -10
y_sort_enabled = true
position = Vector2(42, 124)
texture = ExtResource("5_3wvmt")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2748, 432, 174, 191)
[node name="FrontItems" type="Node2D" parent="."] [node name="FrontItems" type="Node2D" parent="."]
z_index = 50 z_index = 50
@@ -274,6 +276,7 @@ texture = ExtResource("2_qsw8g")
region_enabled = true region_enabled = true
region_rect = Rect2(1599, 1107, 1351, 418) region_rect = Rect2(1599, 1107, 1351, 418)
[connection signal="InteractedTool" from="Background/Room01DorrR/OutsideDoor" to="." method="LoadSceneAtIndex"]
[connection signal="InteractedTool" from="Background/Room01DoorL/CommonRoomDoor" to="." method="LoadSceneAtIndex"] [connection signal="InteractedTool" from="Background/Room01DoorL/CommonRoomDoor" to="." method="LoadSceneAtIndex"]
[connection signal="Interacted" from="FrontItems/Stove/Firetoggle" to="FrontItems/Stove/Fireleft" method="hide"] [connection signal="Interacted" from="FrontItems/Stove/Firetoggle" to="FrontItems/Stove/Fireleft" method="hide"]
[connection signal="Interacted" from="FrontItems/Stove/Firetoggle" to="FrontItems/Stove/FireRight" method="hide"] [connection signal="Interacted" from="FrontItems/Stove/Firetoggle" to="FrontItems/Stove/FireRight" method="hide"]
File diff suppressed because it is too large Load Diff
@@ -7,4 +7,16 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
/// </summary> /// </summary>
public partial class DetectableInteractionArea : Area2D public partial class DetectableInteractionArea : Area2D
{ {
[Export] public InteractionArea2D interactionArea2D;
public void Detected()
{
GD.Print("Detected " + interactionArea2D.GetParent().Name);
interactionArea2D.IsSelectedByDetector = true;
}
public void NoLongerDetected()
{
interactionArea2D.IsSelectedByDetector = false;
}
} }
@@ -7,7 +7,8 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
/// </summary> /// </summary>
public partial class DetectionCross : Node2D public partial class DetectionCross : Node2D
{ {
[Export] private Detector _detector; [Export] private Detector _collider;
[Export] private RaycastDetector _detector;
[Export] private float _xOffset; [Export] private float _xOffset;
[Export] private float _yOffset; [Export] private float _yOffset;
@@ -17,6 +18,8 @@ public partial class DetectionCross : Node2D
/// <param name="direction"></param> /// <param name="direction"></param>
public void SetDirection(Vector2 direction) public void SetDirection(Vector2 direction)
{ {
_detector.Position = new Vector2(direction.X * _xOffset, direction.Y * _yOffset); Vector2 newPos = new Vector2(direction.X * _xOffset, direction.Y * _yOffset);
_collider.GlobalPosition = newPos;
_detector.TargetPosition = newPos;
} }
} }
@@ -1,5 +1,6 @@
using Babushka.scripts.CSharp.Common.Services; using Babushka.scripts.CSharp.Common.Services;
using Godot; using Godot;
using Godot.Collections;
namespace Babushka.scripts.CSharp.Common.CharacterControls; namespace Babushka.scripts.CSharp.Common.CharacterControls;
@@ -41,7 +42,7 @@ public partial class Detector : Area2D
/// Called every time this node enters an Area2D. /// Called every time this node enters an Area2D.
/// </summary> /// </summary>
/// <param name="area"></param> /// <param name="area"></param>
public void OnEnteredInteractable(Node area) public void OnEnteredInteractable(Area2D area)
{ {
if (!_active || !InputService.Instance.InputEnabled) if (!_active || !InputService.Instance.InputEnabled)
return; return;
@@ -56,13 +57,14 @@ public partial class Detector : Area2D
/// Called whenever this node exits an Area2D. /// Called whenever this node exits an Area2D.
/// </summary> /// </summary>
/// <param name="area"></param> /// <param name="area"></param>
public void OnExitedInteractable(Node area) public void OnExitedInteractable(Area2D area)
{ {
if (!_active || !InputService.Instance.InputEnabled) if (!_active || !InputService.Instance.InputEnabled)
return; return;
if (area is DetectableInteractionArea interactionArea2D) if (area is DetectableInteractionArea interactionArea2D)
{ {
EmitSignal(SignalName.InteractableExited); EmitSignal(SignalName.InteractableExited);
} }
} }
@@ -1,5 +1,6 @@
using System.Linq; using System.Linq;
using Babushka.scripts.CSharp.Common.Services; using Babushka.scripts.CSharp.Common.Services;
using Babushka.scripts.CSharp.Low_Code.Variables;
using Godot; using Godot;
namespace Babushka.scripts.CSharp.Common.CharacterControls; namespace Babushka.scripts.CSharp.Common.CharacterControls;
@@ -28,6 +29,8 @@ public partial class InteractionArea2D : Node2D
set => _active = value; set => _active = value;
} }
public bool IsSelectedByDetector { get; set; } = false;
public void SetActiveInverse(bool active) public void SetActiveInverse(bool active)
{ {
IsActive = !active; IsActive = !active;
@@ -52,6 +55,9 @@ public partial class InteractionArea2D : Node2D
if (!_useOutline) if (!_useOutline)
return; return;
if (!IsSelectedByDetector)
return;
foreach (var sprite in _spritesToOutline) foreach (var sprite in _spritesToOutline)
{ {
sprite.Material = _outlineMaterial; sprite.Material = _outlineMaterial;
@@ -77,6 +83,9 @@ public partial class InteractionArea2D : Node2D
if (!_active || !InputService.Instance.InputEnabled) if (!_active || !InputService.Instance.InputEnabled)
return; return;
if(!IsSelectedByDetector)
return;
if (@event.IsAction("interact") && @event.IsPressed()) if (@event.IsAction("interact") && @event.IsPressed())
{ {
TryInteract(); TryInteract();
@@ -0,0 +1,40 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.CharacterControls;
public partial class RaycastDetector : RayCast2D
{
[Export] private bool _active = true;
private DetectableInteractionArea? _lastDetected;
public bool IsActive
{
get => _active;
set
{
Visible = value;
_active = value;
}
}
public override void _PhysicsProcess(double delta)
{
if (!_active)
return;
if (IsColliding())
{
if (GetCollider() is DetectableInteractionArea interactionArea)
{
if (_lastDetected != null && _lastDetected != interactionArea)
{
_lastDetected.NoLongerDetected();
}
_lastDetected = interactionArea;
interactionArea.Detected();
}
}
}
}
@@ -0,0 +1 @@
uid://b4n0nlu4ckqga
@@ -186,7 +186,7 @@ public partial class PlantBehaviour2D : Node2D
private void SetActiveHarvestablePlant(bool active) private void SetActiveHarvestablePlant(bool active)
{ {
//_harvestablePlant.IsActive = active; _harvestablePlant.IsActive = active;
_harvestablePlant.UpdateVisuals(); _harvestablePlant.UpdateVisuals();
} }
@@ -11,11 +11,11 @@ public partial class ActionAnimationController : Node
#endregion #endregion
[Export] private AllFightersVisual _allFightersVisual = null!; [Export] private AllFightersVisual _allFightersVisual = null!;
[Export] private FightHappeningAnimationContext _animationContext = null!;
public void StateEnter() public void StateEnter()
{ {
_ = HappeningData.actionStaging!.AnimateAction(_allFightersVisual,_animationContext); _ = HappeningData.actionStaging!.AnimateAction(_allFightersVisual);
} }
public void StateExit() public void StateExit()
@@ -12,7 +12,6 @@ public class TargetSelectActionDetail : FighterAction.FighterActionDetail
// settings // settings
public required bool selectEnemy; public required bool selectEnemy;
public required bool selectAlly; public required bool selectAlly;
public required bool aliveOnly;
public VisualRange visualRange = VisualRange.Single; public VisualRange visualRange = VisualRange.Single;
// result // result
@@ -13,8 +13,7 @@ public class AllyAttackAction : FighterAction
public TargetSelectActionDetail targetSelect = new() public TargetSelectActionDetail targetSelect = new()
{ {
selectEnemy = true, selectEnemy = true,
selectAlly = false, selectAlly = false
aliveOnly = true
}; };
public MinigameActionDetail minigameDetail = new(); public MinigameActionDetail minigameDetail = new();
@@ -48,11 +47,10 @@ public class AllyAttackAction : FighterAction
public override void ExecuteAction() public override void ExecuteAction()
{ {
var totalDamage = minigameDetail.damageHits!.Sum(dh => dh); var totalDamage = minigameDetail.damageHits!.Sum(dh => dh);
targetSelect.GetTarget().ChangeHealth(-totalDamage); targetSelect.GetTarget().AddHealth(-totalDamage);
} }
public override async Task AnimateAction(AllFightersVisual allFightersVisual, public override async Task AnimateAction(AllFightersVisual allFightersVisual)
FightHappeningAnimationContext animationContext)
{ {
var currentFighter = HappeningData.fighterTurn.Current; var currentFighter = HappeningData.fighterTurn.Current;
var targetFighter = targetSelect.GetTarget(); var targetFighter = targetSelect.GetTarget();
@@ -65,7 +63,7 @@ public class AllyAttackAction : FighterAction
foreach (var hit in minigameDetail.damageHits!) foreach (var hit in minigameDetail.damageHits!)
{ {
targetFighterVisual.SpawnDamageIndicatorNumber($"-{hit}"); targetFighterVisual.SpawnDamageIndicatorNumber(hit);
} }
await currentFighterVisual.AnimatePosToBase(); await currentFighterVisual.AnimatePosToBase();
@@ -18,11 +18,10 @@ public class BlobAttackAction(int damage = 3) : FighterAction
public override void ExecuteAction() public override void ExecuteAction()
{ {
FightWorld.Instance.allyFighters.vesnaFighter.ChangeHealth(-damage); FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-damage);
} }
public override async Task AnimateAction(AllFightersVisual allFightersVisual, public override async Task AnimateAction(AllFightersVisual allFightersVisual)
FightHappeningAnimationContext animationContext)
{ {
var currentFighter = HappeningData.fighterTurn.Current; var currentFighter = HappeningData.fighterTurn.Current;
var targetFighter = FightWorld.Instance.allyFighters.vesnaFighter; var targetFighter = FightWorld.Instance.allyFighters.vesnaFighter;
@@ -32,7 +31,7 @@ public class BlobAttackAction(int damage = 3) : FighterAction
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual); await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
_ = targetFighterVisual.AnimateHit(); _ = targetFighterVisual.AnimateHit();
targetFighterVisual.SpawnDamageIndicatorNumber($"-{damage}"); targetFighterVisual.SpawnDamageIndicatorNumber(damage);
await currentFighterVisual.AnimatePosToBase(); await currentFighterVisual.AnimatePosToBase();
} }
} }
@@ -1,48 +0,0 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.Util;
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
public class EatBeetrootAction : FighterAction
{
public override Variant<float, Func<bool>> GetAnimationEnd() => 1;
public override bool NextDetail() => false;
private const int HealAmount = 20;
public override bool ShouldAbort()
{
Debug.Assert(FightWorld.Instance.itemBeetrootToEatForHealth != null,
"Item to eat for health has not been set in the FightWorld autoload");
return !InventoryManager.Instance.playerInventory!.HasItems(new ItemInstance
{ blueprint = FightWorld.Instance.itemBeetrootToEatForHealth });
}
public override async Task AnimateAction(AllFightersVisual allFightersVisual,
FightHappeningAnimationContext animationContext)
{
var fighter = HappeningData.fighterTurn.Current;
var fighterVisual = allFightersVisual.GetVisualForFighter(fighter);
fighterVisual.SpawnDamageIndicatorNumber($"+{HealAmount}");
animationContext.useHealItemIndicator.SpawnIndicator();
await fighterVisual.AnimateHeal();
}
public override void ExecuteAction()
{
var fighter = HappeningData.fighterTurn.Current;
var result = InventoryManager.Instance.playerInventory!.TryRemoveAllItems(
new ItemInstance { blueprint = FightWorld.Instance.itemBeetrootToEatForHealth! });
if (result != InventoryActionResult.Success)
throw new Exception("No Beetroot in inventory. This case should have been handled earlier");
fighter.ChangeHealth(HealAmount);
}
public override AllyActionButton BindToActionButton() => AllyActionButton.Talk; // Temporarily bound to talk button
}
@@ -1 +0,0 @@
uid://b2463q1waqvdu
@@ -117,13 +117,11 @@ public partial class AllFightersVisual : Node
if (targetDetail.selectEnemy) if (targetDetail.selectEnemy)
_fighterVisuals _fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation)) .Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation))
.Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive
.ForEach(kv => kv.Value.SetTargetSelectionActive(true)); .ForEach(kv => kv.Value.SetTargetSelectionActive(true));
if (targetDetail.selectAlly) if (targetDetail.selectAlly)
_fighterVisuals _fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.allyFighterFormation)) .Where(kv => kv.Key.IsInFormation(HappeningData.allyFighterFormation))
.Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive
.ForEach(kv => kv.Value.SetTargetSelectionActive(true)); .ForEach(kv => kv.Value.SetTargetSelectionActive(true));
} }
+1 -2
View File
@@ -10,8 +10,7 @@ public class AllyFighters
maxHealth = 60, maxHealth = 60,
availableActions = availableActions =
[ [
new AllyAttackAction(), new AllyAttackAction()
new EatBeetrootAction()
] ]
}; };
public FightWorld.Fighter chuhaFighter = new() public FightWorld.Fighter chuhaFighter = new()
+6 -11
View File
@@ -222,9 +222,9 @@ public partial class FightHappening : Node
case FightState.ActionCheckDetails: case FightState.ActionCheckDetails:
RequireNotNull(HappeningData.actionStaging); RequireNotNull(HappeningData.actionStaging);
if (ShouldActionAbort()) if (ActionAbort())
ChangeState(FightState.InputActionSelect); ChangeState(FightState.InputActionSelect);
else if (DoesActionNeededDetail()) else if (ActionNeededDetail())
ChangeState(FightState.InputActionDetail); ChangeState(FightState.InputActionDetail);
else else
ChangeState(FightState.ActionExecute); ChangeState(FightState.ActionExecute);
@@ -307,11 +307,6 @@ public partial class FightHappening : Node
HappeningData.enemyFighterFormation.SetFighterAtPosition(emptySlotIndex, fighter); HappeningData.enemyFighterFormation.SetFighterAtPosition(emptySlotIndex, fighter);
HappeningData.fighterTurn.AddAsLast(fighter); HappeningData.fighterTurn.AddAsLast(fighter);
} }
if (GD.RandRange(0, 2) != 0) // 2/3 chance for vesna to start
{
HappeningData.fighterTurn.SpinBack();
}
} }
private void ExecuteNextFighter() private void ExecuteNextFighter()
@@ -333,13 +328,13 @@ public partial class FightHappening : Node
return HappeningData.actionStaging.GetAnimationEnd(); return HappeningData.actionStaging.GetAnimationEnd();
} }
private bool ShouldActionAbort() private bool ActionAbort()
{ {
Debug.Assert(HappeningData.actionStaging != null); Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.ShouldAbort(); return HappeningData.actionStaging.MarkedForAbort();
} }
private bool DoesActionNeededDetail() private bool ActionNeededDetail()
{ {
Debug.Assert(HappeningData.actionStaging != null); Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.NextDetail(); return HappeningData.actionStaging.NextDetail();
@@ -349,7 +344,7 @@ public partial class FightHappening : Node
private void ReviveVesna() private void ReviveVesna()
{ {
var vesnaFighter = FightWorld.Instance.allyFighters.vesnaFighter; var vesnaFighter = FightWorld.Instance.allyFighters.vesnaFighter;
vesnaFighter.Health = vesnaFighter.maxHealth; vesnaFighter.health = vesnaFighter.maxHealth;
GD.Print("Vesna has been revived. This is for the current prototype only"); GD.Print("Vesna has been revived. This is for the current prototype only");
} }
@@ -1,8 +0,0 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightHappeningAnimationContext : Node
{
[Export] public UsedItemIndicatorVisual useHealItemIndicator = null!;
}
@@ -1 +0,0 @@
uid://cdrjvgm82pxoj
@@ -1,16 +1,15 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Babushka.scripts.CSharp.Common.Inventory; using Babushka.scripts.CSharp.Common.Util;
using Godot; using Godot;
namespace Babushka.scripts.CSharp.Common.Fight; namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightRoomSceneSetup : Node public partial class FightRoomSceneSetup : Node
{ {
[Export(PropertyHint.ArrayType)] private Node2D[] _enemyGroupSpawns = null!; [Export(PropertyHint.ArrayType)] private Node2D[] _enemyGroupSpawns;
[Export] private PackedScene _roamingEnemyGroupPrefab = null!; [Export] private PackedScene _roamingEnemyGroupPrefab;
[Export] private PackedScene _itemOnGroundPrefab = null!; [Export] private FightSceneSwitcher _fightSceneSwitcher;
[Export] private FightSceneSwitcher _fightSceneSwitcher = null!;
public override void _Ready() public override void _Ready()
@@ -20,30 +19,11 @@ public partial class FightRoomSceneSetup : Node
foreach (var (parent, group) in _enemyGroupSpawns.Zip(room.enemyGroups)) foreach (var (parent, group) in _enemyGroupSpawns.Zip(room.enemyGroups))
{ {
if (group.AreAllDead()) if (group.AreAllDead())
{ continue;
SpawnLoot(group, parent);
}
else
{
SpawnEnemies(group, parent);
}
}
}
private void SpawnEnemies(FightWorld.FighterGroup group, Node2D parent)
{
var roamingEnemyGroup = _roamingEnemyGroupPrefab.Instantiate<RoamingEnemyGroup>(); var roamingEnemyGroup = _roamingEnemyGroupPrefab.Instantiate<RoamingEnemyGroup>();
roamingEnemyGroup.Initialize(group, _fightSceneSwitcher); roamingEnemyGroup.Initialize(group, _fightSceneSwitcher);
parent.AddChild(roamingEnemyGroup); parent.AddChild(roamingEnemyGroup);
} }
private void SpawnLoot(FightWorld.FighterGroup group, Node2D parent)
{
if (group.lootToDrop == null)
return;
var onGroundInstance = _itemOnGroundPrefab.Instantiate<ItemOnGround2D>();
onGroundInstance.itemInstance = group.lootToDrop;
parent.AddChild(onGroundInstance);
} }
} }
+9 -10
View File
@@ -11,15 +11,14 @@ public static class FightUtils
return self.Where(e => e.IsAlive()); return self.Where(e => e.IsAlive());
} }
public static IEnumerable<FightWorld.Fighter> WhereIsNotInFormation(this IEnumerable<FightWorld.Fighter> self, public static IEnumerable<FightWorld.Fighter> WhereIsNotInFormation(this IEnumerable<FightWorld.Fighter> self, FighterFormation formation)
FighterFormation formation)
{ {
return self.Where(e => !e.IsInFormation(formation)); return self.Where(e => !e.IsInFormation(formation));
} }
public static bool IsAlive(this FightWorld.Fighter self) public static bool IsAlive(this FightWorld.Fighter self)
{ {
return self.Health > 0; return self.GetHealth() > 0;
} }
public static bool IsDead(this FightWorld.Fighter self) public static bool IsDead(this FightWorld.Fighter self)
@@ -27,14 +26,14 @@ public static class FightUtils
return !self.IsAlive(); return !self.IsAlive();
} }
/// <summary> public static int GetHealth(this FightWorld.Fighter self)
/// Changes the health of a fighter
/// </summary>
/// <param name="self">The fighter itself</param>
/// <param name="amount">The amount of health to add. Make negative to remove health</param>
public static void ChangeHealth(this FightWorld.Fighter self, int amount)
{ {
self.Health += amount; return Math.Max(self.health ?? self.maxHealth, 0);
}
public static void AddHealth(this FightWorld.Fighter self, int addHealth)
{
self.health = self.GetHealth() + addHealth;
} }
public static bool IsInFormation(this FightWorld.Fighter self, FighterFormation formation) public static bool IsInFormation(this FightWorld.Fighter self, FighterFormation formation)
+4 -24
View File
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using Babushka.scripts.CSharp.Common.Fight.Actions; using Babushka.scripts.CSharp.Common.Fight.Actions;
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.Util; using Babushka.scripts.CSharp.Common.Util;
using Godot; using Godot;
@@ -21,7 +19,6 @@ public partial class FightWorld : Node
None, None,
EndOfNight EndOfNight
} }
public required Dictionary<int, Room> paths; public required Dictionary<int, Room> paths;
public required List<FighterGroup> enemyGroups; public required List<FighterGroup> enemyGroups;
public Special specialRoom = Special.None; public Special specialRoom = Special.None;
@@ -30,7 +27,6 @@ public partial class FightWorld : Node
public class FighterGroup public class FighterGroup
{ {
public required List<Fighter> fighters; public required List<Fighter> fighters;
public ItemInstance? lootToDrop = null;
} }
public class FightHappeningData public class FightHappeningData
@@ -60,17 +56,9 @@ public partial class FightWorld : Node
public required int maxHealth; public required int maxHealth;
public required List<FighterAction> availableActions; public required List<FighterAction> availableActions;
public const int MaxActionPoints = 1; public const int MaxActionPoints = 1;
public int? health = null; // null => initialize to full health on spawn
public int actionPointsLeft; public int actionPointsLeft;
private int? _healthBacking = null;
public int Health
{
get => _healthBacking ?? maxHealth;
set => _healthBacking = Math.Clamp(value, 0, maxHealth);
}
public FighterAction AutoSelectAction() public FighterAction AutoSelectAction()
{ {
return availableActions.Random() ?? new FighterAction.Skip(); return availableActions.Random() ?? new FighterAction.Skip();
@@ -93,10 +81,6 @@ public partial class FightWorld : Node
public FightHappeningData? fightHappeningData = null; public FightHappeningData? fightHappeningData = null;
public AllyFighters allyFighters = new(); public AllyFighters allyFighters = new();
// settings
[Export] private ItemResource? _itemToDropByEnemyGroup;
[Export] public ItemResource? itemBeetrootToEatForHealth;
public void ResetFightWorld() public void ResetFightWorld()
{ {
Generate(); Generate();
@@ -105,10 +89,10 @@ public partial class FightWorld : Node
public void Generate() public void Generate()
{ {
world = new Generator(this).GenerateWorld(); world = new Generator().GenerateWorld();
} }
private class Generator(FightWorld fightWorld) private class Generator
{ {
public World GenerateWorld() public World GenerateWorld()
{ {
@@ -178,11 +162,6 @@ public partial class FightWorld : Node
fighters = [] fighters = []
}; };
if (fightWorld._itemToDropByEnemyGroup != null)
{
enemyGroup.lootToDrop = new ItemInstance { blueprint = fightWorld._itemToDropByEnemyGroup };
}
var enemyCount = GD.RandRange(2, 3); var enemyCount = GD.RandRange(2, 3);
for (var i = 0; i < enemyCount; i++) for (var i = 0; i < enemyCount; i++)
@@ -210,6 +189,7 @@ public partial class FightWorld : Node
var enemy = new Fighter var enemy = new Fighter
{ {
type = type, type = type,
health = null,
maxHealth = GD.RandRange(8, 20), maxHealth = GD.RandRange(8, 20),
availableActions = availableActions =
[ [
+12 -4
View File
@@ -30,6 +30,8 @@ public abstract class FighterAction
public abstract bool DetailComplete(); public abstract bool DetailComplete();
} }
private bool _abort = false;
#region Shortcuts #region Shortcuts
protected static FightWorld.FightHappeningData HappeningData => protected static FightWorld.FightHappeningData HappeningData =>
@@ -59,13 +61,19 @@ public abstract class FighterAction
/// Animates the action. /// Animates the action.
/// </summary> /// </summary>
/// <param name="allFightersVisual"></param> /// <param name="allFightersVisual"></param>
/// <param name="animationContext"></param> public virtual async Task AnimateAction(AllFightersVisual allFightersVisual)
public virtual async Task AnimateAction(AllFightersVisual allFightersVisual,
FightHappeningAnimationContext animationContext)
{ {
} }
public virtual bool ShouldAbort() => false; public void MarkAbort()
{
_abort = true;
}
public bool MarkedForAbort()
{
return _abort;
}
/// <summary> /// <summary>
/// Returns the FighterActionDetail, that is currently handled. /// Returns the FighterActionDetail, that is currently handled.
@@ -3,19 +3,13 @@ using Godot;
namespace Babushka.scripts.CSharp.Common.Fight; namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FlyingIndicator : Node2D public partial class FighterDamageIndicatorFlyingNumber : Node2D
{ {
[Export] private Label _label = null!; [Export] private Label _label;
[Export] private TextureRect _sprite = null!;
public void Initialize(int number)
public void Initialize(string? text = null, Texture2D? icon = null)
{ {
_label.Visible = text != null; _label.Text = number.ToString();
_sprite.Visible = icon != null;
if (text != null) _label.Text = text;
if (icon != null) _sprite.Texture = icon;
var tween = CreateTween(); var tween = CreateTween();
var xMovement = GD.RandRange(-150, 150); var xMovement = GD.RandRange(-150, 150);
@@ -4,13 +4,13 @@ namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FighterDamageIndicatorVisual : Node2D public partial class FighterDamageIndicatorVisual : Node2D
{ {
[Export] private PackedScene _flyingNumberPrefab = null!; [Export] private PackedScene _flyingNumberPrefab;
public void SpawnFlyingNumber(string text) public void SpawnFlyingNumber(int number)
{ {
var flyingNumberInstance = _flyingNumberPrefab.Instantiate<FlyingIndicator>(); var flyingNumberInstance = _flyingNumberPrefab.Instantiate<FighterDamageIndicatorFlyingNumber>();
AddChild(flyingNumberInstance); AddChild(flyingNumberInstance);
flyingNumberInstance.Initialize(text); flyingNumberInstance.Initialize(number);
} }
} }
@@ -99,23 +99,6 @@ public class FighterTurn : IEnumerable<FightWorld.Fighter>
return false; return false;
} }
/// <summary>
/// Sets the current one back
/// This is an expensive operation, because the entire data structure needs to be circled
/// </summary>
public void SpinBack()
{
if (_currentNode == null) return;
var node = _currentNode;
while (node.next != _currentNode)
{
node = node.next;
}
_currentNode = node;
}
public IEnumerator<FightWorld.Fighter> GetEnumerator() public IEnumerator<FightWorld.Fighter> GetEnumerator()
{ {
if (_currentNode == null) return Enumerable.Empty<FightWorld.Fighter>().GetEnumerator(); if (_currentNode == null) return Enumerable.Empty<FightWorld.Fighter>().GetEnumerator();
+12 -19
View File
@@ -42,12 +42,7 @@ public partial class FighterVisual : Node2D
_boundFighter.IsInFormation(HappeningData.enemyFighterFormation) ? -1 : 1, _boundFighter.IsInFormation(HappeningData.enemyFighterFormation) ? -1 : 1,
_boundFighter.IsDead() ? .3f : 1); _boundFighter.IsDead() ? .3f : 1);
UpdateHealthBarVisuals(); healthBarVisual.UpdateHealth(_boundFighter.GetHealth(), _boundFighter.maxHealth);
}
private void UpdateHealthBarVisuals()
{
healthBarVisual.UpdateHealth(_boundFighter.Health, _boundFighter.maxHealth);
} }
public void SetTargetSelectionActive(bool value) public void SetTargetSelectionActive(bool value)
@@ -83,7 +78,6 @@ public partial class FighterVisual : Node2D
public async Task AnimateHit() public async Task AnimateHit()
{ {
UpdateHealthBarVisuals();
var tween = GetTree().CreateTween(); var tween = GetTree().CreateTween();
tween.TweenProperty(_squashParent, "scale", new Vector2(1.4f, 0.6f), 0.15); tween.TweenProperty(_squashParent, "scale", new Vector2(1.4f, 0.6f), 0.15);
tween.TweenProperty(_squashParent, "scale", new Vector2(1, 1), 0.4) tween.TweenProperty(_squashParent, "scale", new Vector2(1, 1), 0.4)
@@ -91,18 +85,17 @@ public partial class FighterVisual : Node2D
await ToSignal(tween, "finished"); await ToSignal(tween, "finished");
} }
public async Task AnimateHeal() // Keep for reference for new Heal animation
//public void HealAnimation()
//{
// EmitSignalHealed();
// var tween = GetTree().CreateTween();
// tween.TweenProperty(this, "scale", new Vector2(0.6f, 1.4f), 0.15);
// tween.TweenProperty(this, "scale", new Vector2(1, 1), 0.4)
// .SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
//}
public void SpawnDamageIndicatorNumber(int number)
{ {
UpdateHealthBarVisuals(); _fighterDamageIndicatorVisual.SpawnFlyingNumber(number);
var tween = GetTree().CreateTween();
tween.TweenProperty(_squashParent, "scale", new Vector2(0.6f, 1.4f), 0.15);
tween.TweenProperty(_squashParent, "scale", new Vector2(1, 1), 0.4)
.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
await ToSignal(tween, "finished");
}
public void SpawnDamageIndicatorNumber(string text)
{
_fighterDamageIndicatorVisual.SpawnFlyingNumber(text);
} }
} }
@@ -9,15 +9,9 @@ public partial class SwitchSceneOnFightEnd : Node
public void OnFightStateEnter(FightHappening.FightState to) public void OnFightStateEnter(FightHappening.FightState to)
{ {
if (to is FightHappening.FightState.PlayerWin ) if (to is FightHappening.FightState.PlayerWin
or FightHappening.FightState.EnemyWin)
_ = SwitchSceneAfterTime(2.0f); _ = SwitchSceneAfterTime(2.0f);
if (to is FightHappening.FightState.EnemyWin)
{
_fightSceneSwitcher.ExitFight();
_fightSceneSwitcher.ExitFightWorld();
}
} }
private async Task SwitchSceneAfterTime(float seconds) private async Task SwitchSceneAfterTime(float seconds)
@@ -1,15 +0,0 @@
using Babushka.scripts.CSharp.Common.Inventory;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight.UI;
public partial class HealButtonVisual : Button
{
[Export] private ItemResource _healItemBlueprint = null!;
public void UpdateText()
{
var healItemsLeft = InventoryManager.Instance.playerInventory!.TotalItemsOfBlueprint(_healItemBlueprint);
Text = $"x{healItemsLeft} - Heal";
}
}
@@ -1 +0,0 @@
uid://71mdwp2m4rta
@@ -1,17 +0,0 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class UsedItemIndicatorVisual : Node2D
{
[Export] private PackedScene _flyingIndicatorPrefab = null!;
[Export] private Texture2D _itemTexture = null!;
public void SpawnIndicator()
{
var flyingNumberInstance = _flyingIndicatorPrefab.Instantiate<FlyingIndicator>();
AddChild(flyingNumberInstance);
flyingNumberInstance.Initialize(icon: _itemTexture);
}
}
@@ -1 +0,0 @@
uid://6nniwfxye8ss
@@ -101,8 +101,7 @@ public partial class InventoryInstance : Node, ISaveable
return InventoryActionResult.DestinationFull; return InventoryActionResult.DestinationFull;
} }
var itemInstance = _slots[slotIndex].itemInstance ?? var itemInstance = _slots[slotIndex].itemInstance ?? new ItemInstance { blueprint = newItem.blueprint, amount = 0 };
new ItemInstance { blueprint = newItem.blueprint, amount = 0 };
var maxStack = itemInstance!.blueprint.maxStack; var maxStack = itemInstance!.blueprint.maxStack;
var freeOnStack = maxStack - itemInstance.amount; var freeOnStack = maxStack - itemInstance.amount;
var moveAmount = Math.Min(freeOnStack, newItem.amount); var moveAmount = Math.Min(freeOnStack, newItem.amount);
@@ -134,7 +133,7 @@ public partial class InventoryInstance : Node, ISaveable
itemInstance.amount -= 1; itemInstance.amount -= 1;
if (itemInstance.amount == 0) if(itemInstance.amount == 0)
_slots[inventorySlot].itemInstance = null; _slots[inventorySlot].itemInstance = null;
EmitSignal(SignalName.InventoryContentsChanged); EmitSignal(SignalName.InventoryContentsChanged);
@@ -146,38 +145,6 @@ public partial class InventoryInstance : Node, ISaveable
return RemoveItem(inventorySlot, out _); return RemoveItem(inventorySlot, out _);
} }
public InventoryActionResult TryRemoveAllItems(ItemInstance items)
{
var hasItemsCount = TotalItemsOfBlueprint(items.blueprint);
if (hasItemsCount < items.amount)
return InventoryActionResult.SourceDoesNotExist;
var amountToRemove = items.amount;
foreach (var s in _slots)
{
if (s.IsEmpty() || s.itemInstance!.blueprint != items.blueprint)
continue;
var slotItem = s.itemInstance!;
if (slotItem.amount <= amountToRemove)
{
amountToRemove -= slotItem.amount;
s.itemInstance = null;
}
else
{
slotItem.amount -= amountToRemove;
amountToRemove = 0;
}
if (amountToRemove == 0)
break;
}
EmitSignal(SignalName.InventoryContentsChanged);
return InventoryActionResult.Success;
}
public InventoryActionResult AddItemToSlot(ItemInstance itemInstance, int destinationSlot) public InventoryActionResult AddItemToSlot(ItemInstance itemInstance, int destinationSlot)
{ {
if (destinationSlot < 0 || destinationSlot >= _slots.Count) if (destinationSlot < 0 || destinationSlot >= _slots.Count)
@@ -222,7 +189,7 @@ public partial class InventoryInstance : Node, ISaveable
string[] value = new string[2]; string[] value = new string[2];
value[0] = _slots[i].itemInstance.blueprint.ResourcePath; value[0] = _slots[i].itemInstance.blueprint.ResourcePath;
value[1] = _slots[i].itemInstance.amount.ToString(); value[1] = _slots[i].itemInstance.amount.ToString();
payloadData.Add(key, value); payloadData.Add(key,value);
} }
} }
@@ -263,6 +230,5 @@ public partial class InventoryInstance : Node, ISaveable
slot.itemInstance = null; slot.itemInstance = null;
} }
} }
#endregion #endregion
} }
@@ -1,15 +1,12 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Godot; using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.Common.Inventory; namespace Babushka.scripts.CSharp.Common.Inventory;
// Do not instantiate this resource // Do not instantiate this resource
// But it has to be a resource because Godot // But it has to be a resource because Godot
[GlobalClass] [GlobalClass]
public partial class ItemInstance : Resource, IJsonSerializable public partial class ItemInstance: Resource
{ {
[Export] public required ItemResource blueprint; [Export] public ItemResource blueprint;
[Export] public int amount = 1; [Export] public int amount = 1;
public ItemInstance Clone() public ItemInstance Clone()
@@ -20,18 +17,4 @@ public partial class ItemInstance : Resource, IJsonSerializable
amount = amount amount = amount
}; };
} }
public void LoadFromJson(JObject json)
{
var blueprintPath = json.GetStringValue("blueprint");
blueprint = GD.Load<ItemResource>(blueprintPath);
amount = json.GetIntValue("amount");
}
public JObject SaveToJson()
{
return new(
new JProperty("blueprint", blueprint.ResourcePath),
new JProperty("amount", amount));
}
} }
@@ -1,16 +1,20 @@
using Babushka.scripts.CSharp.Common.Savegame; using Babushka.scripts.CSharp.Common.Savegame;
using Babushka.scripts.CSharp.GameEntity.Entities;
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Godot; using Godot;
using Godot.Collections; using Godot.Collections;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.Common.Inventory; namespace Babushka.scripts.CSharp.Common.Inventory;
public partial class ItemOnGround2D : PositionalEntity public partial class ItemOnGround2D : Node, ISaveable
{ {
private ItemInstance _itemInstance; private ItemInstance _itemInstance;
[Export] public bool IsActive = true;
[Export] private bool _infiniteSupply = false;
[Export] private int _finiteSupply = 1;
[Export] private bool _saveToDisk = true;
private int pickUpCounter = 0;
[Signal] public delegate void SuccessfulPickUpEventHandler(); [Signal] public delegate void SuccessfulPickUpEventHandler();
@@ -30,12 +34,16 @@ public partial class ItemOnGround2D : PositionalEntity
public override void _Ready() public override void _Ready()
{ {
LoadFromSaveData();
UpdateVisuals(); UpdateVisuals();
_pickupErrorLabel.Text = ""; _pickupErrorLabel.Text = "";
} }
public void TryPickUp() public void TryPickUp()
{ {
if (!IsActive)
return;
var result = InventoryManager.Instance.CollectItem(itemInstance.Clone()); var result = InventoryManager.Instance.CollectItem(itemInstance.Clone());
EmitSignal(SignalName.SuccessfulPickUp); EmitSignal(SignalName.SuccessfulPickUp);
if (result == InventoryActionResult.Success) if (result == InventoryActionResult.Success)
@@ -50,7 +58,16 @@ public partial class ItemOnGround2D : PositionalEntity
private void Pickup() private void Pickup()
{ {
// remove from entity manager if (!_infiniteSupply)
{
pickUpCounter++;
if (pickUpCounter >= _finiteSupply)
{
QueueFree();
}
UpdateSaveData();
}
} }
private void FailToPickup() private void FailToPickup()
@@ -63,6 +80,9 @@ public partial class ItemOnGround2D : PositionalEntity
public void UpdateVisuals() public void UpdateVisuals()
{ {
if (!IsActive)
return;
_iconSprite.Texture = itemInstance?.blueprint?.icon; _iconSprite.Texture = itemInstance?.blueprint?.icon;
if (_iconSprite.Texture == null) if (_iconSprite.Texture == null)
{ {
@@ -74,20 +94,7 @@ public partial class ItemOnGround2D : PositionalEntity
} }
} }
protected override void LoadEntity(JObject json) // todo: What do we do with instances that are created at runtime?
{
base.LoadEntity(json);
_itemInstance.LoadFromJson(json.GetObject("item"));
}
protected override void SaveEntity(JObject json)
{
base.SaveEntity(json);
json["item"] = _itemInstance.SaveToJson();
}
// old save
/*
public void UpdateSaveData() public void UpdateSaveData()
{ {
if (!_saveToDisk) if (!_saveToDisk)
@@ -150,5 +157,5 @@ public partial class ItemOnGround2D : PositionalEntity
} }
} }
} }
}*/ }
} }
@@ -1,6 +1,4 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave; using Godot;
using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.Common.Inventory; namespace Babushka.scripts.CSharp.Common.Inventory;
@@ -1,23 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Babushka.scripts.CSharp.GameEntity.Types;
using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.Entities;
public partial class Entity : Node2D
{
private long _id;
protected virtual EntityType Type => EntityType.None;
protected virtual void SaveEntity(JObject json)
{
json["id"] = _id;
json["type"] = (int)Type;
}
protected virtual void LoadEntity(JObject json)
{
_id = json.GetLongValue("id");
}
}
@@ -1 +0,0 @@
uid://hnmpt23ovfgl
@@ -1,27 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.Entities;
public partial class PositionalEntity : Entity
{
public string sceneName = "none";
protected override void SaveEntity(JObject json)
{
base.SaveEntity(json);
json["posx"] = Position.X;
json["posy"] = Position.Y;
json["scene"] = sceneName;
}
protected override void LoadEntity(JObject json)
{
base.LoadEntity(json);
Position = new Vector2(
json.GetFloatValue("posx"),
json.GetFloatValue("posy"));
sceneName = json.GetStringValue("scene");
}
}
@@ -1 +0,0 @@
uid://bs38dulqv7sop
@@ -1,44 +0,0 @@
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.LoadSave;
public static class EntityLoadSaveUtil
{
private static void AssertTokenType(this JObject json, string key, JTokenType type)
{
var token = json[key];
if (token == null) throw new MalformedJsonException(json, key, "does not exist");
if (!token.HasValues) throw new MalformedJsonException(json, key, "has no value");
if (token.Type != type) throw new MalformedJsonException(json, key, $"is not of type {type}");
}
public static long GetLongValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Integer);
return json.Value<long>(key);
}
public static int GetIntValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Integer);
return json.Value<int>(key);
}
public static float GetFloatValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Float);
return json.Value<float>(key);
}
public static JObject GetObject(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Object);
return json.Value<JObject>(key)!;
}
public static string GetStringValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.String);
return json.Value<string>(key)!;
}
}
@@ -1 +0,0 @@
uid://ccu6p418viliu
@@ -1,9 +0,0 @@
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.LoadSave;
public interface IJsonSerializable
{
public void LoadFromJson(JObject json);
public JObject SaveToJson();
}
@@ -1 +0,0 @@
uid://cuma3347l55mb
@@ -1,12 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.LoadSave;
public class MalformedJsonException(JObject actualJson, string key, string problem) : Exception
{
public override string Message => $"JsonObject was malformed: {key} {problem}";
public override IDictionary Data => new Dictionary<string, JObject> { { "json", actualJson } };
}
@@ -1 +0,0 @@
uid://d1o066hh84ow
@@ -1,59 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Babushka.scripts.CSharp.GameEntity.Types;
using Godot;
using Entity = Babushka.scripts.CSharp.GameEntity.Entities.Entity;
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public partial class EntityManager : Node
{
[Export] private EntityNodeCreator _nodeCreator = null!;
private EntitySceneManager? _currentEntitySceneManager;
private readonly List<Entity> _allEntities = new();
public IEnumerable<Entity> AllEntities => _allEntities;
public IEnumerable<PositionalEntity> AllPositionalEntities => _allEntities.OfType<PositionalEntity>();
public T NewPositionalEntity<T>(EntityType type, Vector2 position, string? scene = null) where T : PositionalEntity
{
if (scene == null)
{
if (_currentEntitySceneManager == null)
throw new Exception("No current scene. Specify scene to spawn an entity");
scene = _currentEntitySceneManager.sceneName;
}
var newEntity = _nodeCreator.Create<T>(type);
newEntity.Position = position;
newEntity.sceneName = scene;
_allEntities.Add(newEntity);
_currentEntitySceneManager.AddIfNeeded(newEntity);
return newEntity;
}
public void UnloadScene()
{
if (_currentEntitySceneManager == null) return;
_currentEntitySceneManager.RemoveAllEntities();
_currentEntitySceneManager = null;
}
public void LoadScene(EntitySceneManager sceneManager)
{
_currentEntitySceneManager = sceneManager;
foreach (var entity in AllPositionalEntities)
{
_currentEntitySceneManager.AddIfNeeded(entity);
}
}
}
@@ -1 +0,0 @@
uid://umop2b1m1qm8
@@ -1,14 +0,0 @@
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public static class EntityManagerUtil
{
public static void AddIfNeeded(this EntitySceneManager? self, PositionalEntity entity)
{
if(self == null) return;
if(self.sceneName != entity.sceneName) return;
self.AddEntity(entity);
}
}
@@ -1 +0,0 @@
uid://dc3283h7sx4cl
@@ -1,16 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.Types;
using Godot;
using Godot.Collections;
using Entity = Babushka.scripts.CSharp.GameEntity.Entities.Entity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public partial class EntityNodeCreator : Node
{
[Export] private Dictionary<EntityType, PackedScene> _entityPrefabs;
public T Create<T>(EntityType type) where T:Entity
{
return _entityPrefabs[type].Instantiate<T>();
}
}
@@ -1 +0,0 @@
uid://bogqp274y1pgr
@@ -1,25 +0,0 @@
using Godot;
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public partial class EntitySceneManager : Node2D
{
[Export] public string sceneName = "none";
public void AddEntity(PositionalEntity entity)
{
AddChild(entity);
}
public void RemoveAllEntities()
{
foreach (var entity in GetChildren())
{
if (entity is PositionalEntity positionalEntity)
{
RemoveChild(entity);
}
}
}
}
@@ -1 +0,0 @@
uid://ca1pg6k3gn47y
@@ -1,7 +0,0 @@
namespace Babushka.scripts.CSharp.GameEntity.Types;
public enum EntityType
{
None = 0,
Yeli = 1,
}
@@ -1 +0,0 @@
uid://cjygyr4lc224m
-16
View File
@@ -1,16 +0,0 @@
using System.Threading.Tasks;
namespace Babushka.scripts.CSharp.mock;
public static class DialogicStarter
{
public static async Task Dialog(string dialog)
{
// implement
}
public static void SetValue(string key, int value)
{
// implement
}
}
-12
View File
@@ -1,12 +0,0 @@
namespace Babushka.scripts.CSharp.mock;
public static class ObjectLookup
{
// Referenzen werden bei startup gesetzt
// Quests
public static PotatoQuest potatoQuest;
// NPCs
public static YeliNpc yeliNpc;
}
-31
View File
@@ -1,31 +0,0 @@
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.GameEntity.Entities;
using Godot;
namespace Babushka.scripts.CSharp.mock;
public partial class PotatoQuest:Node
{
// Yeli will 5 kartoffeln haben.
// Man kann Yeli auch erstmal weniger geben.
// Yeli sagt dir dann, wie viele kartoffeln noch fehlen.
public enum State
{
Unavailable, // bevor die quest verfügbar ist
YeliRequest, // Yeli fragt nach kartoffeln
BringPotato, // Vesna soll kartoffeln bringen
Done // kartoffeln abgegeben
}
public State state = State.Unavailable;
public int potatoesWanted = 5;
public int potatoesBrought = 0;
public ItemResource itemBlueprint; // potato item
public void Activate() // wird von woanders aufgerufen
{
if (state == State.Unavailable)
state = State.YeliRequest;
}
}
-1
View File
@@ -1 +0,0 @@
uid://dpl5xeuiu7cwg
-66
View File
@@ -1,66 +0,0 @@
using System;
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.NPC;
using Godot;
namespace Babushka.scripts.CSharp.mock;
// Dieses script enthält ALLE möglichen dialogoptionen die Yeli in der gesamten Demo hat.
// Das script ist dafür verantwortlich den richtigen Dialog zu starten.
public partial class YeliDialog : Node
{
public async void StartDialog() // kann zu jedem zeitpunkt vom spieler getriggert werden
{
var potato = ObjectLookup.potatoQuest;
var yeli = ObjectLookup.yeliNpc;
var inventory = InventoryManager.Instance.playerInventory!;
if (yeli.isSleeping) // wenn yeli schläft kann keine quest von ihr angenommen werden, auch wenn die quest verfügbar ist
{
await DialogicStarter.Dialog("YeliSleep"); // "ZZZ"
}
else if (potato.state == PotatoQuest.State.YeliRequest)
{
await DialogicStarter.Dialog("YeliAskForPotato"); // "Can you bring me 5 potatoes?"
potato.state = PotatoQuest.State.BringPotato;
}
else if (potato.state == PotatoQuest.State.BringPotato)
{
var potatoesTodo = potato.potatoesWanted - potato.potatoesBrought;
var potatoesAvailable = inventory.TotalItemsOfBlueprint(potato.itemBlueprint);
var takePotatoes = Math.Min(potatoesTodo, potatoesAvailable);
inventory.TryRemoveAllItems(new ItemInstance
{ blueprint = potato.itemBlueprint, amount = takePotatoes }); // should not fail
potato.potatoesWanted -= takePotatoes;
potatoesTodo = potato.potatoesWanted - potato.potatoesBrought;
var isComplete = potatoesTodo <= 0;
var wasSomeDelivered = takePotatoes > 0;
if (isComplete)
{
await DialogicStarter.Dialog("YeliPotatoThankYou"); // "thanks for bringing me all the potatoes"
potato.state = PotatoQuest.State.Done;
}
else
{
DialogicStarter.SetValue("potatoes", potatoesTodo); // setzt die Dialogic variable
if (wasSomeDelivered)
{
await DialogicStarter.Dialog("YeliPotatoThanksButMore"); // "thank you but i need {potatoes} more potatoes"
}
else
{
await DialogicStarter.Dialog("YeliPotatoMore"); // "I still need {potatoes} more potatoes"
}
}
}
else
{
await DialogicStarter.Dialog("YeliDefault"); // "I'm happy to have you around" oder so
}
}
}
-1
View File
@@ -1 +0,0 @@
uid://ssob0ssvbskx
-9
View File
@@ -1,9 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.Entities;
namespace Babushka.scripts.CSharp.mock;
public partial class YeliNpc : Entity
{
public bool isSleeping = false;
}