Compare commits
8 Commits
inventory
...
3e135afecb
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e135afecb | |||
| 25d8f217ff | |||
| a477f9ef4f | |||
| b917fb5fbd | |||
| 47a1326292 | |||
| 708aa8cca4 | |||
| 83f4144b43 | |||
| 2c677a8cda |
Binary file not shown.
|
After Width: | Height: | Size: 342 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://x7trh4dgsvoe"
|
||||||
|
path="res://.godot/imported/Room_01_assets.png-a76e862e33a0509707d91703ef954a0e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/indoor/room export/Room_01_assets.png"
|
||||||
|
dest_files=["res://.godot/imported/Room_01_assets.png-a76e862e33a0509707d91703ef954a0e.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bys8kq256upf3"
|
||||||
|
path="res://.godot/imported/Trailer01.png-842d74a7fec27e03c3c9d254faa21eca.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/ui/StartScreen/Trailer01.png"
|
||||||
|
dest_files=["res://.godot/imported/Trailer01.png-842d74a7fec27e03c3c9d254faa21eca.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cd8tjne45s1iv"
|
||||||
|
path="res://.godot/imported/Trailer02.png-915f2e550746578b919d1043d5553656.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/ui/StartScreen/Trailer02.png"
|
||||||
|
dest_files=["res://.godot/imported/Trailer02.png-915f2e550746578b919d1043d5553656.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dqvhkel0vf00g"
|
||||||
|
path="res://.godot/imported/Trailer03.png-9fddd078892d9676391a7d15c43ab03c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/ui/StartScreen/Trailer03.png"
|
||||||
|
dest_files=["res://.godot/imported/Trailer03.png-9fddd078892d9676391a7d15c43ab03c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://chqgwovag6cuv"
|
||||||
|
path="res://.godot/imported/Trailer04.png-59db3722346dcfe85046a96ab5fd054d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/ui/StartScreen/Trailer04.png"
|
||||||
|
dest_files=["res://.godot/imported/Trailer04.png-59db3722346dcfe85046a96ab5fd054d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -3496,17 +3496,18 @@ animations = [{
|
|||||||
"speed": 15.0
|
"speed": 15.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[node name="Player2d" type="Node2D" node_paths=PackedStringArray("_farmingControls")]
|
[node name="Player2d" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d")]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
script = ExtResource("1_yl84k")
|
script = ExtResource("1_yl84k")
|
||||||
_farmingControls = NodePath("FarmingControls")
|
_farmingControls = NodePath("FarmingControls")
|
||||||
|
_player2d = NodePath("CharacterBody2D")
|
||||||
|
|
||||||
[node name="CharacterBody2D" type="CharacterBody2D" parent="." node_paths=PackedStringArray("_sprite") groups=["PlantGrowing"]]
|
[node name="CharacterBody2D" type="CharacterBody2D" parent="." node_paths=PackedStringArray("_sprite") groups=["PlantGrowing"]]
|
||||||
position = Vector2(0, 374)
|
position = Vector2(0, 374)
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
script = ExtResource("1_ssqtd")
|
script = ExtResource("1_ssqtd")
|
||||||
_speed = 500.0
|
_speed = 1500.0
|
||||||
_sprite = NodePath("visuals/Animated Sprites")
|
_sprite = NodePath("visuals/Animated Sprites")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
[gd_scene load_steps=11 format=3 uid="uid://cgjc4wurbgimy"]
|
[gd_scene load_steps=6 format=3 uid="uid://cgjc4wurbgimy"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://hg7jay2kt441" path="res://scripts/CSharp/Common/Inventory/InventoryUi.cs" id="1_6wusm"]
|
[ext_resource type="Script" uid="uid://hg7jay2kt441" path="res://scripts/CSharp/Common/Inventory/InventoryUi.cs" id="1_6wusm"]
|
||||||
[ext_resource type="Script" uid="uid://b2jhdxcrhtm2d" path="res://scripts/CSharp/Common/Inventory/InventoryTestScript.cs" id="3_exrk4"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://3ln8aleyxgp1" path="res://art/ui/UI/UI_bag_export_01.png" id="3_vvo7l"]
|
[ext_resource type="Texture2D" uid="uid://3ln8aleyxgp1" path="res://art/ui/UI/UI_bag_export_01.png" id="3_vvo7l"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dcidjcsqk12p1" path="res://art/ui/UI/UI_bag_export_02.png" id="4_df8i8"]
|
[ext_resource type="Texture2D" uid="uid://dcidjcsqk12p1" path="res://art/ui/UI/UI_bag_export_02.png" id="4_df8i8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c7wqla0mbu3np" path="res://art/ui/babushka_ui_tmp_inventory_select.png" id="4_tiss4"]
|
[ext_resource type="Texture2D" uid="uid://c7wqla0mbu3np" path="res://art/ui/babushka_ui_tmp_inventory_select.png" id="4_tiss4"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c0kmdjeqkqrwv" path="res://prefabs/UI/Inventory/Slot.tscn" id="5_u7kje"]
|
[ext_resource type="PackedScene" uid="uid://c0kmdjeqkqrwv" path="res://prefabs/UI/Inventory/Slot.tscn" id="5_u7kje"]
|
||||||
[ext_resource type="Resource" uid="uid://blr8tine5m0ma" path="res://resources/items/tomato.tres" id="7_l3npx"]
|
|
||||||
[ext_resource type="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="7_vvo7l"]
|
|
||||||
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="8_nw1un"]
|
|
||||||
[ext_resource type="Resource" uid="uid://c7viddcd3kywp" path="res://resources/items/axe.tres" id="10_o7h8q"]
|
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer"]
|
[node name="CanvasLayer" type="CanvasLayer"]
|
||||||
layer = 90
|
layer = 90
|
||||||
@@ -370,7 +365,3 @@ offset_left = 703.0
|
|||||||
offset_top = 512.0
|
offset_top = 512.0
|
||||||
offset_right = 803.0
|
offset_right = 803.0
|
||||||
offset_bottom = 612.0
|
offset_bottom = 612.0
|
||||||
|
|
||||||
[node name="InventoryTester" type="Node" parent="Inventory"]
|
|
||||||
script = ExtResource("3_exrk4")
|
|
||||||
_testItemsToCreate = Array[Object]([ExtResource("7_l3npx"), ExtResource("7_l3npx"), ExtResource("8_nw1un"), ExtResource("7_vvo7l"), ExtResource("10_o7h8q"), ExtResource("7_l3npx"), ExtResource("8_nw1un"), ExtResource("8_nw1un"), ExtResource("8_nw1un"), ExtResource("8_nw1un"), ExtResource("7_vvo7l")])
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ offset_bottom = -10.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
texture = ExtResource("3_n5ryf")
|
texture = ExtResource("3_n5ryf")
|
||||||
expand_mode = 1
|
expand_mode = 4
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://c3hwbwo423nbm"]
|
[gd_scene load_steps=11 format=3 uid="uid://c3hwbwo423nbm"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cms357f23fmfy" path="res://scripts/CSharp/Common/Farming/PlantBehaviour2D.cs" id="1_tikj4"]
|
[ext_resource type="Script" uid="uid://cms357f23fmfy" path="res://scripts/CSharp/Common/Farming/PlantBehaviour2D.cs" id="1_tikj4"]
|
||||||
[ext_resource type="Shader" uid="uid://braevmqauoek7" path="res://prefabs/farm/swaying_plant.gdshader" id="2_goh03"]
|
[ext_resource type="Shader" uid="uid://braevmqauoek7" path="res://prefabs/farm/swaying_plant.gdshader" id="2_goh03"]
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://b2gu6ur2xc7s4" path="res://art/farm/farming/farmobjekte/tomaten/tomaten blume.png" id="3_goh03"]
|
[ext_resource type="Texture2D" uid="uid://b2gu6ur2xc7s4" path="res://art/farm/farming/farmobjekte/tomaten/tomaten blume.png" id="3_goh03"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cnwd3mb3jnuxm" path="res://art/farm/farming/farmobjekte/tomaten/teen adulte tomaten.png" id="4_u4cty"]
|
[ext_resource type="Texture2D" uid="uid://cnwd3mb3jnuxm" path="res://art/farm/farming/farmobjekte/tomaten/teen adulte tomaten.png" id="4_u4cty"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interaction_area_2d.tscn" id="5_tikj4"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interaction_area_2d.tscn" id="5_tikj4"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="6_u4cty"]
|
||||||
|
[ext_resource type="Resource" uid="uid://blr8tine5m0ma" path="res://resources/items/tomato.tres" id="7_yntkb"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u4cty"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u4cty"]
|
||||||
shader = ExtResource("2_goh03")
|
shader = ExtResource("2_goh03")
|
||||||
@@ -19,12 +21,17 @@ shader_parameter/distortion = 0.0
|
|||||||
shader_parameter/heightOffset = 0.635
|
shader_parameter/heightOffset = 0.635
|
||||||
shader_parameter/offset = 0.0
|
shader_parameter/offset = 0.0
|
||||||
|
|
||||||
[node name="BasePlant" type="Node2D" node_paths=PackedStringArray("_seeds", "_smallPlants", "_bigPlants", "_readyPlants")]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2tt5u"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
radius = 300.0
|
||||||
|
|
||||||
|
[node name="BasePlant" type="Node2D" node_paths=PackedStringArray("_seeds", "_smallPlants", "_bigPlants", "_readyPlants", "_harvestablePlant")]
|
||||||
script = ExtResource("1_tikj4")
|
script = ExtResource("1_tikj4")
|
||||||
_seeds = [NodePath("Seeds/TomatoSeed"), NodePath("Seeds/TomatoSeed2"), NodePath("Seeds/TomatoSeed3")]
|
_seeds = [NodePath("Seeds/TomatoSeed"), NodePath("Seeds/TomatoSeed2"), NodePath("Seeds/TomatoSeed3")]
|
||||||
_smallPlants = [NodePath("SmallPlant/01"), NodePath("SmallPlant/02"), NodePath("SmallPlant/03"), NodePath("SmallPlant/04")]
|
_smallPlants = [NodePath("SmallPlant/01"), NodePath("SmallPlant/02"), NodePath("SmallPlant/03"), NodePath("SmallPlant/04")]
|
||||||
_bigPlants = [NodePath("BigPlant/01"), NodePath("BigPlant/02"), NodePath("BigPlant/03"), NodePath("BigPlant/04")]
|
_bigPlants = [NodePath("BigPlant/01"), NodePath("BigPlant/02"), NodePath("BigPlant/03"), NodePath("BigPlant/04")]
|
||||||
_readyPlants = [NodePath("ReadyPlant/01"), NodePath("ReadyPlant/02"), NodePath("ReadyPlant/03"), NodePath("ReadyPlant/04")]
|
_readyPlants = [NodePath("ReadyPlantInventoryItem/ReadyPlant/01"), NodePath("ReadyPlantInventoryItem/ReadyPlant/02"), NodePath("ReadyPlantInventoryItem/ReadyPlant/03"), NodePath("ReadyPlantInventoryItem/ReadyPlant/04")]
|
||||||
|
_harvestablePlant = NodePath("ReadyPlantInventoryItem")
|
||||||
|
|
||||||
[node name="Seeds" type="Node2D" parent="."]
|
[node name="Seeds" type="Node2D" parent="."]
|
||||||
position = Vector2(0, 0.5)
|
position = Vector2(0, 0.5)
|
||||||
@@ -126,10 +133,31 @@ texture = ExtResource("3_goh03")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(546, 697, 535, 687)
|
region_rect = Rect2(546, 697, 535, 687)
|
||||||
|
|
||||||
[node name="ReadyPlant" type="Node2D" parent="."]
|
[node name="InteractionArea" parent="." instance=ExtResource("5_tikj4")]
|
||||||
position = Vector2(0, 2.3)
|
position = Vector2(0, 2.3)
|
||||||
|
|
||||||
[node name="01" type="Sprite2D" parent="ReadyPlant"]
|
[node name="ReadyPlantInventoryItem" parent="." instance=ExtResource("6_u4cty")]
|
||||||
|
position = Vector2(0, 2.3)
|
||||||
|
IsActive = false
|
||||||
|
|
||||||
|
[node name="SpawnWithItem" parent="ReadyPlantInventoryItem" index="0"]
|
||||||
|
_blueprint = ExtResource("7_yntkb")
|
||||||
|
|
||||||
|
[node name="ItemLabel" parent="ReadyPlantInventoryItem" index="1"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="PickupErrorLabel" parent="ReadyPlantInventoryItem" index="2"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" parent="ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
|
||||||
|
shape = SubResource("CircleShape2D_2tt5u")
|
||||||
|
|
||||||
|
[node name="Icon" parent="ReadyPlantInventoryItem" index="4"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="ReadyPlant" type="Node2D" parent="ReadyPlantInventoryItem"]
|
||||||
|
|
||||||
|
[node name="01" type="Sprite2D" parent="ReadyPlantInventoryItem/ReadyPlant"]
|
||||||
visible = false
|
visible = false
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
material = SubResource("ShaderMaterial_u4cty")
|
material = SubResource("ShaderMaterial_u4cty")
|
||||||
@@ -137,7 +165,7 @@ texture = ExtResource("4_u4cty")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(399, 3, 679, 808)
|
region_rect = Rect2(399, 3, 679, 808)
|
||||||
|
|
||||||
[node name="02" type="Sprite2D" parent="ReadyPlant"]
|
[node name="02" type="Sprite2D" parent="ReadyPlantInventoryItem/ReadyPlant"]
|
||||||
visible = false
|
visible = false
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
material = SubResource("ShaderMaterial_u4cty")
|
material = SubResource("ShaderMaterial_u4cty")
|
||||||
@@ -145,7 +173,7 @@ texture = ExtResource("4_u4cty")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(1077, 109, 633, 695)
|
region_rect = Rect2(1077, 109, 633, 695)
|
||||||
|
|
||||||
[node name="03" type="Sprite2D" parent="ReadyPlant"]
|
[node name="03" type="Sprite2D" parent="ReadyPlantInventoryItem/ReadyPlant"]
|
||||||
visible = false
|
visible = false
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
material = SubResource("ShaderMaterial_u4cty")
|
material = SubResource("ShaderMaterial_u4cty")
|
||||||
@@ -153,7 +181,7 @@ texture = ExtResource("4_u4cty")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(415, 838, 639, 817)
|
region_rect = Rect2(415, 838, 639, 817)
|
||||||
|
|
||||||
[node name="04" type="Sprite2D" parent="ReadyPlant"]
|
[node name="04" type="Sprite2D" parent="ReadyPlantInventoryItem/ReadyPlant"]
|
||||||
visible = false
|
visible = false
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
material = SubResource("ShaderMaterial_u4cty")
|
material = SubResource("ShaderMaterial_u4cty")
|
||||||
@@ -161,7 +189,7 @@ texture = ExtResource("4_u4cty")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(1167, 863, 528, 785)
|
region_rect = Rect2(1167, 863, 528, 785)
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." instance=ExtResource("5_tikj4")]
|
|
||||||
position = Vector2(0, 2.3)
|
|
||||||
|
|
||||||
[connection signal="Interacted" from="InteractionArea" to="." method="Grow"]
|
[connection signal="Interacted" from="InteractionArea" to="." method="Grow"]
|
||||||
|
|
||||||
|
[editable path="ReadyPlantInventoryItem"]
|
||||||
|
[editable path="ReadyPlantInventoryItem/InteractionArea2"]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
[ext_resource type="Script" uid="uid://udhigottc8rg" path="res://scripts/CSharp/Common/Inventory/ItemOnGround.cs" id="1_mnomu"]
|
[ext_resource type="Script" uid="uid://udhigottc8rg" path="res://scripts/CSharp/Common/Inventory/ItemOnGround.cs" id="1_mnomu"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://prefabs/interaction_area.tscn" id="2_ue6ub"]
|
[ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://prefabs/interaction_area.tscn" id="2_ue6ub"]
|
||||||
[ext_resource type="Script" uid="uid://c8suoi3i6kqai" path="res://scripts/CSharp/Common/Inventory/ItemOnGroundSpawnWith.cs" id="3_ue6ub"]
|
[ext_resource type="Script" uid="uid://c8suoi3i6kqai" path="res://scripts/CSharp/Common/Inventory/ItemOnGroundSpawnWith.cs" id="3_ue6ub"]
|
||||||
[ext_resource type="Resource" uid="uid://c7viddcd3kywp" path="res://resources/items/axe.tres" id="4_sfad0"]
|
[ext_resource type="Resource" uid="uid://c7viddcd3kywp" path="res://resources/items/shovel.tres" id="4_sfad0"]
|
||||||
|
|
||||||
[node name="GenericItemOnGround" type="Node3D"]
|
[node name="GenericItemOnGround" type="Node3D"]
|
||||||
script = ExtResource("1_mnomu")
|
script = ExtResource("1_mnomu")
|
||||||
|
|||||||
+7
-1
@@ -11,7 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Babushka"
|
config/name="Babushka"
|
||||||
run/main_scene="uid://gigb28qk8t12"
|
run/main_scene="uid://bopv10dqm1knc"
|
||||||
config/features=PackedStringArray("4.4", "C#", "Forward Plus")
|
config/features=PackedStringArray("4.4", "C#", "Forward Plus")
|
||||||
config/icon="uid://b2smanpdo1y5e"
|
config/icon="uid://b2smanpdo1y5e"
|
||||||
|
|
||||||
@@ -68,6 +68,8 @@ text/autopauses={}
|
|||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=1920
|
||||||
|
window/size/viewport_height=1080
|
||||||
window/size/always_on_top=true
|
window/size/always_on_top=true
|
||||||
window/stretch/mode="viewport"
|
window/stretch/mode="viewport"
|
||||||
window/stretch/aspect="keep_height"
|
window/stretch/aspect="keep_height"
|
||||||
@@ -179,3 +181,7 @@ locale/translations=PackedStringArray("res://dialog/translations/dialogic_charac
|
|||||||
2d_physics/layer_2="Background elements"
|
2d_physics/layer_2="Background elements"
|
||||||
2d_physics/layer_3="player"
|
2d_physics/layer_3="player"
|
||||||
3d_physics/layer_5="Player"
|
3d_physics/layer_5="Player"
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
viewport/hdr_2d=true
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemResource" load_steps=2 format=3 uid="uid://c7viddcd3kywp"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_t485b"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_t485b")
|
|
||||||
name = "Axe Deo"
|
|
||||||
color = Color(0.643898, 0.4587, 0.294335, 1)
|
|
||||||
maxStack = 1
|
|
||||||
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
|
||||||
@@ -1,12 +1,16 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemResource" load_steps=3 format=3 uid="uid://c5yg3lx756v4v"]
|
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://c5yg3lx756v4v"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_06nef"]
|
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_06nef"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cfxibry711o16" path="res://art/ui/UI/icons/icon-scythe.png" id="1_jd58x"]
|
[ext_resource type="Texture2D" uid="uid://3pj2q7wtuion" path="res://art/farm/farming/farmobjekte/hoe.png" id="1_jd58x"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i5wdx"]
|
||||||
|
atlas = ExtResource("1_jd58x")
|
||||||
|
region = Rect2(995, 190, 328, 1223)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_06nef")
|
script = ExtResource("1_06nef")
|
||||||
name = "Hoe"
|
name = "Hoe"
|
||||||
color = Color(0.751421, 0.329615, 0.570911, 1)
|
color = Color(0.751421, 0.329615, 0.570911, 1)
|
||||||
icon = ExtResource("1_jd58x")
|
icon = SubResource("AtlasTexture_i5wdx")
|
||||||
maxStack = 1
|
maxStack = 1
|
||||||
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemResource" load_steps=2 format=3 uid="uid://datee0flk1e84"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_07aya"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_07aya")
|
|
||||||
name = "Pick Axe"
|
|
||||||
color = Color(0.589014, 0.823353, 0.998475, 1)
|
|
||||||
maxStack = 1
|
|
||||||
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://dlcmqfjvgphqu"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c4ggew55w0icj" path="res://art/farm/farming/farmobjekte/harke.png" id="1_imv0i"]
|
||||||
|
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="2_jplkm"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i5wdx"]
|
||||||
|
atlas = ExtResource("1_imv0i")
|
||||||
|
region = Rect2(8, 10, 619, 771)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_jplkm")
|
||||||
|
name = "Hoe"
|
||||||
|
color = Color(0.751421, 0.329615, 0.570911, 1)
|
||||||
|
icon = SubResource("AtlasTexture_i5wdx")
|
||||||
|
maxStack = 1
|
||||||
|
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://datee0flk1e84"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://x8hr8287ff2n" path="res://art/farm/farming/farmobjekte/tools atlas.png" id="1_6rw6x"]
|
||||||
|
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="2_mfb7x"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3wroj"]
|
||||||
|
atlas = ExtResource("1_6rw6x")
|
||||||
|
region = Rect2(1049, 0, 550, 1332)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_mfb7x")
|
||||||
|
name = "rake"
|
||||||
|
color = Color(0.589014, 0.823353, 0.998475, 1)
|
||||||
|
icon = SubResource("AtlasTexture_3wroj")
|
||||||
|
maxStack = 1
|
||||||
|
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://c7viddcd3kywp"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://x8hr8287ff2n" path="res://art/farm/farming/farmobjekte/tools atlas.png" id="1_ih03p"]
|
||||||
|
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_t485b"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lo7on"]
|
||||||
|
atlas = ExtResource("1_ih03p")
|
||||||
|
region = Rect2(522, 139, 285, 1333)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_t485b")
|
||||||
|
name = "Shovel"
|
||||||
|
color = Color(0.424722, 0.266026, 0.108459, 1)
|
||||||
|
icon = SubResource("AtlasTexture_lo7on")
|
||||||
|
maxStack = 1
|
||||||
|
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://ocmg3fxkxugq"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cnwd3mb3jnuxm" path="res://art/farm/farming/farmobjekte/tomaten/teen adulte tomaten.png" id="1_bqfcn"]
|
||||||
|
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="2_sjbrh"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i5wdx"]
|
||||||
|
atlas = ExtResource("1_bqfcn")
|
||||||
|
region = Rect2(418, 854, 630, 794)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_sjbrh")
|
||||||
|
name = "Hoe"
|
||||||
|
color = Color(0.751421, 0.329615, 0.570911, 1)
|
||||||
|
icon = SubResource("AtlasTexture_i5wdx")
|
||||||
|
maxStack = 1
|
||||||
|
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
||||||
@@ -1,12 +1,16 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemResource" load_steps=3 format=3 uid="uid://cndd64batns31"]
|
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://cndd64batns31"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_8k5aa"]
|
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_8k5aa"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bh7oo5mypstyp" path="res://art/ui/UI/icons/icon-watercan.png" id="1_roi0v"]
|
[ext_resource type="Texture2D" uid="uid://x8hr8287ff2n" path="res://art/farm/farming/farmobjekte/tools atlas.png" id="1_roi0v"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tqw18"]
|
||||||
|
atlas = ExtResource("1_roi0v")
|
||||||
|
region = Rect2(-4, 1137, 428, 283)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_8k5aa")
|
script = ExtResource("1_8k5aa")
|
||||||
name = "Can"
|
name = "Can"
|
||||||
color = Color(0.336269, 0.489145, 0.825324, 1)
|
color = Color(0.336269, 0.489145, 0.825324, 1)
|
||||||
icon = ExtResource("1_roi0v")
|
icon = SubResource("AtlasTexture_tqw18")
|
||||||
maxStack = 1
|
maxStack = 1
|
||||||
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bopv10dqm1knc"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c6wnoif01ltld" path="res://scenes/Babushka_scene_startMenu.tscn" id="1_15ton"]
|
||||||
|
|
||||||
|
[node name="BabushkaSceneBootstrap" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="BabushkaSceneStartMenu" parent="." node_paths=PackedStringArray("_sceneInstanceParent") instance=ExtResource("1_15ton")]
|
||||||
|
_sceneInstanceParent = NodePath("../SceneParent")
|
||||||
|
|
||||||
|
[node name="SceneParent" type="Node" parent="."]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=58 format=3 uid="uid://gigb28qk8t12"]
|
[gd_scene load_steps=56 format=3 uid="uid://gigb28qk8t12"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/Player2D.tscn" id="1_7wfwe"]
|
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/Player2D.tscn" id="1_7wfwe"]
|
||||||
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
|
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://dg7rlugnq0t45" path="res://art/farm/farming/farmobjekte/brünnen.png" id="21_ualyd"]
|
[ext_resource type="Texture2D" uid="uid://dg7rlugnq0t45" path="res://art/farm/farming/farmobjekte/brünnen.png" id="21_ualyd"]
|
||||||
[ext_resource type="Script" uid="uid://dhxtdhfqx3bte" path="res://scripts/CSharp/Common/Farming/FieldService2D.cs" id="25_0qu0h"]
|
[ext_resource type="Script" uid="uid://dhxtdhfqx3bte" path="res://scripts/CSharp/Common/Farming/FieldService2D.cs" id="25_0qu0h"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="25_hukxv"]
|
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="25_hukxv"]
|
||||||
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/bucket.tres" id="26_2nee2"]
|
|
||||||
[ext_resource type="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="26_ipqaa"]
|
[ext_resource type="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="26_ipqaa"]
|
||||||
[ext_resource type="Resource" uid="uid://c7viddcd3kywp" path="res://resources/items/axe.tres" id="27_ipqaa"]
|
[ext_resource type="Resource" uid="uid://c7viddcd3kywp" path="res://resources/items/shovel.tres" id="27_ipqaa"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interaction_area_2d.tscn" id="27_klb81"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interaction_area_2d.tscn" id="27_klb81"]
|
||||||
[ext_resource type="PackedScene" path="res://prefabs/interactions/sprite_switcher_2d.tscn" id="28_p6n74"]
|
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="28_6b2nr"]
|
||||||
[ext_resource type="Texture2D" uid="uid://x8hr8287ff2n" path="res://art/farm/farming/farmobjekte/tools atlas.png" id="29_p6n74"]
|
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="28_ipqaa"]
|
||||||
|
[ext_resource type="Resource" uid="uid://datee0flk1e84" path="res://resources/items/scythe.tres" id="29_wtdui"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="32_2nee2"]
|
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="32_2nee2"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xy0kg"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xy0kg"]
|
||||||
@@ -125,15 +125,7 @@ size = Vector2(14208, 1176)
|
|||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_p6n74"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_p6n74"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
size = Vector2(7048, 1192)
|
size = Vector2(5415, 1192)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_kxdmn"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
radius = 300.0
|
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_hukxv"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
radius = 300.0
|
|
||||||
|
|
||||||
[node name="BabushkaSceneFarmOutside2d" type="Node2D"]
|
[node name="BabushkaSceneFarmOutside2d" type="Node2D"]
|
||||||
|
|
||||||
@@ -602,7 +594,6 @@ texture = SubResource("NoiseTexture2D_e5alv")
|
|||||||
[node name="Fence" type="Node2D" parent="."]
|
[node name="Fence" type="Node2D" parent="."]
|
||||||
|
|
||||||
[node name="Fence" type="Sprite2D" parent="Fence"]
|
[node name="Fence" type="Sprite2D" parent="Fence"]
|
||||||
visible = false
|
|
||||||
texture_repeat = 2
|
texture_repeat = 2
|
||||||
material = SubResource("ShaderMaterial_0sfl7")
|
material = SubResource("ShaderMaterial_0sfl7")
|
||||||
position = Vector2(5032, 1680)
|
position = Vector2(5032, 1680)
|
||||||
@@ -678,10 +669,12 @@ shape = SubResource("RectangleShape2D_klb81")
|
|||||||
z_index = 1
|
z_index = 1
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
|
||||||
[node name="Player2d" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")]
|
[node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
position = Vector2(1071, 2125)
|
position = Vector2(550, 2125)
|
||||||
_fieldParent = NodePath("../Farm visuals/FieldParent")
|
_fieldParent = NodePath("../Farm visuals/FieldParent")
|
||||||
|
_hoe = ExtResource("28_6b2nr")
|
||||||
|
_wateringCan = ExtResource("28_ipqaa")
|
||||||
|
|
||||||
[node name="Brünnen" type="Sprite2D" parent="YSorted"]
|
[node name="Brünnen" type="Sprite2D" parent="YSorted"]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
@@ -706,7 +699,7 @@ position = Vector2(80, -368)
|
|||||||
shape = SubResource("CircleShape2D_p6n74")
|
shape = SubResource("CircleShape2D_p6n74")
|
||||||
|
|
||||||
[node name="HoeGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
[node name="HoeGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||||
position = Vector2(4482, 1978)
|
position = Vector2(8234, 2076)
|
||||||
|
|
||||||
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("26_ipqaa")
|
_blueprint = ExtResource("26_ipqaa")
|
||||||
@@ -714,24 +707,42 @@ _blueprint = ExtResource("26_ipqaa")
|
|||||||
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/InteractionArea2/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_2nee2")
|
shape = SubResource("CircleShape2D_2nee2")
|
||||||
|
|
||||||
[node name="GenericPickupWithoutIcon" parent="YSorted" instance=ExtResource("25_hukxv")]
|
|
||||||
position = Vector2(3657, 1978)
|
|
||||||
|
|
||||||
[node name="SpawnWithItem" parent="YSorted/GenericPickupWithoutIcon" index="0"]
|
|
||||||
_blueprint = ExtResource("27_ipqaa")
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/GenericPickupWithoutIcon/InteractionArea2/Area2D" index="0"]
|
|
||||||
shape = SubResource("CircleShape2D_2nee2")
|
|
||||||
|
|
||||||
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||||
position = Vector2(2795, 2001)
|
position = Vector2(8841, 3496)
|
||||||
|
|
||||||
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
|
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
|
||||||
_blueprint = ExtResource("26_2nee2")
|
_blueprint = ExtResource("28_ipqaa")
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/InteractionArea2/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_ipqaa")
|
shape = SubResource("CircleShape2D_ipqaa")
|
||||||
|
|
||||||
|
[node name="RakeGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||||
|
position = Vector2(11091, 2060)
|
||||||
|
|
||||||
|
[node name="SpawnWithItem" parent="YSorted/RakeGenericPickup" index="0"]
|
||||||
|
_blueprint = ExtResource("28_6b2nr")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" parent="YSorted/RakeGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||||
|
shape = SubResource("CircleShape2D_ipqaa")
|
||||||
|
|
||||||
|
[node name="ScytheGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||||
|
position = Vector2(15642, 2158)
|
||||||
|
|
||||||
|
[node name="SpawnWithItem" parent="YSorted/ScytheGenericPickup" index="0"]
|
||||||
|
_blueprint = ExtResource("29_wtdui")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" parent="YSorted/ScytheGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||||
|
shape = SubResource("CircleShape2D_ipqaa")
|
||||||
|
|
||||||
|
[node name="ShovelGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||||
|
position = Vector2(7593, 2038)
|
||||||
|
|
||||||
|
[node name="SpawnWithItem" parent="YSorted/ShovelGenericPickup" index="0"]
|
||||||
|
_blueprint = ExtResource("27_ipqaa")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" parent="YSorted/ShovelGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||||
|
shape = SubResource("CircleShape2D_ipqaa")
|
||||||
|
|
||||||
[node name="Farm visuals" type="Node2D" parent="YSorted"]
|
[node name="Farm visuals" type="Node2D" parent="YSorted"]
|
||||||
position = Vector2(-60, 122)
|
position = Vector2(-60, 122)
|
||||||
|
|
||||||
@@ -763,53 +774,16 @@ metadata/_custom_type_script = "uid://dhxtdhfqx3bte"
|
|||||||
[node name="Area2D" type="Area2D" parent="YSorted/Farm visuals/FieldParent"]
|
[node name="Area2D" type="Area2D" parent="YSorted/Farm visuals/FieldParent"]
|
||||||
position = Vector2(-48, -16)
|
position = Vector2(-48, -16)
|
||||||
collision_mask = 5
|
collision_mask = 5
|
||||||
|
collision_priority = 10.0
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSorted/Farm visuals/FieldParent/Area2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSorted/Farm visuals/FieldParent/Area2D"]
|
||||||
position = Vector2(1536, 2964)
|
position = Vector2(1536, 2949)
|
||||||
shape = SubResource("RectangleShape2D_2nee2")
|
shape = SubResource("RectangleShape2D_2nee2")
|
||||||
|
|
||||||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="YSorted/Farm visuals/FieldParent/Area2D"]
|
[node name="CollisionShape2D2" type="CollisionShape2D" parent="YSorted/Farm visuals/FieldParent/Area2D"]
|
||||||
position = Vector2(13772, 2960)
|
position = Vector2(12955.5, 2960)
|
||||||
shape = SubResource("RectangleShape2D_p6n74")
|
shape = SubResource("RectangleShape2D_p6n74")
|
||||||
|
|
||||||
[node name="Hoe Pickup" parent="." node_paths=PackedStringArray("_sprites") instance=ExtResource("27_klb81")]
|
|
||||||
position = Vector2(7728, 2000)
|
|
||||||
rotation = 3.3074
|
|
||||||
_sprites = NodePath("SpriteSwitcher2d")
|
|
||||||
|
|
||||||
[node name="Area2D" parent="Hoe Pickup" index="0"]
|
|
||||||
collision_mask = 5
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="Hoe Pickup/Area2D" index="0"]
|
|
||||||
shape = SubResource("CircleShape2D_kxdmn")
|
|
||||||
|
|
||||||
[node name="SpriteSwitcher2d" parent="Hoe Pickup" instance=ExtResource("28_p6n74")]
|
|
||||||
scale = Vector2(0.5, 0.5)
|
|
||||||
|
|
||||||
[node name="Watercan Pickup" parent="." node_paths=PackedStringArray("_sprites") instance=ExtResource("27_klb81")]
|
|
||||||
position = Vector2(8400, 2024)
|
|
||||||
_sprites = NodePath("ActiveInactive")
|
|
||||||
_id = 1
|
|
||||||
|
|
||||||
[node name="Area2D" parent="Watercan Pickup" index="0"]
|
|
||||||
collision_mask = 5
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="Watercan Pickup/Area2D" index="0"]
|
|
||||||
shape = SubResource("CircleShape2D_hukxv")
|
|
||||||
|
|
||||||
[node name="Label" parent="Watercan Pickup" index="1"]
|
|
||||||
z_index = 1
|
|
||||||
|
|
||||||
[node name="ActiveInactive" parent="Watercan Pickup" instance=ExtResource("28_p6n74")]
|
|
||||||
|
|
||||||
[node name="ActiveSprite" parent="Watercan Pickup/ActiveInactive" index="0"]
|
|
||||||
texture = ExtResource("29_p6n74")
|
|
||||||
region_rect = Rect2(-2, 1135, 421, 292)
|
|
||||||
|
|
||||||
[node name="InactiveSprite" parent="Watercan Pickup/ActiveInactive" index="1"]
|
|
||||||
texture = ExtResource("29_p6n74")
|
|
||||||
region_rect = Rect2(1, 1138, 418, 288)
|
|
||||||
|
|
||||||
[node name="CanvasLayer" parent="." instance=ExtResource("32_2nee2")]
|
[node name="CanvasLayer" parent="." instance=ExtResource("32_2nee2")]
|
||||||
follow_viewport_enabled = false
|
follow_viewport_enabled = false
|
||||||
|
|
||||||
@@ -826,23 +800,20 @@ size_flags_horizontal = 4
|
|||||||
size_flags_vertical = 8
|
size_flags_vertical = 8
|
||||||
_inventoryOpenedOffset = -600.0
|
_inventoryOpenedOffset = -600.0
|
||||||
|
|
||||||
[connection signal="PickedUpTool" from="YSorted/Player2d" to="Hoe Pickup" method="SetSpriteActiveState"]
|
[connection signal="InteractedTool" from="YSorted/Brünnen/InteractionArea" to="YSorted/Vesna" method="TryFillWateringCan"]
|
||||||
[connection signal="PickedUpTool" from="YSorted/Player2d" to="Watercan Pickup" method="SetSpriteActiveState"]
|
|
||||||
[connection signal="InteractedTool" from="YSorted/Brünnen/InteractionArea" to="YSorted/Player2d" method="TryFillWateringCan"]
|
|
||||||
[connection signal="mouse_entered" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Farm visuals/FieldParent" method="MouseEnteredAllowedArea"]
|
[connection signal="mouse_entered" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Farm visuals/FieldParent" method="MouseEnteredAllowedArea"]
|
||||||
[connection signal="mouse_exited" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Farm visuals/FieldParent" method="MouseExitedAllowedArea"]
|
[connection signal="mouse_exited" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Farm visuals/FieldParent" method="MouseExitedAllowedArea"]
|
||||||
[connection signal="InteractedTool" from="Hoe Pickup" to="YSorted/Player2d" method="ActivateTool"]
|
|
||||||
[connection signal="InteractedTool" from="Watercan Pickup" to="YSorted/Player2d" method="ActivateTool"]
|
|
||||||
|
|
||||||
[editable path="YSorted/Player2d"]
|
[editable path="YSorted/Vesna"]
|
||||||
[editable path="YSorted/Brünnen/InteractionArea"]
|
[editable path="YSorted/Brünnen/InteractionArea"]
|
||||||
[editable path="YSorted/HoeGenericPickup"]
|
[editable path="YSorted/HoeGenericPickup"]
|
||||||
[editable path="YSorted/HoeGenericPickup/InteractionArea2"]
|
[editable path="YSorted/HoeGenericPickup/InteractionArea2"]
|
||||||
[editable path="YSorted/GenericPickupWithoutIcon"]
|
|
||||||
[editable path="YSorted/GenericPickupWithoutIcon/InteractionArea2"]
|
|
||||||
[editable path="YSorted/CanGenericPickup"]
|
[editable path="YSorted/CanGenericPickup"]
|
||||||
[editable path="YSorted/CanGenericPickup/InteractionArea2"]
|
[editable path="YSorted/CanGenericPickup/InteractionArea2"]
|
||||||
[editable path="Hoe Pickup"]
|
[editable path="YSorted/RakeGenericPickup"]
|
||||||
[editable path="Watercan Pickup"]
|
[editable path="YSorted/RakeGenericPickup/InteractionArea2"]
|
||||||
[editable path="Watercan Pickup/ActiveInactive"]
|
[editable path="YSorted/ScytheGenericPickup"]
|
||||||
|
[editable path="YSorted/ScytheGenericPickup/InteractionArea2"]
|
||||||
|
[editable path="YSorted/ShovelGenericPickup"]
|
||||||
|
[editable path="YSorted/ShovelGenericPickup/InteractionArea2"]
|
||||||
[editable path="CanvasLayer"]
|
[editable path="CanvasLayer"]
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://c6wnoif01ltld"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_fj2fh"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bys8kq256upf3" path="res://art/ui/StartScreen/Trailer01.png" id="1_qerdf"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://gigb28qk8t12" path="res://scenes/Babushka_scene_farm_outside_2d.tscn" id="2_r0y6o"]
|
||||||
|
|
||||||
|
[node name="BabushkaSceneStartMenu" type="Node2D"]
|
||||||
|
script = ExtResource("1_fj2fh")
|
||||||
|
_sceneToLoad = ExtResource("2_r0y6o")
|
||||||
|
|
||||||
|
[node name="Background" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(880, 524)
|
||||||
|
scale = Vector2(1.2, 1.2)
|
||||||
|
texture = ExtResource("1_qerdf")
|
||||||
|
|
||||||
|
[node name="Start" type="Button" parent="Background"]
|
||||||
|
offset_left = 6.66665
|
||||||
|
offset_top = 304.167
|
||||||
|
offset_right = 52.6666
|
||||||
|
offset_bottom = 335.167
|
||||||
|
scale = Vector2(2, 2)
|
||||||
|
text = "Start"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Background/Start" to="." method="LoadScene"]
|
||||||
+273
-43
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=13 format=3 uid="uid://bm21nqepnwaik"]
|
[gd_scene load_steps=20 format=3 uid="uid://bm21nqepnwaik"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/Player2D.tscn" id="2_a2ood"]
|
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/Player2D.tscn" id="2_a2ood"]
|
||||||
[ext_resource type="Texture2D" uid="uid://waqmjrxduxfq" path="res://art/indoor/room export/Room_01_walls.png" id="3_a2ood"]
|
[ext_resource type="Texture2D" uid="uid://waqmjrxduxfq" path="res://art/indoor/room export/Room_01_walls.png" id="3_a2ood"]
|
||||||
@@ -7,35 +7,175 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://bqwhptcgg5ons" path="res://art/indoor/room export/Room_01_dorr_R.png" id="5_8o6or"]
|
[ext_resource type="Texture2D" uid="uid://bqwhptcgg5ons" path="res://art/indoor/room export/Room_01_dorr_R.png" id="5_8o6or"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dhvi5404cqioa" path="res://art/indoor/room export/Room_01_window.png" id="6_j5d18"]
|
[ext_resource type="Texture2D" uid="uid://dhvi5404cqioa" path="res://art/indoor/room export/Room_01_window.png" id="6_j5d18"]
|
||||||
[ext_resource type="Texture2D" uid="uid://404glx32r1w8" path="res://art/indoor/room export/Room_01_bench.png" id="7_ciwvv"]
|
[ext_resource type="Texture2D" uid="uid://404glx32r1w8" path="res://art/indoor/room export/Room_01_bench.png" id="7_ciwvv"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cop1vjvhwlsec" path="res://art/indoor/room export/Room_01_shelf.png" id="8_8o6or"]
|
||||||
[ext_resource type="Texture2D" uid="uid://vyk63d0pgqm5" path="res://art/indoor/room export/Room_01_dioor L.png" id="8_wuntg"]
|
[ext_resource type="Texture2D" uid="uid://vyk63d0pgqm5" path="res://art/indoor/room export/Room_01_dioor L.png" id="8_wuntg"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b2rj7wkyu6ehy" path="res://art/indoor/room export/Room_01_pechka.png" id="9_aivb2"]
|
[ext_resource type="Texture2D" uid="uid://b2rj7wkyu6ehy" path="res://art/indoor/room export/Room_01_pechka.png" id="9_aivb2"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bpi35nxbhput8" path="res://art/indoor/room export/Room_01_pechkaDoor.png" id="10_835kg"]
|
[ext_resource type="Texture2D" uid="uid://bpi35nxbhput8" path="res://art/indoor/room export/Room_01_pechkaDoor.png" id="10_835kg"]
|
||||||
[ext_resource type="Texture2D" uid="uid://tyypifpte0pb" path="res://art/indoor/room export/Room_01_chugun.png" id="11_atjbs"]
|
[ext_resource type="Texture2D" uid="uid://tyypifpte0pb" path="res://art/indoor/room export/Room_01_chugun.png" id="11_atjbs"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://x7trh4dgsvoe" path="res://art/indoor/room export/Room_01_assets.png" id="13_j5d18"]
|
||||||
|
[ext_resource type="Script" uid="uid://cqkqijsjvbasl" path="res://scripts/spiritAnimation.cs" id="14_ciwvv"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ckvytnpi8gcxq" path="res://art/eyes_atlas.png" id="14_j5d18"]
|
||||||
|
|
||||||
[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(7680, 1336)
|
size = Vector2(7680, 1336)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_j5d18"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Room assets/hand:scale")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("BackWall/Room01PechkaDoor:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-710, 0)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = false
|
||||||
|
tracks/2/path = NodePath("Room assets/eyes:visible")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [false]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_8o6or"]
|
||||||
|
resource_name = "hand_stretch"
|
||||||
|
length = 4.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Room assets/hand:scale")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0.133333, 3),
|
||||||
|
"transitions": PackedFloat32Array(0.406126, 2.46229),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(1, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("BackWall/Room01PechkaDoor:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(-0.0333333, 2.96667),
|
||||||
|
"transitions": PackedFloat32Array(0.101532, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-710, 0), Vector2(-760, 0)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Room assets/eyes:visible")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(2.26667, 3.7, 3.9),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [true, false, true]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ciwvv"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_j5d18"),
|
||||||
|
&"hand_stretch": SubResource("Animation_8o6or")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="IndoorTest" type="Node2D"]
|
[node name="IndoorTest" type="Node2D"]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
|
||||||
[node name="background" type="Sprite2D" parent="."]
|
[node name="BackWall" type="Node" parent="."]
|
||||||
|
|
||||||
|
[node name="Room01Walls2" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -100
|
||||||
|
position = Vector2(-1072, -264)
|
||||||
|
texture = ExtResource("3_a2ood")
|
||||||
|
offset = Vector2(-2768, 264)
|
||||||
|
|
||||||
|
[node name="wall 1" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -100
|
||||||
texture = ExtResource("3_a2ood")
|
texture = ExtResource("3_a2ood")
|
||||||
flip_h = true
|
flip_h = true
|
||||||
region_rect = Rect2(111, 292, 3323, 2160)
|
region_rect = Rect2(111, 292, 3323, 2160)
|
||||||
|
|
||||||
[node name="StaticBody2D" type="StaticBody2D" parent="background"]
|
[node name="StaticBody2D" type="StaticBody2D" parent="BackWall/wall 1"]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="background/StaticBody2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="BackWall/wall 1/StaticBody2D"]
|
||||||
position = Vector2(-1912, -396)
|
position = Vector2(-1912, -396)
|
||||||
shape = SubResource("RectangleShape2D_a2ood")
|
shape = SubResource("RectangleShape2D_a2ood")
|
||||||
|
|
||||||
[node name="Player2d" parent="." instance=ExtResource("2_a2ood")]
|
[node name="Room01DorrR" type="Sprite2D" parent="BackWall"]
|
||||||
position = Vector2(-3312, 112)
|
z_index = -50
|
||||||
|
position = Vector2(-744, 16)
|
||||||
|
texture = ExtResource("5_8o6or")
|
||||||
|
|
||||||
[node name="Room01Walls2" type="Sprite2D" parent="."]
|
[node name="Room01DioorL" type="Sprite2D" parent="BackWall"]
|
||||||
position = Vector2(-3840, 0)
|
z_index = -50
|
||||||
texture = ExtResource("3_a2ood")
|
position = Vector2(-3288, 8)
|
||||||
|
texture = ExtResource("8_wuntg")
|
||||||
|
|
||||||
|
[node name="Room01Pechka" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -80
|
||||||
|
position = Vector2(-752, 0)
|
||||||
|
texture = ExtResource("9_aivb2")
|
||||||
|
|
||||||
|
[node name="Room01Window2" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -50
|
||||||
|
position = Vector2(-2952, 16)
|
||||||
|
texture = ExtResource("6_j5d18")
|
||||||
|
|
||||||
|
[node name="Room01Window3" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -50
|
||||||
|
position = Vector2(-944, -8)
|
||||||
|
texture = ExtResource("6_j5d18")
|
||||||
|
|
||||||
|
[node name="Room01PechkaDoor" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -50
|
||||||
|
position = Vector2(-710, 0)
|
||||||
|
texture = ExtResource("10_835kg")
|
||||||
|
|
||||||
|
[node name="Room01Chugun" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -40
|
||||||
|
position = Vector2(-736, 8)
|
||||||
|
texture = ExtResource("11_atjbs")
|
||||||
|
|
||||||
|
[node name="Room01Shelf" type="Sprite2D" parent="BackWall"]
|
||||||
|
z_index = -50
|
||||||
|
position = Vector2(-832, 56)
|
||||||
|
texture = ExtResource("8_8o6or")
|
||||||
|
|
||||||
|
[node name="Player2d" parent="." instance=ExtResource("2_a2ood")]
|
||||||
|
position = Vector2(-1464, 136)
|
||||||
|
|
||||||
|
[node name="CharacterBody2D" parent="Player2d" index="0"]
|
||||||
|
_speed = 500.0
|
||||||
|
|
||||||
|
[node name="Animated Sprites" parent="Player2d/CharacterBody2D/visuals" index="0"]
|
||||||
|
z_index = 50
|
||||||
|
|
||||||
[node name="Room01Table" type="Sprite2D" parent="."]
|
[node name="Room01Table" type="Sprite2D" parent="."]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
@@ -53,43 +193,133 @@ position = Vector2(-1304, 1080)
|
|||||||
texture = ExtResource("4_hjjhl")
|
texture = ExtResource("4_hjjhl")
|
||||||
offset = Vector2(184, -1056)
|
offset = Vector2(184, -1056)
|
||||||
|
|
||||||
[node name="Room01DorrR" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-216, 8)
|
|
||||||
texture = ExtResource("5_8o6or")
|
|
||||||
|
|
||||||
[node name="Room01Window4" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-352, 8)
|
|
||||||
texture = ExtResource("6_j5d18")
|
|
||||||
|
|
||||||
[node name="Room01Bench" type="Sprite2D" parent="."]
|
[node name="Room01Bench" type="Sprite2D" parent="."]
|
||||||
position = Vector2(-3280, 24)
|
position = Vector2(-3280, 24)
|
||||||
texture = ExtResource("7_ciwvv")
|
texture = ExtResource("7_ciwvv")
|
||||||
|
flip_h = true
|
||||||
[node name="Room01DioorL" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-3400, 8)
|
|
||||||
texture = ExtResource("8_wuntg")
|
|
||||||
|
|
||||||
[node name="Room01Pechka" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-752, 0)
|
|
||||||
texture = ExtResource("9_aivb2")
|
|
||||||
|
|
||||||
[node name="Room01PechkaDoor" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-704, 0)
|
|
||||||
texture = ExtResource("10_835kg")
|
|
||||||
|
|
||||||
[node name="Room01Chugun" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-736, 8)
|
|
||||||
texture = ExtResource("11_atjbs")
|
|
||||||
|
|
||||||
[node name="Room01Window2" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-2952, 16)
|
|
||||||
texture = ExtResource("6_j5d18")
|
|
||||||
|
|
||||||
[node name="Room01Window3" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-1720, 16)
|
|
||||||
texture = ExtResource("6_j5d18")
|
|
||||||
|
|
||||||
[node name="Room01Bench2" type="Sprite2D" parent="."]
|
[node name="Room01Bench2" type="Sprite2D" parent="."]
|
||||||
position = Vector2(-1160, 40)
|
position = Vector2(-784, 40)
|
||||||
texture = ExtResource("7_ciwvv")
|
texture = ExtResource("7_ciwvv")
|
||||||
flip_h = true
|
|
||||||
|
[node name="Room assets" type="Node" parent="."]
|
||||||
|
|
||||||
|
[node name="Samowar" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(-2000, 696)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2085, 40, 446, 654)
|
||||||
|
|
||||||
|
[node name="wood" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(-176, 560)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2244, 763, 274, 91)
|
||||||
|
|
||||||
|
[node name="Domovoi" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(336, 480)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(3157, 688, 131, 221)
|
||||||
|
|
||||||
|
[node name="vase" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(-712, 72)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2748, 432, 174, 191)
|
||||||
|
|
||||||
|
[node name="candle" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(-272, -56)
|
||||||
|
rotation = -0.0663225
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2624, 435, 49, 76)
|
||||||
|
|
||||||
|
[node name="hand" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(48.5969, 11.68)
|
||||||
|
rotation = -0.0663225
|
||||||
|
scale = Vector2(1e-05, 1e-05)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(43.3898, 128.128)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(3362, 139, 101, 269)
|
||||||
|
|
||||||
|
[node name="SpiritAnimation" type="AnimationPlayer" parent="Room assets/hand" node_paths=PackedStringArray("_player", "_offerings")]
|
||||||
|
active = false
|
||||||
|
root_node = NodePath("../../..")
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_ciwvv")
|
||||||
|
}
|
||||||
|
playback_auto_capture = false
|
||||||
|
script = ExtResource("14_ciwvv")
|
||||||
|
_player = NodePath("../../../Player2d/CharacterBody2D")
|
||||||
|
_offerings = NodePath("../../offerings")
|
||||||
|
|
||||||
|
[node name="herbsline" type="Sprite2D" parent="Room assets"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(440, -168)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2964, 137, 321, 213)
|
||||||
|
|
||||||
|
[node name="herb 1" type="Sprite2D" parent="Room assets/herbsline"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(-72, 136)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2600, 165, 127, 199)
|
||||||
|
|
||||||
|
[node name="herb 2" type="Sprite2D" parent="Room assets/herbsline"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
position = Vector2(64, 80)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2761, 161, 135, 199)
|
||||||
|
|
||||||
|
[node name="eyes" type="Sprite2D" parent="Room assets"]
|
||||||
|
visible = false
|
||||||
|
position = Vector2(32, -72)
|
||||||
|
scale = Vector2(0.4, 0.4)
|
||||||
|
texture = ExtResource("14_j5d18")
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2647, 15, 286, 183)
|
||||||
|
|
||||||
|
[node name="offerings" type="Node2D" parent="Room assets"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="apple" type="Sprite2D" parent="Room assets/offerings"]
|
||||||
|
position = Vector2(229.5, 331.5)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2822, 764, 93, 87)
|
||||||
|
|
||||||
|
[node name="bread" type="Sprite2D" parent="Room assets/offerings"]
|
||||||
|
z_index = -1
|
||||||
|
position = Vector2(157.5, 339.5)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2951, 783, 155, 78)
|
||||||
|
|
||||||
|
[node name="plate" type="Sprite2D" parent="Room assets/offerings"]
|
||||||
|
z_index = -20
|
||||||
|
position = Vector2(189.5, 659.5)
|
||||||
|
texture = ExtResource("13_j5d18")
|
||||||
|
offset = Vector2(0, -296)
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2(2576, 802, 219, 64)
|
||||||
|
|
||||||
|
[editable path="Player2d"]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://biwd3jj65qrlh" path="res://prefabs/farm/base_field.tscn" id="2_741gk"]
|
[ext_resource type="PackedScene" uid="uid://biwd3jj65qrlh" path="res://prefabs/farm/base_field.tscn" id="2_741gk"]
|
||||||
[ext_resource type="PackedScene" uid="uid://5hltxpdxmqcq" path="res://prefabs/interactions/generic_item_on_ground.tscn" id="5_sjt6k"]
|
[ext_resource type="PackedScene" uid="uid://5hltxpdxmqcq" path="res://prefabs/interactions/generic_item_on_ground.tscn" id="5_sjt6k"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="6_876p1"]
|
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="6_876p1"]
|
||||||
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/bucket.tres" id="6_nvnpb"]
|
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="6_nvnpb"]
|
||||||
[ext_resource type="Script" uid="uid://c6hh7m8wikv04" path="res://scripts/CSharp/Common/Farming/FieldService.cs" id="7_3rkjv"]
|
[ext_resource type="Script" uid="uid://c6hh7m8wikv04" path="res://scripts/CSharp/Common/Farming/FieldService.cs" id="7_3rkjv"]
|
||||||
[ext_resource type="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="7_hv2km"]
|
[ext_resource type="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="7_hv2km"]
|
||||||
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="8_hv2km"]
|
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="8_hv2km"]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public partial class InteractionArea2D : Node2D
|
|||||||
[Export] private Label _label;
|
[Export] private Label _label;
|
||||||
[Export] private SpriteSwitcher2D _sprites; // TODO: remove
|
[Export] private SpriteSwitcher2D _sprites; // TODO: remove
|
||||||
[Export] private bool _showLabel = true;
|
[Export] private bool _showLabel = true;
|
||||||
[Export] private int _id; // TODO: remove
|
[Export] private int _id = -1; // TODO: remove
|
||||||
|
|
||||||
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
||||||
[Signal] public delegate void InteractedEventHandler();
|
[Signal] public delegate void InteractedEventHandler();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Babushka.scripts.CSharp.Common.Inventory;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
||||||
@@ -14,16 +15,27 @@ public partial class Player2D : CharacterBody2D
|
|||||||
private int _toolID = -1;
|
private int _toolID = -1;
|
||||||
private string _toolString;
|
private string _toolString;
|
||||||
private bool anyActionPressed;
|
private bool anyActionPressed;
|
||||||
private bool _wateringInProgress;
|
private bool _canHandleInput = true;
|
||||||
private bool _pickupAnimationInProgress;
|
|
||||||
private bool _farmingAnimationInProgress;
|
|
||||||
private Vector2 _lastDirection = Vector2.Zero;
|
private Vector2 _lastDirection = Vector2.Zero;
|
||||||
|
private InventoryManager _inventoryManager;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
InventoryManager.Instance.playerInventory.InventoryContentsChanged += HandleNewItemInInventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleNewItemInInventory()
|
||||||
|
{
|
||||||
|
// for future Kathi: this does not, in fact, check if an item has been added only, but triggers on every content change!
|
||||||
|
PlayPickUpAnimation();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
anyActionPressed = false;
|
anyActionPressed = false;
|
||||||
|
|
||||||
if (_pickupAnimationInProgress || _wateringInProgress || _farmingAnimationInProgress)
|
if (!_canHandleInput)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Input.IsActionPressed("move_right"))
|
if (Input.IsActionPressed("move_right"))
|
||||||
@@ -99,7 +111,6 @@ public partial class Player2D : CharacterBody2D
|
|||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
_toolID = id;
|
_toolID = id;
|
||||||
PlayPickUpAnimation();
|
|
||||||
}
|
}
|
||||||
else _toolID = -1;
|
else _toolID = -1;
|
||||||
|
|
||||||
@@ -122,47 +133,46 @@ public partial class Player2D : CharacterBody2D
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void PlayWateringAnimation()
|
public void PlayWateringAnimation()
|
||||||
{
|
{
|
||||||
if (_toolID == 1 && !_wateringInProgress)
|
if (_toolID == 1 && _canHandleInput)
|
||||||
{
|
{
|
||||||
_sprite.Animation = "diagonal wateringcan";
|
_sprite.Animation = "diagonal wateringcan";
|
||||||
_sprite.Play();
|
_sprite.Play();
|
||||||
_wateringInProgress = true;
|
_canHandleInput = false;
|
||||||
Task.Run(DelayedWateringCanReset);
|
Task.Run(DelayedInputHandlerReset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task DelayedWateringCanReset()
|
private async Task DelayedInputHandlerReset()
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
_wateringInProgress = false;
|
_canHandleInput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlayPickUpAnimation()
|
public void PlayPickUpAnimation()
|
||||||
{
|
{
|
||||||
_sprite.Animation = "side pickup";
|
_sprite.Animation = "side pickup";
|
||||||
_sprite.Play();
|
_sprite.Play();
|
||||||
_pickupAnimationInProgress = true;
|
_canHandleInput = false;
|
||||||
Task.Run(DelayedPickUpReset);
|
Task.Run(DelayedInputHandlerReset);
|
||||||
}
|
|
||||||
|
|
||||||
private async Task DelayedPickUpReset()
|
|
||||||
{
|
|
||||||
await Task.Delay(1000);
|
|
||||||
_pickupAnimationInProgress = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlayFarmingAnimation()
|
public void PlayFarmingAnimation()
|
||||||
{
|
{
|
||||||
_sprite.Animation = "diagonal farming";
|
_sprite.Animation = "diagonal farming";
|
||||||
_sprite.Play();
|
_sprite.Play();
|
||||||
_farmingAnimationInProgress = true;
|
_canHandleInput = false;
|
||||||
Task.Run(DelayedFarmingReset);
|
Task.Run(DelayedInputHandlerReset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task DelayedFarmingReset()
|
|
||||||
|
public void PlayWateringCanFillupAnimation()
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
_sprite.Animation = "back interact";
|
||||||
_farmingAnimationInProgress = false;
|
_sprite.Play();
|
||||||
|
_canHandleInput = false;
|
||||||
|
_lastDirection = Vector2.Up;
|
||||||
|
Task.Run(DelayedInputHandlerReset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,21 +31,13 @@ public partial class FarmingControls2D : Node2D
|
|||||||
bool activate;
|
bool activate;
|
||||||
|
|
||||||
//if our hands are empty, activate
|
//if our hands are empty, activate
|
||||||
if (_toolId == -1)
|
if (toolId == -1)
|
||||||
{
|
{
|
||||||
activate = true;
|
activate = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//if we're already carrying a tool, deactivate or fail return
|
activate = true;
|
||||||
if (_toolId == toolId)
|
|
||||||
{
|
|
||||||
activate = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_toolId = activate ? toolId : -1;
|
_toolId = activate ? toolId : -1;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Babushka.scripts.CSharp.Common.CharacterControls;
|
using Babushka.scripts.CSharp.Common.CharacterControls;
|
||||||
|
using Babushka.scripts.CSharp.Common.Inventory;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Babushka.scripts.CSharp.Common.Farming;
|
namespace Babushka.scripts.CSharp.Common.Farming;
|
||||||
@@ -15,6 +16,7 @@ public partial class PlantBehaviour2D : Node2D
|
|||||||
[Export] private Sprite2D[] _readyPlants;
|
[Export] private Sprite2D[] _readyPlants;
|
||||||
[Export] private PlantState _state = PlantState.None;
|
[Export] private PlantState _state = PlantState.None;
|
||||||
[Export] private FieldBehaviour2D _field;
|
[Export] private FieldBehaviour2D _field;
|
||||||
|
[Export] private ItemOnGround2D _harvestablePlant;
|
||||||
|
|
||||||
private Sprite2D _currentPlantSprite = null;
|
private Sprite2D _currentPlantSprite = null;
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ public partial class PlantBehaviour2D : Node2D
|
|||||||
_state = PlantState.Ready;
|
_state = PlantState.Ready;
|
||||||
_currentPlantSprite.Visible = false;
|
_currentPlantSprite.Visible = false;
|
||||||
_currentPlantSprite = GetRandomSprite(_readyPlants);
|
_currentPlantSprite = GetRandomSprite(_readyPlants);
|
||||||
|
_harvestablePlant.IsActive = true;
|
||||||
_currentPlantSprite.Visible = true;
|
_currentPlantSprite.Visible = true;
|
||||||
break;
|
break;
|
||||||
case PlantState.Ready:
|
case PlantState.Ready:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Babushka.scripts.CSharp.Common.CharacterControls;
|
||||||
|
using Babushka.scripts.CSharp.Common.Inventory;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Babushka.scripts.CSharp.Common.Farming;
|
namespace Babushka.scripts.CSharp.Common.Farming;
|
||||||
@@ -7,12 +9,45 @@ public partial class VesnaBehaviour2D : Node
|
|||||||
[ExportGroup("Farming")]
|
[ExportGroup("Farming")]
|
||||||
[Export] private FieldService2D _fieldParent;
|
[Export] private FieldService2D _fieldParent;
|
||||||
[Export] private FarmingControls2D _farmingControls;
|
[Export] private FarmingControls2D _farmingControls;
|
||||||
|
[Export] private Player2D _player2d;
|
||||||
|
[Export] private ItemResource _hoe;
|
||||||
|
[Export] private ItemResource _wateringCan;
|
||||||
|
|
||||||
[Signal] public delegate void PickedUpToolEventHandler(bool success, int toolId);
|
[Signal] public delegate void PickedUpToolEventHandler(bool success, int toolId);
|
||||||
|
|
||||||
|
private InventoryManager _inventoryManager;
|
||||||
|
private InventoryInstance _inventoryInstance;
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_farmingControls.FieldService = _fieldParent;
|
_farmingControls.FieldService = _fieldParent;
|
||||||
|
_inventoryManager = InventoryManager.Instance;
|
||||||
|
_inventoryInstance = _inventoryManager.playerInventory;
|
||||||
|
_inventoryManager.SlotIndexChanged += HandleInventorySelectedSlotIndexChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleInventorySelectedSlotIndexChanged(int newIndex)
|
||||||
|
{
|
||||||
|
InventorySlot currentSlot = InventoryManager.Instance.GetCurrentSelectedSlot();
|
||||||
|
ItemInstance? currentItem = currentSlot.itemInstance;
|
||||||
|
|
||||||
|
if (currentItem == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (currentItem.blueprint == _hoe)
|
||||||
|
{
|
||||||
|
ActivateTool(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentItem.blueprint == _wateringCan)
|
||||||
|
{
|
||||||
|
ActivateTool(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActivateTool(-1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Farming
|
#region Farming
|
||||||
@@ -28,6 +63,7 @@ public partial class VesnaBehaviour2D : Node
|
|||||||
if (toolId == 1)
|
if (toolId == 1)
|
||||||
{
|
{
|
||||||
_farmingControls.FillWateringCan(true);
|
_farmingControls.FillWateringCan(true);
|
||||||
|
_player2d.PlayWateringCanFillupAnimation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,18 @@ public partial class InventoryManager : Node
|
|||||||
[Signal]
|
[Signal]
|
||||||
public delegate void SlotIndexChangedEventHandler(int newIndex);
|
public delegate void SlotIndexChangedEventHandler(int newIndex);
|
||||||
|
|
||||||
|
|
||||||
public static InventoryManager Instance { get; private set; } = null!;
|
public static InventoryManager Instance { get; private set; } = null!;
|
||||||
public int CurrentSelectedSlotIndex
|
public int CurrentSelectedSlotIndex
|
||||||
{
|
{
|
||||||
get => _currentSelectedSlotIndex;
|
get => _currentSelectedSlotIndex;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_currentSelectedSlotIndex = value;
|
if (value >= 0 && value <= 8)
|
||||||
EmitSignalSlotIndexChanged(_currentSelectedSlotIndex);
|
{
|
||||||
|
_currentSelectedSlotIndex = value;
|
||||||
|
EmitSignalSlotIndexChanged(_currentSelectedSlotIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ public partial class ItemOnGround : Node3D
|
|||||||
|
|
||||||
public void TryPickUp()
|
public void TryPickUp()
|
||||||
{
|
{
|
||||||
GD.Print("Trying to pick up item");
|
|
||||||
|
|
||||||
var result = InventoryManager.Instance.CollectItem(itemInstance.Clone());
|
var result = InventoryManager.Instance.CollectItem(itemInstance.Clone());
|
||||||
if (result == InventoryActionResult.Success)
|
if (result == InventoryActionResult.Success)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,8 +6,11 @@ public partial class ItemOnGround2D : Node
|
|||||||
{
|
{
|
||||||
private ItemInstance _itemInstance;
|
private ItemInstance _itemInstance;
|
||||||
|
|
||||||
[Export]
|
[Export] private bool _infiniteSupply = false;
|
||||||
private bool _infiniteSupply = false;
|
[Export] private int _finiteSupply = 1;
|
||||||
|
[Export] public bool IsActive = true;
|
||||||
|
|
||||||
|
private int pickUpCounter = 0;
|
||||||
|
|
||||||
private Label _itemLabel => GetNode<Label>("ItemLabel");
|
private Label _itemLabel => GetNode<Label>("ItemLabel");
|
||||||
private Label _pickupErrorLabel => GetNode<Label>("PickupErrorLabel");
|
private Label _pickupErrorLabel => GetNode<Label>("PickupErrorLabel");
|
||||||
@@ -31,14 +34,19 @@ public partial class ItemOnGround2D : Node
|
|||||||
|
|
||||||
public void TryPickUp()
|
public void TryPickUp()
|
||||||
{
|
{
|
||||||
GD.Print("Trying to pick up item");
|
if (!IsActive)
|
||||||
|
return;
|
||||||
|
|
||||||
var result = InventoryManager.Instance.CollectItem(itemInstance.Clone());
|
var result = InventoryManager.Instance.CollectItem(itemInstance.Clone());
|
||||||
if (result == InventoryActionResult.Success)
|
if (result == InventoryActionResult.Success)
|
||||||
{
|
{
|
||||||
if (!_infiniteSupply)
|
if (!_infiniteSupply)
|
||||||
{
|
{
|
||||||
QueueFree();
|
pickUpCounter++;
|
||||||
|
if (pickUpCounter >= _finiteSupply)
|
||||||
|
{
|
||||||
|
QueueFree();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -52,6 +60,9 @@ public partial class ItemOnGround2D : Node
|
|||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Babushka.scripts.CSharp.Common;
|
||||||
|
|
||||||
|
public partial class SceneTransition : Node
|
||||||
|
{
|
||||||
|
[Export] private PackedScene _sceneToLoad;
|
||||||
|
[Export] private Node _sceneInstanceParent;
|
||||||
|
[Export] private bool _unloadSelf = true;
|
||||||
|
|
||||||
|
public void LoadScene()
|
||||||
|
{
|
||||||
|
Node sceneInstance = _sceneToLoad.Instantiate();
|
||||||
|
_sceneInstanceParent.AddChild(sceneInstance);
|
||||||
|
|
||||||
|
if (_unloadSelf)
|
||||||
|
{
|
||||||
|
QueueFree();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cssdu8viimwm6
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using Babushka.scripts.CSharp.Common.CharacterControls;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Babushka.scripts;
|
||||||
|
|
||||||
|
public partial class spiritAnimation : AnimationPlayer
|
||||||
|
{
|
||||||
|
[Export] private Player2D _player;
|
||||||
|
[Export] private Node2D _offerings;
|
||||||
|
|
||||||
|
public override void _UnhandledInput(InputEvent @event)
|
||||||
|
{
|
||||||
|
if (@event is InputEventKey eventKey)
|
||||||
|
{
|
||||||
|
if (eventKey.Pressed && eventKey.Keycode == Key.Alt)
|
||||||
|
{
|
||||||
|
_player.PlayPickUpAnimation();
|
||||||
|
_offerings.Visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (eventKey.Pressed && eventKey.Keycode == Key.Space)
|
||||||
|
{
|
||||||
|
Active = true;
|
||||||
|
Play("hand_stretch");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cqkqijsjvbasl
|
||||||
@@ -7,4 +7,3 @@ void fragment() {
|
|||||||
vec2 uv = vec2(UV.x * tiling_scale.x, UV.y * tiling_scale.y); // Change 10.0 to control tiling scale
|
vec2 uv = vec2(UV.x * tiling_scale.x, UV.y * tiling_scale.y); // Change 10.0 to control tiling scale
|
||||||
COLOR = texture(TEXTURE, fract(uv));
|
COLOR = texture(TEXTURE, fract(uv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user