Compare commits

..

15 Commits

Author SHA1 Message Date
jonathan 427db88474 🧪 Tested music setup with new music concept 2025-10-24 18:10:00 +02:00
jonathan 45d4b26b6a ♻️ Implemented FightersFormation to keep track of the fight entered state of the fighters 2025-10-07 18:08:53 +02:00
jonathan 719b1fa800 ♻️Code cleanup 2025-10-07 15:50:33 +02:00
jonathan bd6432f568 🐛Exiting fight happening when one side wins 2025-10-05 19:50:05 +02:00
jonathan 224863f891 Added theme-based region colors 2025-10-03 20:02:25 +02:00
jonathan 7d35c991f3 Added minigame label for each region 2025-10-03 19:37:54 +02:00
jonathan ff8e4a85d2 Added minigame to attack action 2025-10-02 15:49:24 +02:00
jonathan 96df233496 Added minigame 2025-10-02 01:32:52 +02:00
jonathan 3f23f4471b cap health at minimum 0 2025-10-01 13:16:41 +02:00
jonathan f2bf44bf9e Added blob attack action 2025-10-01 01:42:29 +02:00
jonathan f0db6372e5 Added basic health bar 2025-09-30 19:00:52 +02:00
jonathan 52f1560c48 Added basic action animation 2025-09-30 17:36:35 +02:00
jonathan 8055381478 Made fight fightable 2025-09-30 16:23:05 +02:00
jonathan daabcdc5ee Fight happening base setup 2025-09-21 14:54:55 +02:00
jonathan 2929c5dd25 Bootstrap fight system
- Fight World data structure
- Generating basic fight world
- Opening correct fight room
- Block paths in fight rooms
- Transition between rooms
2025-09-12 13:20:27 +02:00
157 changed files with 5618 additions and 1153 deletions
+1
View File
@@ -0,0 +1 @@
Babushka
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="RiderAndroidProjectSystem" />
</component>
</project>
+1
View File
@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=53eecf85_002Dd821_002D40e8_002Dac97_002Dfdb734542b84/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Instance fields (not private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=0B2502BD29F5EC4798EEFD2950AA7E06/Description/@EntryValue">Godot Signal</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=0B2502BD29F5EC4798EEFD2950AA7E06/Text/@EntryValue">[Signal]
public delegate void $SignalName$EventHandler($END$);</s:String>
+18 -2
View File
@@ -1,13 +1,29 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArea3D_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F8a54226fa2e1c9371a8091f24cfd744aef11fe6869527dc23b9b837623a29b9_003FArea3D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fa3_003Fe272a3a7_003FArray_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAudioStreamPlayer2D_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F848324b1c23114c3f5e8bbb5a42c4ade394c59a7a7a133a66b76581ca571_003FAudioStreamPlayer2D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EFieldBehaviour2D_005FScriptMethods_002Egenerated_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F75d11718f1abbc2572fd32e4b83acbec9d79ac_003FBabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EFieldBehaviour2D_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptMethods_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FLocal_003FTemp_003FSourceGeneratedDocuments_003F9509A9D00FD8A232B5E86A84_003FGodot_002ESourceGenerators_003FGodot_002ESourceGenerators_002EScriptMethodsGenerator_003FBabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FLocal_003FTemp_003FSourceGeneratedDocuments_003F9509A9D00FD8A232B5E86A84_003FGodot_002ESourceGenerators_003FGodot_002ESourceGenerators_002EScriptPropertiesGenerator_003FBabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4298b0f293f987511fc1b7956ee691fd778f8378_003FBabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4298b0f293f987511fc1b7956ee691fd778f8378_003FBabushka_002Escripts_002ECSharp_002ECommon_002EFarming_002EVesnaBehaviour2D_005FScriptProperties_002Egenerated_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EQuest_002EQuestListItemUi_005FScriptMethods_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F48fad7e7f3c9e292b3fdbddf9d363f0d1752aa_003FBabushka_002Escripts_002ECSharp_002ECommon_002EQuest_002EQuestListItemUi_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABabushka_002Escripts_002ECSharp_002ECommon_002EQuest_002EQuestManager_005FScriptSignals_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FLocal_003FTemp_003FSourceGeneratedDocuments_003F9509A9D00FD8A232B5E86A84_003FGodot_002ESourceGenerators_003FGodot_002ESourceGenerators_002EScriptSignalsGenerator_003FBabushka_002Escripts_002ECSharp_002ECommon_002EQuest_002EQuestManager_005FScriptSignals_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACanvasItem_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fef7b819b226fab796d1dfe66d415dd7510bcac87675020ddb8f03a828e763_003FCanvasItem_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACastHelpers_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3c92637ae2e83da0a63791071c41eae291d594156062866d8621b7ed7245c_003FCastHelpers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACastHelpers_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd111abf504bf42b5968a609b168fd093b2e200_003Fbb_003F1c116fcd_003FCastHelpers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACharacterBody2D_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fbba0bbd7a98ee58286e9484fbe86e01afff6232283f6efd3556eb7116453_003FCharacterBody2D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACount_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ffe5a7cee5a1771b89077bd73292de84439b4f816799e2ad6c2615c6ff5bd748e_003FCount_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fjonathan_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fd4_003Fbd338aeb_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F76fabf6f8acf4a0099cae0bcf8b218467f10_003F7e_003F28cee476_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGD_005Fconstants_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4ef0bac6437b6a9567d44f62ae567d854fa7b8513ef7139ef349b49768bc9df_003FGD_005Fconstants_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ff1d69ec2da76ccf9bc8a75c8e0fdca9a7ba1adf8c8c9d5047e2fa5991c02eca_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F5acc345db3c207bc9d886a36ff14867ef8d65557432172c2a42f19aeac04d1b_003FNullable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AResourceLoader_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F9f4e8eb124d11f8219cb513a19bed22b2120ed29f9d6785ba56e3367b48d581_003FResourceLoader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fc7102cd0ffb8973777e61b1942c3fffac7e14016a511d055c3adf73ff91748_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTree_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8d6960554e939a669841b1ece03d27df4ab42f92bb80be3767eaec8cdaccf84b_003FSceneTree_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AShape2D_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3671dbbd9b17cdf2bf9075b468b6bd7e3ab13fc3be7a116484085d3b6cc9fe_003FShape2D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fc7102cd0ffb8973777e61b1942c3fffac7e14016a511d055c3adf73ff91748_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=bc5a80e4_002D7ba6_002D4f7d_002Db896_002Dc591eec7ab12/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="Tests" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;TestAncestor&gt;&#xD;
&lt;TestId&gt;NUnit3x::A6EF2269-9E64-40D4-BA0A-33CB234E2503::net9.0::BabushkaTest.Tests&lt;/TestId&gt;&#xD;
&lt;/TestAncestor&gt;&#xD;
&lt;/SessionState&gt;</s:String></wpf:ResourceDictionary>
@@ -4,11 +4,12 @@ importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b3kyrsoobmkhp"
valid=false
path="res://.godot/imported/best_house_blender.blend-ac89c74aef2f275bdf4b4baadee17c0c.scn"
[deps]
source_file="res://art/mockups/3d/best_house_blender.blend"
dest_files=["res://.godot/imported/best_house_blender.blend-ac89c74aef2f275bdf4b4baadee17c0c.scn"]
[params]
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://iux86v7qmf33"
path="res://.godot/imported/FightTest_Base.ogg-c2135a351140994f825ac3a4c95512e9.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/FightTest_Base.ogg"
dest_files=["res://.godot/imported/FightTest_Base.ogg-c2135a351140994f825ac3a4c95512e9.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cimd2rvdwtfkv"
path="res://.godot/imported/FightTest_Pattern1.ogg-366a24f1c5b2de03be94df3cb6e2b4db.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/FightTest_Pattern1.ogg"
dest_files=["res://.godot/imported/FightTest_Pattern1.ogg-366a24f1c5b2de03be94df3cb6e2b4db.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://kpbkw64o86q4"
path="res://.godot/imported/FightTest_Pattern2.ogg-deeb2006ba9921b2d3fd3c5e9154d31c.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/FightTest_Pattern2.ogg"
dest_files=["res://.godot/imported/FightTest_Pattern2.ogg-deeb2006ba9921b2d3fd3c5e9154d31c.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cmyrgerm8m4nw"
path="res://.godot/imported/FightTest_Pattern3.ogg-bc6fa475a04ff9ce3eb12d0e5a8b2946.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/FightTest_Pattern3.ogg"
dest_files=["res://.godot/imported/FightTest_Pattern3.ogg-bc6fa475a04ff9ce3eb12d0e5a8b2946.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ddu3pxk121x87"
path="res://.godot/imported/NightTest_Pattern1.ogg-3eb5d685e76ee80df0e3a06c333e5881.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/NightTest_Pattern1.ogg"
dest_files=["res://.godot/imported/NightTest_Pattern1.ogg-3eb5d685e76ee80df0e3a06c333e5881.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ddxekmi71ekin"
path="res://.godot/imported/NightTest_Pattern2.ogg-3f45cf34ddc5716cb6e571b63e7168e6.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/NightTest_Pattern2.ogg"
dest_files=["res://.godot/imported/NightTest_Pattern2.ogg-3f45cf34ddc5716cb6e571b63e7168e6.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cjnt07ai5bed8"
path="res://.godot/imported/NightTest_Pattern3.ogg-54521b103c362f6dfd049e0947d34740.oggvorbisstr"
[deps]
source_file="res://audio/Music/TestingMusic/NightTest_Pattern3.ogg"
dest_files=["res://.godot/imported/NightTest_Pattern3.ogg-54521b103c362f6dfd049e0947d34740.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=130.0
beat_count=0
bar_beats=4
+1 -5
View File
@@ -7,8 +7,4 @@ ifquest res://resources/quests/demo/3_talk_yeli_2.tres, 1:
ifquest res://resources/quests/demo/5_talk_yeli_3.tres, 1:
jump quest2_tomatoes_interim/
[end_timeline]
ifquest res://resources/quests/demo/2_collect_ducks.tres, 1:
join Yeli right
Yeli: Have you collected all the ducks yet?
[end_timeline]
Yeli doesn't seem to have anything to say...
No Dialog for active quest "{ACTIVEQUEST}"
@@ -1,19 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://bs4t0t7o4jmam"]
[ext_resource type="Script" uid="uid://doxr432r22dd0" path="res://scripts/CSharp/Common/Items/InventoryDependentInteractable.cs" id="1_cu47d"]
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="2_s5peo"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="3_wsetd"]
[ext_resource type="Texture2D" uid="uid://bleimj6jr1jka" path="res://art/general/rectangle.png" id="4_1dub8"]
[node name="InventoryDependentInteractableTest" type="Node2D" node_paths=PackedStringArray("_interactionArea")]
script = ExtResource("1_cu47d")
_interactionArea = NodePath("InteractionArea")
_itemsToReactTo = Array[Object]([ExtResource("2_s5peo")])
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("3_wsetd")]
_active = false
_spriteToOutline = NodePath("../Sprite2D")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
texture = ExtResource("4_1dub8")
+1 -4
View File
@@ -1,8 +1,7 @@
[gd_scene load_steps=16 format=3 uid="uid://sbf12hin4kes"]
[gd_scene load_steps=15 format=3 uid="uid://sbf12hin4kes"]
[ext_resource type="Texture2D" uid="uid://bylgmr0skwtrs" path="res://art/farm/farming/farmobjekte/broken tools atlas.png" id="1_k4ca3"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_gcgfd"]
[ext_resource type="Script" uid="uid://dkk1vjijvgrd7" path="res://scripts/CSharp/Common/Items/NonInventoryPickup.cs" id="2_ic616"]
[ext_resource type="AudioStream" uid="uid://be6g8b3v3u1ai" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PickUp_01.wav" id="3_ktmp7"]
[ext_resource type="AudioStream" uid="uid://cgjsajsdrrn0j" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PutDown_01.wav" id="4_ic616"]
[ext_resource type="AudioStream" uid="uid://br4drgupled6c" path="res://audio/sfx/Kitchen/SFX_Cooking_Pot_01.wav" id="5_dx175"]
@@ -35,7 +34,6 @@ texture = ExtResource("1_k4ca3")
offset = Vector2(1, -215)
region_enabled = true
region_rect = Rect2(44, 479, 356, 503)
script = ExtResource("2_ic616")
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("2_gcgfd")]
position = Vector2(0, -172)
@@ -48,5 +46,4 @@ playback_type = 2
script = ExtResource("13_wswkg")
[connection signal="Interacted" from="InteractionArea" to="." method="queue_free"]
[connection signal="Interacted" from="InteractionArea" to="." method="PlayPickupAnimation"]
[connection signal="Interacted" from="InteractionArea" to="AudioStreamPlayer2D" method="PlayOneShot"]
+3 -23
View File
@@ -1,7 +1,7 @@
[gd_scene load_steps=12 format=3 uid="uid://cgjc4wurbgimy"]
[gd_scene load_steps=11 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://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="1_l3npx"]
[ext_resource type="Script" path="res://scripts/GdScript/dialogic_toggle.gd" id="1_l3npx"]
[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://u0dku75l17re" path="res://art/ui/UI/UI_bag_export_highlight_01.png" id="5_df8i8"]
[ext_resource type="PackedScene" uid="uid://c0kmdjeqkqrwv" path="res://prefabs/UI/Inventory/Slot.tscn" id="5_u7kje"]
@@ -11,9 +11,6 @@
[ext_resource type="PackedScene" uid="uid://2q1n6g2kj5er" path="res://prefabs/UI/Quest/QuestLog.tscn" id="7_vvo7l"]
[ext_resource type="Texture2D" uid="uid://qwia360i1ir1" path="res://art/ui/UI/inventory_active.png" id="8_df8i8"]
[sub_resource type="LabelSettings" id="LabelSettings_l3npx"]
font_size = 50
[node name="CanvasLayer" type="CanvasLayer"]
layer = 90
@@ -458,22 +455,6 @@ offset_bottom = 100.0
texture = ExtResource("8_df8i8")
expand_mode = 1
[node name="Label" type="Label" parent="Inventory/SlotsContainer/SlotsMover"]
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = 14.4142
offset_top = 184.286
offset_right = 54.4142
offset_bottom = 207.286
grow_horizontal = 0
grow_vertical = 2
text = "[I]"
label_settings = SubResource("LabelSettings_l3npx")
[node name="QuestLogRoot" parent="." instance=ExtResource("7_vvo7l")]
[node name="Control" type="Control" parent="."]
@@ -507,7 +488,6 @@ offset_bottom = -20.0
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
text = "[Hier könnte Ihre Werbung stehen]"
text = "Switch to Unity"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
+1 -1
View File
@@ -50,7 +50,7 @@ size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 17
text = "[ Hier könnte ihre Werbung stehen]"
text = "Switch to Unity"
vertical_alignment = 1
autowrap_mode = 2
+76 -42
View File
@@ -1,9 +1,7 @@
[gd_scene load_steps=475 format=3 uid="uid://c25udixd5m6l0"]
[gd_scene load_steps=477 format=3 uid="uid://c25udixd5m6l0"]
[ext_resource type="Script" uid="uid://b05uyj001ehwi" path="res://scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs" id="1_yd5ep"]
[ext_resource type="Script" uid="uid://cjbclkxesh3hc" path="res://scripts/CSharp/Common/CharacterControls/PlayerMovement.cs" id="2_1vqmv"]
[ext_resource type="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="2_dnm27"]
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="3_e04c3"]
[ext_resource type="Script" uid="uid://n7oihifvqp23" path="res://scripts/CSharp/Common/Animation/VesnaAnimations.cs" id="3_f6xmn"]
[ext_resource type="Texture2D" uid="uid://7jrac5ii3ah3" path="res://art/animation/Vesna2D/Vesna Anims Sequences/B01-Idle/0001.png" id="3_tb2wl"]
[ext_resource type="Texture2D" uid="uid://c06b551t2qlo6" path="res://art/animation/Vesna2D/Vesna Anims Sequences/B01-Idle/0002.png" id="4_dy5kt"]
@@ -273,11 +271,15 @@
[ext_resource type="Texture2D" uid="uid://b37lpqrsjjuc0" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0010.png" id="466_pw1ip"]
[ext_resource type="Script" uid="uid://er03dkj8axlr" path="res://scripts/CSharp/Common/UI/WateringCanUi.cs" id="467_j4m0f"]
[ext_resource type="Texture2D" uid="uid://oi11ax6tml6j" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0012.png" id="468_08021"]
[ext_resource type="Texture2D" uid="uid://l0k3vh3kdprp" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-1.png" id="468_f6xmn"]
[ext_resource type="Texture2D" uid="uid://t4w7axbof7bq" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-2.png" id="469_nxglm"]
[ext_resource type="Texture2D" uid="uid://di2npqkvvst6x" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-3.png" id="470_8fyd7"]
[ext_resource type="Texture2D" uid="uid://dsjj23763pej5" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0014.png" id="470_bmmei"]
[ext_resource type="Texture2D" uid="uid://clti3basli30" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-4.png" id="471_dnm27"]
[ext_resource type="Texture2D" uid="uid://n1v4hgd467wp" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-5.png" id="472_e04c3"]
[ext_resource type="Texture2D" uid="uid://blh0t2ofqj2uq" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0016.png" id="472_wdxsr"]
[ext_resource type="Texture2D" uid="uid://l5ym7gi82l1b" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-6.png" id="473_g32y8"]
[ext_resource type="Texture2D" uid="uid://3t1m2xi4ks75" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0018.png" id="474_tu801"]
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer.cs" id="475_nxglm"]
[ext_resource type="Texture2D" uid="uid://drtgi1qyq7fji" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0020.png" id="476_g4jjd"]
[ext_resource type="Texture2D" uid="uid://d3rdsclnqbx7" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0001.png" id="477_qko58"]
[ext_resource type="Texture2D" uid="uid://dqubvx1a08kn4" path="res://art/animation/Vesna2D/Vesna Anims Sequences/F02-Walk/0002.png" id="478_5myrm"]
@@ -467,9 +469,11 @@
[ext_resource type="Texture2D" uid="uid://ds2y033vahyi5" path="res://art/animation/Vesna2D/Vesna Anims Tools/S02-Walk-Gießkanne/0016.png" id="810_224qh"]
[ext_resource type="Texture2D" uid="uid://b0v61all3tsny" path="res://art/animation/Vesna2D/Vesna Anims Tools/S02-Walk-Gießkanne/0018.png" id="812_sf8kv"]
[ext_resource type="Texture2D" uid="uid://cao7vqax8cblo" path="res://art/animation/Vesna2D/Vesna Anims Tools/S02-Walk-Gießkanne/0020.png" id="814_3uq4g"]
[ext_resource type="Texture2D" uid="uid://3pj2q7wtuion" path="res://art/farm/farming/farmobjekte/hoe.png" id="815_1ia2b"]
[ext_resource type="Texture2D" uid="uid://x8hr8287ff2n" path="res://art/farm/farming/farmobjekte/tools atlas.png" id="816_1a3c1"]
[ext_resource type="Script" uid="uid://bcskt5ckh3rqa" path="res://scripts/CSharp/Common/Farming/FarmingControls2D.cs" id="817_6nrw3"]
[ext_resource type="PackedScene" uid="uid://b1d2e7ely6hyw" path="res://prefabs/farm/base_field.tscn" id="818_16w6h"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="819_4na52"]
[ext_resource type="PackedScene" uid="uid://b1d2e7ely6hyw" path="res://prefabs/farm/tomato_field.tscn" id="818_16w6h"]
[ext_resource type="Script" path="res://scripts/GdScript/dialogic_toggle.gd" id="819_4na52"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ssqtd"]
radius = 110.018
@@ -2062,22 +2066,14 @@ animations = [{
"speed": 16.0
}]
[sub_resource type="AudioStream" id="AudioStream_8fyd7"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_dnm27"]
streams_count = 1
stream_0/stream = SubResource("AudioStream_8fyd7")
[node name="Vesna" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d", "_vesnaAnimations")]
y_sort_enabled = true
script = ExtResource("1_yd5ep")
_farmingControls = NodePath("FarmingControls")
_player2d = NodePath("CharacterBody2D")
_vesnaAnimations = NodePath("CharacterBody2D/visuals")
_hoe = ExtResource("2_dnm27")
_wateringCan = ExtResource("3_e04c3")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
[node name="CharacterBody2D" type="CharacterBody2D" parent="." groups=["PlantGrowing"]]
position = Vector2(0, 374)
collision_layer = 4
collision_mask = 3
@@ -2091,7 +2087,7 @@ position = Vector2(-24, -13)
shape = SubResource("CircleShape2D_ssqtd")
debug_color = Color(0.923708, 0.202722, 0.475262, 0.42)
[node name="visuals" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_sprite", "_wateringParticles") groups=["Pickup", "PlantGrowing"]]
[node name="visuals" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_sprite", "_wateringParticles")]
position = Vector2(0, -374)
script = ExtResource("3_f6xmn")
_sprite = NodePath("Animated Sprites")
@@ -2101,31 +2097,75 @@ _wateringParticles = NodePath("../../pouring water vfx")
position = Vector2(0, 450)
sprite_frames = SubResource("SpriteFrames_4yiyq")
animation = &"side walking wateringcan"
frame = 7
frame_progress = 0.229832
frame_progress = 0.130831
offset = Vector2(0, -450)
[node name="WateringCanUI" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_slider")]
[node name="Hoe" type="Sprite2D" parent="CharacterBody2D/visuals"]
visible = false
position = Vector2(-35, -596)
rotation = 0.74351
scale = Vector2(0.24, 0.24)
texture = ExtResource("815_1ia2b")
region_enabled = true
region_rect = Rect2(980, 179, 374, 1233)
[node name="WateringCanEmpty" type="Sprite2D" parent="CharacterBody2D/visuals"]
visible = false
position = Vector2(-38, -603)
scale = Vector2(0.5, 0.5)
texture = ExtResource("816_1a3c1")
region_enabled = true
region_rect = Rect2(-1, 1128, 417, 299)
[node name="WateringCanFull" type="Sprite2D" parent="CharacterBody2D/visuals"]
visible = false
modulate = Color(0.286, 0.16, 1, 1)
position = Vector2(-38, -603)
scale = Vector2(0.5, 0.5)
texture = ExtResource("816_1a3c1")
region_enabled = true
region_rect = Rect2(-1, 1128, 417, 299)
[node name="WateringCanUI" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_stages")]
position = Vector2(0, -929)
scale = Vector2(2, 2)
script = ExtResource("467_j4m0f")
_slider = NodePath("HSlider")
_stages = [NodePath("6"), NodePath("5"), NodePath("4"), NodePath("3"), NodePath("2"), NodePath("1")]
[node name="HSlider" type="HSlider" parent="CharacterBody2D/WateringCanUI"]
[node name="1" type="Sprite2D" parent="CharacterBody2D/WateringCanUI"]
visible = false
modulate = Color(0.3515, 0.780425, 0.95, 1)
custom_minimum_size = Vector2(150, 50)
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -43.0
offset_right = 57.0
offset_bottom = 64.0
grow_horizontal = 2
max_value = 1.0
step = 0.0
editable = false
scrollable = false
position = Vector2(1, 0)
scale = Vector2(1.8, 1.8)
texture = ExtResource("468_f6xmn")
[node name="2" type="Sprite2D" parent="CharacterBody2D/WateringCanUI"]
visible = false
position = Vector2(2, 2)
scale = Vector2(1.6, 1.6)
texture = ExtResource("469_nxglm")
[node name="3" type="Sprite2D" parent="CharacterBody2D/WateringCanUI"]
visible = false
position = Vector2(3, 5)
scale = Vector2(1.4, 1.4)
texture = ExtResource("470_8fyd7")
[node name="4" type="Sprite2D" parent="CharacterBody2D/WateringCanUI"]
visible = false
position = Vector2(3, 7)
scale = Vector2(1.2, 1.2)
texture = ExtResource("471_dnm27")
[node name="5" type="Sprite2D" parent="CharacterBody2D/WateringCanUI"]
visible = false
position = Vector2(2, 7)
scale = Vector2(1.1, 1.1)
texture = ExtResource("472_e04c3")
[node name="6" type="Sprite2D" parent="CharacterBody2D/WateringCanUI"]
visible = false
position = Vector2(3, 12)
texture = ExtResource("473_g32y8")
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
script = ExtResource("817_6nrw3")
@@ -2162,17 +2202,11 @@ scale = Vector2(0.7, 0.7)
script = ExtResource("819_4na52")
itemToToggle = NodePath("../CharacterBody2D/visuals/Animated Sprites")
[node name="SFX" type="Node" parent="."]
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="SFX"]
stream = SubResource("AudioStreamRandomizer_dnm27")
script = ExtResource("475_nxglm")
[connection signal="FilledWateringCan" from="." to="CharacterBody2D/WateringCanUI" method="Refill"]
[connection signal="InventorySelectionChanged" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
[connection signal="PickedUpTool" from="." to="CharacterBody2D/visuals" method="ActivateTool"]
[connection signal="PickedUpTool" from="." to="CharacterBody2D" method="ActivateTool"]
[connection signal="PickedUpTool" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D" method="PlayWateringAnimation"]
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/WateringCanUI" method="Water"]
[connection signal="timelineEnded" from="dialogic toggle" to="." method="EnableMovement"]
[connection signal="timelineStarted" from="dialogic toggle" to="." method="DisableMovement"]
+1 -3
View File
@@ -43,7 +43,7 @@
[ext_resource type="Texture2D" uid="uid://droj8w1mbm5k3" path="res://art/animation/Yeli2D/F02-Yeli_Talk/0019.png" id="39_vg7xi"]
[ext_resource type="Texture2D" uid="uid://by5vtadhdwwag" path="res://art/animation/Yeli2D/F02-Yeli_Talk/0020.png" id="40_ipyxb"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="42_ahrat"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="44_aqu1t"]
[ext_resource type="Script" path="res://scripts/GdScript/dialogic_toggle.gd" id="44_aqu1t"]
[sub_resource type="CircleShape2D" id="CircleShape2D_at1n1"]
resource_local_to_scene = true
@@ -224,9 +224,7 @@ scale = Vector2(0.7, 0.7)
script = ExtResource("44_aqu1t")
itemToToggle = NodePath("../TalkingControl/AnimatedSprite")
[connection signal="FinishedTalking" from="." to="InteractionArea" method="SetActiveInverse"]
[connection signal="Talking" from="." to="Dialogic starter" method="open"]
[connection signal="Interacted" from="InteractionArea" to="." method="ToggleTalking"]
[connection signal="timelineEnded" from="DialogicToggle" to="." method="ToggleTalking"]
[editable path="InteractionArea"]
-40
View File
@@ -1,40 +0,0 @@
[gd_scene load_steps=8 format=3 uid="uid://b1d2e7ely6hyw"]
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="1_qa01x"]
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="2_w8caw"]
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="3_c014y"]
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="4_teirr"]
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="5_wx561"]
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="6_7m4xq"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_2eegd"]
[node name="BaseField" type="Node2D"]
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "PlantingInteraction", "PlantingPlaceholder")]
z_index = -1
scale = Vector2(0.9, 1)
script = ExtResource("1_qa01x")
_fieldSprite = NodePath("MaskedField/FieldTexture")
_maskSprite = NodePath("MaskedField")
_maskTexture = Array[Texture2D]([ExtResource("2_w8caw"), ExtResource("3_c014y"), ExtResource("4_teirr")])
Tilled = ExtResource("5_wx561")
Watered = ExtResource("6_7m4xq")
PlantingInteraction = NodePath("../InteractionArea")
PlantingPlaceholder = NodePath("PlantPlaceholder")
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
clip_children = 1
scale = Vector2(1.5, 1.5)
texture = ExtResource("3_c014y")
[node name="FieldTexture" type="Sprite2D" parent="FieldBehaviour/MaskedField"]
texture = ExtResource("5_wx561")
[node name="PlantPlaceholder" type="Node2D" parent="FieldBehaviour"]
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("7_2eegd")]
position = Vector2(-16, -54)
_active = false
_spriteToOutline = NodePath("../FieldBehaviour/MaskedField/FieldTexture")
[connection signal="Interacted" from="InteractionArea" to="FieldBehaviour" method="Farm"]
+54
View File
@@ -0,0 +1,54 @@
[gd_scene load_steps=10 format=3 uid="uid://b1d2e7ely6hyw"]
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="2_vl3uw"]
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="3_uqkef"]
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="4_di17a"]
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="5_4a8nv"]
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="6_l7j4c"]
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="7_f504p"]
[ext_resource type="PackedScene" uid="uid://gishbn0a8eke" path="res://prefabs/farm/tomato_plant.tscn" id="8_jrdc4"]
[sub_resource type="CircleShape2D" id="CircleShape2D_jrdc4"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_l0vvv"]
resource_local_to_scene = true
radius = 300.0
[node name="BaseField" type="Node2D"]
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_growingCollider")]
z_index = -1
scale = Vector2(0.9, 1)
script = ExtResource("2_vl3uw")
_fieldSprite = NodePath("MaskedField/FieldTexture")
_maskSprite = NodePath("MaskedField")
_maskTexture = Array[Texture2D]([ExtResource("3_uqkef"), ExtResource("4_di17a"), ExtResource("5_4a8nv")])
Tilled = ExtResource("6_l7j4c")
Watered = ExtResource("7_f504p")
_growingCollider = NodePath("BasePlant2/GrowingInteractionArea")
[node name="BasePlant2" parent="FieldBehaviour" node_paths=PackedStringArray("_field") groups=["PlantGrowing"] instance=ExtResource("8_jrdc4")]
visible = false
_field = NodePath("..")
_magicWordNeeded = false
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/GrowingInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_jrdc4")
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_l0vvv")
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
clip_children = 1
scale = Vector2(1.5, 1.5)
texture = ExtResource("4_di17a")
[node name="FieldTexture" type="Sprite2D" parent="FieldBehaviour/MaskedField"]
texture = ExtResource("6_l7j4c")
[editable path="FieldBehaviour/BasePlant2"]
[editable path="FieldBehaviour/BasePlant2/GrowingInteractionArea"]
[editable path="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem"]
[editable path="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/PickupInteractionArea"]
-2
View File
@@ -40,7 +40,6 @@ _bigPlants = [NodePath("BigPlant/01"), NodePath("BigPlant/02"), NodePath("BigPla
_readyPlants = [NodePath("ReadyPlantInventoryItem/ReadyPlant/01"), NodePath("ReadyPlantInventoryItem/ReadyPlant/02"), NodePath("ReadyPlantInventoryItem/ReadyPlant/03"), NodePath("ReadyPlantInventoryItem/ReadyPlant/04")]
_harvestablePlant = NodePath("ReadyPlantInventoryItem")
_magicEffect = NodePath("magic vfx")
_magicWordNeeded = false
[node name="Seeds" type="Node2D" parent="."]
position = Vector2(0, 0.5)
@@ -226,7 +225,6 @@ color = Color(0.400601, 0.62444, 0.791217, 1)
hue_variation_max = 0.4
[connection signal="Interacted" from="GrowingInteractionArea" to="." method="Grow"]
[connection signal="SuccessfulPickUp" from="ReadyPlantInventoryItem" to="." method="queue_free"]
[editable path="GrowingInteractionArea"]
[editable path="ReadyPlantInventoryItem"]
+8
View File
@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://bcld43daavmrn"]
[ext_resource type="Script" uid="uid://cql8mt5jsmcdl" path="res://scripts/CSharp/Common/Fight/FightSceneSwitcher.cs" id="1_5dt1r"]
[node name="FightSceneSwitcher" type="Node"]
script = ExtResource("1_5dt1r")
_fightRoomScenePath = "res://scenes/Babushka_scene_fight_world_room.tscn"
_fightHappeningScene = "res://scenes/Babushka_scene_fight_happening.tscn"
+6
View File
@@ -0,0 +1,6 @@
[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"]
[node name="FightWorldAutoload" type="Node2D"]
script = ExtResource("1_tnyce")
@@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=3 uid="uid://0vm3jb1hnkkb"]
[ext_resource type="PackedScene" uid="uid://7jsxokx67gpq" path="res://prefabs/fight/fighterVisuals/vesna_fighter_visual.tscn" id="1_80xdf"]
[ext_resource type="Texture2D" uid="uid://ccrnmx6bd842k" path="res://art/characters/farm fäulnis blobs.png" id="2_ba6tr"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ane0o"]
atlas = ExtResource("2_ba6tr")
region = Rect2(1133.19, 93.65, 460.526, 347.391)
[node name="BlobFighterVisual" instance=ExtResource("1_80xdf")]
[node name="Sprite2D" parent="Visuals" index="0"]
position = Vector2(23, -96)
scale = Vector2(0.547474, 0.547474)
texture = SubResource("AtlasTexture_ane0o")
[node name="Sprite2D" parent="TargetSelection/HoverIndicator" index="0"]
position = Vector2(1, -126)
@@ -0,0 +1,72 @@
[gd_scene load_steps=9 format=3 uid="uid://7jsxokx67gpq"]
[ext_resource type="Script" uid="uid://by88f32fou7lh" path="res://scripts/CSharp/Common/Fight/FighterVisual.cs" id="1_hai27"]
[ext_resource type="Texture2D" uid="uid://f7htcxiwvuup" path="res://art/animation/vesna/Side/S01-Idle/0001.png" id="2_6l7g5"]
[ext_resource type="Script" uid="uid://boprnfciqgixf" path="res://scripts/CSharp/Common/Fight/UI/TargetSelectionClick.cs" id="3_wil2y"]
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="4_8ldlc"]
[ext_resource type="Script" uid="uid://b2dx06p6i7pu0" path="res://scripts/CSharp/Common/Fight/UI/FighterHealthBarVisual.cs" id="5_xv37w"]
[sub_resource type="AtlasTexture" id="AtlasTexture_wil2y"]
atlas = ExtResource("2_6l7g5")
region = Rect2(60.818, 51.0213, 660.226, 945.537)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_6l7g5"]
size = Vector2(250, 401)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6l7g5"]
radius = 173.0
height = 588.0
[node name="VesnaFighterVisual" type="Node2D" node_paths=PackedStringArray("_visualParent", "_targetSelectionParent", "healthBarVisual")]
script = ExtResource("1_hai27")
_visualParent = NodePath("Visuals")
_targetSelectionParent = NodePath("TargetSelection")
healthBarVisual = NodePath("HealthBar")
[node name="Visuals" type="Node2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="Visuals"]
position = Vector2(-31, -199)
scale = Vector2(0.451719, 0.451719)
texture = SubResource("AtlasTexture_wil2y")
[node name="ChacacterSizeIndicator" type="CollisionShape2D" parent="Visuals"]
editor_description = "This is a reference to the space, a normal sized humanoid character should occupy"
visible = false
position = Vector2(0, -200.5)
shape = SubResource("RectangleShape2D_6l7g5")
[node name="TargetSelection" type="Node2D" parent="."]
process_mode = 4
visible = false
[node name="Click" type="Area2D" parent="TargetSelection"]
script = ExtResource("3_wil2y")
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetSelection/Click"]
position = Vector2(-3, -195)
shape = SubResource("CapsuleShape2D_6l7g5")
[node name="HoverIndicator" type="Node2D" parent="TargetSelection"]
visible = false
[node name="Sprite2D" type="Sprite2D" parent="TargetSelection/HoverIndicator"]
position = Vector2(-3, -227)
scale = Vector2(1.65625, 1.65625)
texture = ExtResource("4_8ldlc")
[node name="HealthBar" type="Node2D" parent="." node_paths=PackedStringArray("_tmpHealthLabel")]
script = ExtResource("5_xv37w")
_tmpHealthLabel = NodePath("tmpLabel")
[node name="tmpLabel" type="Label" parent="HealthBar"]
offset_left = -110.0
offset_top = -528.0
offset_right = 111.0
offset_bottom = -431.0
theme_override_font_sizes/font_size = 71
text = "xx / xx"
[connection signal="TargetSelected" from="TargetSelection/Click" to="." method="ClickedTarget"]
[connection signal="mouse_entered" from="TargetSelection/Click" to="TargetSelection/HoverIndicator" method="show"]
[connection signal="mouse_exited" from="TargetSelection/Click" to="TargetSelection/HoverIndicator" method="hide"]
-123
View File
@@ -1,123 +0,0 @@
[gd_scene load_steps=11 format=3 uid="uid://cpanatqdjjpa3"]
[ext_resource type="Script" uid="uid://by88f32fou7lh" path="res://scripts/CSharp/Common/Fight/Fighter.cs" id="1_f3j2x"]
[ext_resource type="Texture2D" uid="uid://om2axn1vfa5o" path="res://art/animation/Vesna2D/Vesna Anims Sequences/S01-Idle/0001.png" id="2_2ud32"]
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="3_80knd"]
[ext_resource type="AudioStream" uid="uid://ch4c1wh4ghxyo" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Defense_08.wav" id="5_4r2vf"]
[ext_resource type="Texture2D" uid="uid://6h85o7fj7gmu" path="res://art/animation/Vesna3D/vesna-more-tools.png" id="5_l04qi"]
[ext_resource type="Texture2D" uid="uid://crak7ton4lab0" path="res://art/ui/UI/EmptyFightButton.png" id="5_rjjub"]
[ext_resource type="Texture2D" uid="uid://c3wht0nakaki1" path="res://art/ui/UI/icons/icon-fruit-tomatoe.png" id="6_l04qi"]
[ext_resource type="AudioStream" uid="uid://ccionrfr6e3lb" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Attack_04.wav" id="6_u1ayv"]
[sub_resource type="CircleShape2D" id="CircleShape2D_0tqnl"]
radius = 291.58
[sub_resource type="CircleShape2D" id="CircleShape2D_4r2vf"]
radius = 173.44
[node name="VesnaFighter" type="Node2D" node_paths=PackedStringArray("_attackButtons", "_targetButtons", "_targetMarker", "_healthText", "_visualSprite")]
script = ExtResource("1_f3j2x")
name = "Vesna"
maxHealth = 100
attackStrength = 10
_attackButtons = NodePath("FightButtons")
_targetButtons = NodePath("TargetButtons")
_targetMarker = NodePath("TargetButtons/TargetMarker")
_healthText = NodePath("HealthShow")
_visualSprite = NodePath("Sprite2D")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_2ud32")
offset = Vector2(43, -379)
[node name="TargetButtons" type="Node2D" parent="."]
visible = false
[node name="TargetMarker" type="Sprite2D" parent="TargetButtons"]
visible = false
z_index = 200
position = Vector2(8, -122)
scale = Vector2(4.245, 4.245)
texture = ExtResource("3_80knd")
[node name="Area2D" type="Area2D" parent="TargetButtons"]
position = Vector2(3, -76)
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetButtons/Area2D"]
shape = SubResource("CircleShape2D_0tqnl")
[node name="FightButtons" type="Node2D" parent="."]
position = Vector2(3, -714)
[node name="CircleBackground" type="Sprite2D" parent="FightButtons"]
z_index = 200
scale = Vector2(4.245, 4.245)
texture = ExtResource("3_80knd")
[node name="AttackButton" type="Node2D" parent="FightButtons"]
position = Vector2(0, -536)
[node name="ButtonBackground" type="Sprite2D" parent="FightButtons/AttackButton"]
z_index = 200
scale = Vector2(2.48, 2.48)
texture = ExtResource("5_rjjub")
[node name="Sprite2D" type="Sprite2D" parent="FightButtons/AttackButton/ButtonBackground"]
position = Vector2(6.04839, -10.0806)
rotation = -1.0088
scale = Vector2(0.249373, 0.25079)
texture = ExtResource("5_l04qi")
region_enabled = true
region_rect = Rect2(291.897, 15.8974, 272.82, 479.385)
[node name="Area2D" type="Area2D" parent="FightButtons/AttackButton"]
collision_layer = 16
[node name="CollisionShape2D" type="CollisionShape2D" parent="FightButtons/AttackButton/Area2D"]
shape = SubResource("CircleShape2D_4r2vf")
[node name="HealButton" type="Node2D" parent="FightButtons"]
position = Vector2(427, -334)
[node name="ButtonBackground" type="Sprite2D" parent="FightButtons/HealButton"]
z_index = 200
scale = Vector2(2.48, 2.48)
texture = ExtResource("5_rjjub")
[node name="Sprite2D" type="Sprite2D" parent="FightButtons/HealButton/ButtonBackground"]
position = Vector2(4.83871, 0)
scale = Vector2(0.279343, 0.279343)
texture = ExtResource("6_l04qi")
[node name="Area2D" type="Area2D" parent="FightButtons/HealButton"]
collision_layer = 16
[node name="CollisionShape2D" type="CollisionShape2D" parent="FightButtons/HealButton/Area2D"]
shape = SubResource("CircleShape2D_4r2vf")
[node name="HealthShow" type="Label" parent="."]
z_index = 200
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -197.0
offset_top = -947.0
offset_right = 207.0
offset_bottom = -801.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 106
text = "100/100"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HitAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_4r2vf")
[node name="AttackAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_u1ayv")
[connection signal="Attacking" from="." to="AttackAudio" method="play" binds= [0.0]]
[connection signal="DamageTaken" from="." to="HitAudio" method="play" binds= [0.0]]
[connection signal="input_event" from="FightButtons/AttackButton/Area2D" to="." method="AttackMouseEvent"]
[connection signal="input_event" from="FightButtons/HealButton/Area2D" to="." method="HealMouseEvent"]
+41
View File
@@ -0,0 +1,41 @@
[gd_scene load_steps=8 format=3 uid="uid://qfdiudt3vpai"]
[ext_resource type="Script" uid="uid://lequnojtar76" path="res://scripts/CSharp/Common/Fight/RoamingEnemyGroup.cs" id="1_t3mrx"]
[ext_resource type="Texture2D" uid="uid://ccrnmx6bd842k" path="res://art/characters/farm fäulnis blobs.png" id="2_6ftwg"]
[ext_resource type="Texture2D" uid="uid://bexymddkb6l0o" path="res://art/characters/Mavka/mavkha.png" id="3_xi5g8"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="4_xi5g8"]
[sub_resource type="AtlasTexture" id="AtlasTexture_c8fs8"]
atlas = ExtResource("2_6ftwg")
region = Rect2(1747.17, 156.157, 311.249, 280.596)
[sub_resource type="AtlasTexture" id="AtlasTexture_kbgcx"]
atlas = ExtResource("3_xi5g8")
region = Rect2(774.378, 151.512, 1097.48, 1412.67)
[sub_resource type="AtlasTexture" id="AtlasTexture_6fvcb"]
atlas = ExtResource("2_6ftwg")
region = Rect2(1149.47, 92.492, 445.652, 353.692)
[node name="RoamingEnemyGroup" type="Node2D"]
script = ExtResource("1_t3mrx")
[node name="Visuals" type="Node2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="Visuals"]
position = Vector2(99, -222)
texture = SubResource("AtlasTexture_c8fs8")
[node name="Sprite2D3" type="Sprite2D" parent="Visuals"]
position = Vector2(-108, -337)
scale = Vector2(0.43, 0.43)
texture = SubResource("AtlasTexture_kbgcx")
[node name="Sprite2D2" type="Sprite2D" parent="Visuals"]
position = Vector2(-41, -109)
texture = SubResource("AtlasTexture_6fvcb")
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("4_xi5g8")]
_spriteToOutline = [NodePath("../Visuals/Sprite2D"), NodePath("../Visuals/Sprite2D3"), NodePath("../Visuals/Sprite2D2")]
[connection signal="Interacted" from="InteractionArea" to="." method="StartFight"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://hk8ahyp6dgl6"]
[ext_resource type="Script" uid="uid://c76mhhqyk4lgh" path="res://scripts/CSharp/Common/Fight/FightInstance.cs" id="1_ygesl"]
[ext_resource type="Script" uid="uid://oe1uypehqvr7" path="res://scripts/CSharp/Common/Fight/FightStateManager.cs" id="2_b0ivm"]
[ext_resource type="Script" uid="uid://c76mhhqyk4lgh" path="res://scripts/CSharp/Common/FightOld/FightInstance.cs" id="1_ygesl"]
[ext_resource type="Script" uid="uid://oe1uypehqvr7" path="res://scripts/CSharp/Common/FightOld/FightStateManager.cs" id="2_b0ivm"]
[node name="FightBaseScene" type="Node2D" node_paths=PackedStringArray("_friendlyFightSpots", "_enemyFightSpots", "camPositionNode", "_fightStateManager", "_fightEndText")]
script = ExtResource("1_ygesl")
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://cnjsepvaqdbyq"]
[ext_resource type="Script" uid="uid://j5ge24rk25wm" path="res://scripts/CSharp/Common/Fight/FightManager.cs" id="1_8p7ev"]
[ext_resource type="PackedScene" uid="uid://cpanatqdjjpa3" path="res://prefabs/fight/fighters/vesna_fighter.tscn" id="2_ak1vo"]
[ext_resource type="Script" uid="uid://j5ge24rk25wm" path="res://scripts/CSharp/Common/FightOld/FightManager.cs" id="1_8p7ev"]
[ext_resource type="PackedScene" uid="uid://cpanatqdjjpa3" path="res://prefabs/fightOld/fighters/vesna_fighter.tscn" id="2_ak1vo"]
[node name="FightManagerAutoload" type="Node"]
script = ExtResource("1_8p7ev")
@@ -1,7 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://bp64p6y72j71w"]
[ext_resource type="Texture2D" uid="uid://ccrnmx6bd842k" path="res://art/characters/farm fäulnis blobs.png" id="1_vem8k"]
[ext_resource type="Script" uid="uid://by88f32fou7lh" path="res://scripts/CSharp/Common/Fight/Fighter.cs" id="2_4w1ab"]
[ext_resource type="Script" path="res://scripts/CSharp/Common/FightOld/Fighter.cs" id="2_4w1ab"]
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="3_v4f83"]
[ext_resource type="AudioStream" uid="uid://x7cc5woop5ec" path="res://audio/sfx/Battle/Enemies/SFX_Slime_Hit_V2_03.wav" id="5_v4f83"]
[ext_resource type="Texture2D" uid="uid://bn56p0ytuo060" path="res://art/ui/UI/AttackButton.png" id="5_vbkts"]
@@ -19,6 +19,7 @@ script = ExtResource("2_4w1ab")
name = "Blob"
maxHealth = 20
attackStrength = 10
maxActions = null
_attackButtons = NodePath("FightButtons")
_targetButtons = NodePath("TargetButtons")
_targetMarker = NodePath("TargetButtons/TargetMarker")
@@ -95,9 +96,6 @@ stream = ExtResource("6_vbkts")
[node name="AttackAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_oykh8")
[connection signal="Attacking" from="." to="AttackAudio" method="play" binds= [0.0]]
[connection signal="DamageTaken" from="." to="HitAudio" method="play" binds= [0.0]]
[connection signal="Dying" from="." to="DieAudio" method="play" binds= [0.0]]
[connection signal="input_event" from="TargetButtons/Area2D" to="." method="TargetMouseEvent"]
[connection signal="mouse_entered" from="TargetButtons/Area2D" to="." method="StartHoverTarget"]
[connection signal="mouse_exited" from="TargetButtons/Area2D" to="." method="EndHoverTarget"]
@@ -1,6 +1,6 @@
[gd_scene load_steps=10 format=3 uid="uid://cr66tpdr5rma5"]
[ext_resource type="Script" uid="uid://by88f32fou7lh" path="res://scripts/CSharp/Common/Fight/Fighter.cs" id="1_t6th8"]
[ext_resource type="Script" uid="uid://by88f32fou7lh" path="res://scripts/CSharp/Common/Fight/FighterVisual.cs" id="1_t6th8"]
[ext_resource type="Texture2D" uid="uid://bexymddkb6l0o" path="res://art/characters/Mavka/mavkha.png" id="2_shg7p"]
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="3_nkuei"]
[ext_resource type="Texture2D" uid="uid://bn56p0ytuo060" path="res://art/ui/UI/AttackButton.png" id="4_u3hw3"]
@@ -14,16 +14,8 @@ radius = 388.063
[sub_resource type="CircleShape2D" id="CircleShape2D_s74nc"]
radius = 173.44
[node name="EnemyMavkhaFighter" type="Node2D" node_paths=PackedStringArray("_attackButtons", "_targetButtons", "_targetMarker", "_healthText", "_visualSprite")]
[node name="EnemyMavkhaFighter" type="Node2D"]
script = ExtResource("1_t6th8")
name = "Mavkha"
maxHealth = 40
attackStrength = 10
_attackButtons = NodePath("FightButtons")
_targetButtons = NodePath("TargetButtons")
_targetMarker = NodePath("TargetButtons/TargetMarker")
_healthText = NodePath("HealthShow")
_visualSprite = NodePath("Visual")
[node name="Visual" type="Node2D" parent="."]
@@ -0,0 +1,64 @@
[gd_scene load_steps=7 format=3 uid="uid://cpanatqdjjpa3"]
[ext_resource type="Script" path="res://scripts/CSharp/Common/FightOld/Fighter.cs" id="1_f3j2x"]
[ext_resource type="Texture2D" uid="uid://om2axn1vfa5o" path="res://art/animation/Vesna2D/Vesna Anims Sequences/S01-Idle/0001.png" id="2_2ud32"]
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="3_80knd"]
[ext_resource type="AudioStream" uid="uid://ch4c1wh4ghxyo" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Defense_08.wav" id="5_4r2vf"]
[ext_resource type="AudioStream" uid="uid://ccionrfr6e3lb" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Attack_04.wav" id="6_u1ayv"]
[sub_resource type="CircleShape2D" id="CircleShape2D_0tqnl"]
radius = 291.58
[node name="VesnaFighter" type="Node2D" node_paths=PackedStringArray("_attackButtons", "_targetButtons", "_targetMarker", "_healthText", "_visualSprite")]
script = ExtResource("1_f3j2x")
name = "Vesna"
maxHealth = 100
attackStrength = 10
maxActions = null
_attackButtons = NodePath("")
_targetButtons = NodePath("TargetButtons")
_targetMarker = NodePath("TargetButtons/TargetMarker")
_healthText = NodePath("HealthShow")
_visualSprite = NodePath("Sprite2D")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_2ud32")
offset = Vector2(43, -379)
[node name="TargetButtons" type="Node2D" parent="."]
visible = false
[node name="TargetMarker" type="Sprite2D" parent="TargetButtons"]
visible = false
z_index = 200
position = Vector2(8, -122)
scale = Vector2(4.245, 4.245)
texture = ExtResource("3_80knd")
[node name="Area2D" type="Area2D" parent="TargetButtons"]
position = Vector2(3, -76)
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetButtons/Area2D"]
shape = SubResource("CircleShape2D_0tqnl")
[node name="HealthShow" type="Label" parent="."]
z_index = 200
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -197.0
offset_top = -947.0
offset_right = 207.0
offset_bottom = -801.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 106
text = "100/100"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HitAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_4r2vf")
[node name="AttackAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_u1ayv")
+38
View File
@@ -0,0 +1,38 @@
[gd_scene load_steps=7 format=3 uid="uid://bydwj3pbvqrhb"]
[ext_resource type="Script" uid="uid://ct7l4er2kljnc" path="res://scripts/CSharp/Common/Minigame/MinigameController.cs" id="1_17v35"]
[ext_resource type="PackedScene" uid="uid://dhfda4o386byp" path="res://prefabs/minigame/region_visual.tscn" id="2_rrvb1"]
[ext_resource type="Script" uid="uid://djkyrp24ljff0" path="res://scripts/CSharp/Common/Minigame/SpinnyArmVisual.cs" id="3_86pvs"]
[ext_resource type="Texture2D" uid="uid://bgn2ci6nu85t5" path="res://addons/dialogic/Example Assets/next-indicator/next-indicator-dialogic-1.png" id="3_pe4tw"]
[ext_resource type="Script" uid="uid://dq7gahfp0lk7v" path="res://scripts/CSharp/Common/Util/ClickDetect.cs" id="5_86pvs"]
[sub_resource type="CircleShape2D" id="CircleShape2D_pe4tw"]
radius = 554.923
[node name="Minigame" type="Node2D" node_paths=PackedStringArray("_regionsParent")]
script = ExtResource("1_17v35")
_regionVisualPrefab = ExtResource("2_rrvb1")
_regionsParent = NodePath("RegionsParent")
_baseRegionColor = Color(0.176888, 0.482224, 0.338857, 1)
[node name="RegionsParent" type="Node2D" parent="."]
[node name="SpinnyArm" type="Node2D" parent="."]
script = ExtResource("3_86pvs")
[node name="ArmVisual" type="Node2D" parent="SpinnyArm"]
[node name="Sprite" type="Sprite2D" parent="SpinnyArm/ArmVisual"]
position = Vector2(0, -40)
rotation = -3.14159
scale = Vector2(1, 2.08)
texture = ExtResource("3_pe4tw")
[node name="Area2D" type="Area2D" parent="."]
script = ExtResource("5_86pvs")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_pe4tw")
[connection signal="ArmMoved" from="." to="SpinnyArm" method="SetAngle"]
[connection signal="Click" from="Area2D" to="." method="Hit"]
+52
View File
@@ -0,0 +1,52 @@
[gd_scene load_steps=5 format=3 uid="uid://dhfda4o386byp"]
[ext_resource type="Script" uid="uid://cdpsa4qrlai31" path="res://scripts/CSharp/Common/Minigame/RegionVisual.cs" id="1_4ymj8"]
[ext_resource type="Shader" uid="uid://d0dayn7dc885j" path="res://shader/minigame_pie_section.gdshader" id="1_8p2xn"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_86pvs"]
resource_local_to_scene = true
shader = ExtResource("1_8p2xn")
shader_parameter/textureSize = 400.0
shader_parameter/fillColor = Color(0.285466, 0.685481, 0.880632, 1)
shader_parameter/borderColor = Color(1, 1, 1, 1)
shader_parameter/borderWidth = 0.025
shader_parameter/angles = Vector2(0.01, 0.18)
shader_parameter/smoothWidth = 0.0052
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_0navw"]
size = Vector2(400, 400)
[node name="RegionVisual" type="Node2D" node_paths=PackedStringArray("_sliceSprite", "_textLabel", "_labelPivot")]
script = ExtResource("1_4ymj8")
_sliceSprite = NodePath("Sprite2D")
_textLabel = NodePath("LabelPivot/Label")
_labelPivot = NodePath("LabelPivot")
_fillColors = Dictionary[int, Color]({
0: Color(0.427493, 0.427493, 0.427493, 1),
1: Color(0.675735, 0.105671, 0.0799616, 1),
2: Color(0.645128, 0.346481, 0.215967, 1),
3: Color(0.754619, 0.665655, 0.384568, 1),
4: Color(0.365769, 0.400285, 0.598083, 1),
5: Color(0.222174, 0.457454, 0.45483, 1),
6: Color(0.316126, 0.448834, 0.312852, 1),
7: Color(0.244391, 0.640687, 0.283315, 1)
})
[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_86pvs")
texture = SubResource("PlaceholderTexture2D_0navw")
[node name="LabelPivot" type="Node2D" parent="."]
[node name="Label" type="Label" parent="LabelPivot"]
custom_minimum_size = Vector2(100, 40)
offset_left = -50.0
offset_top = -240.0
offset_right = 50.0
offset_bottom = -200.0
pivot_offset = Vector2(50, 20)
size_flags_horizontal = 0
theme_override_font_sizes/font_size = 21
text = "test"
horizontal_alignment = 1
vertical_alignment = 1
+2 -3
View File
@@ -28,10 +28,10 @@ buses/default_bus_layout="uid://b6dwkmkyb0axk"
SceneTransition="*res://scenes/SceneTransition.tscn"
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs"
QuestManager="*res://prefabs/quests/quest_manager_autoload.tscn"
FightManagerAutoload="*res://prefabs/fight/fight_manager_autoload.tscn"
InputService="*res://scripts/CSharp/Common/Services/InputService.cs"
QuestManager="*res://prefabs/quests/quest_manager_autoload.tscn"
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
FightWorldAutoload="*res://prefabs/fight/fight_world_autoload.tscn"
[dialogic]
@@ -207,7 +207,6 @@ folder_colors={
[global_group]
PlantGrowing=""
Pickup=""
[input]
+1 -3
View File
@@ -1,8 +1,7 @@
[gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://d1uuxp1lp4aro"]
[gd_resource type="Resource" script_class="ItemResource" load_steps=3 format=3 uid="uid://d1uuxp1lp4aro"]
[ext_resource type="Script" uid="uid://cbskymrxs6ksu" path="res://scripts/CSharp/Common/Inventory/ItemResource.cs" id="1_dustj"]
[ext_resource type="Texture2D" uid="uid://ce04nexh36uwe" path="res://art/ui/UI/icons/icon-seed-tomatoe.png" id="1_u15c2"]
[ext_resource type="PackedScene" uid="uid://gishbn0a8eke" path="res://prefabs/farm/tomato_plant.tscn" id="2_xhgqu"]
[resource]
script = ExtResource("1_dustj")
@@ -10,5 +9,4 @@ name = "Tomato Seed"
color = Color(0.135039, 0.307214, 0.333128, 1)
icon = ExtResource("1_u15c2")
maxStack = 20
itemPrefab = ExtResource("2_xhgqu")
metadata/_custom_type_script = "uid://cbskymrxs6ksu"
+1
View File
@@ -5,5 +5,6 @@
[node name="BabushkaSceneBootstrap" type="Node2D"]
[node name="BabushkaSceneStartMenu" parent="." instance=ExtResource("1_15ton")]
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_fight_world_room.tscn")
[node name="SceneParent" type="Node" parent="."]
+88 -40
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=114 format=3 uid="uid://gigb28qk8t12"]
[gd_scene load_steps=119 format=3 uid="uid://gigb28qk8t12"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/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"]
@@ -30,13 +30,15 @@
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="24_wtdui"]
[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="Resource" uid="uid://c5yg3lx756v4v" path="res://resources/items/hoe.tres" id="26_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/interactions/interaction_area_2d.tscn" id="27_klb81"]
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="28_6b2nr"]
[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="Script" uid="uid://boehox1ydbcnx" path="res://scripts/CSharp/Common/Farming/WellBehaviour.cs" id="32_lbnqo"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="34_e5b7x"]
[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="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"]
@@ -163,6 +165,10 @@ size = Vector2(1041, 368)
resource_local_to_scene = true
radius = 371.058
[sub_resource type="CircleShape2D" id="CircleShape2D_ycj14"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_2065p"]
resource_local_to_scene = true
radius = 300.0
@@ -171,6 +177,14 @@ radius = 300.0
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_lbnqo"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="CircleShape2D" id="CircleShape2D_l4wxt"]
resource_local_to_scene = true
radius = 300.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lhtpe"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bcdgk"]
@@ -1037,6 +1051,7 @@ z_index = 1
position = Vector2(9322, 2018)
_fieldParent = NodePath("../Farm visuals/FieldParent")
_hoe = ExtResource("28_6b2nr")
_wateringCan = ExtResource("28_ipqaa")
[node name="FarmingControls" parent="YSorted/Vesna" index="1" node_paths=PackedStringArray("_camera")]
_camera = NodePath("../../../Camera2D")
@@ -1060,21 +1075,36 @@ collision_mask = 4
position = Vector2(145.5, -224)
shape = SubResource("RectangleShape2D_0sfl7")
[node name="InteractionArea" parent="YSorted/Brünnen" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("27_klb81")]
[node name="InteractionArea" parent="YSorted/Brünnen" instance=ExtResource("27_klb81")]
_active = false
_spriteToOutline = NodePath("..")
_id = 1
[node name="CollisionShape3D" parent="YSorted/Brünnen/InteractionArea/Area2D" index="0"]
position = Vector2(146, -130)
shape = SubResource("CircleShape2D_p6n74")
[node name="HoeGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
visible = false
position = Vector2(6095, 2087)
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
_blueprint = ExtResource("26_ipqaa")
[node name="PickupInteractionArea" parent="YSorted/HoeGenericPickup" index="3" node_paths=PackedStringArray("_spriteToOutline")]
_spriteToOutline = []
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_ycj14")
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
position = Vector2(8192, 3507)
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
_blueprint = ExtResource("28_ipqaa")
[node name="PickupInteractionArea" parent="YSorted/CanGenericPickup" index="3" node_paths=PackedStringArray("_spriteToOutline")]
_spriteToOutline = []
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_2065p")
@@ -1087,21 +1117,37 @@ position = Vector2(8391, 2060)
[node name="SpawnWithItem" parent="YSorted/RakeGenericPickup" index="0"]
_blueprint = ExtResource("28_6b2nr")
[node name="PickupInteractionArea" parent="YSorted/RakeGenericPickup" index="3" node_paths=PackedStringArray("_spriteToOutline")]
_spriteToOutline = []
[node name="CollisionShape3D" parent="YSorted/RakeGenericPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_tm0yg")
[node name="SeedPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
position = Vector2(10114, 2469)
_infiniteSupply = true
[node name="ScytheGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
visible = false
position = Vector2(15642, 2158)
[node name="SpawnWithItem" parent="YSorted/SeedPickup" index="0"]
_blueprint = ExtResource("35_64mdn")
[node name="SpawnWithItem" parent="YSorted/ScytheGenericPickup" index="0"]
_blueprint = ExtResource("29_wtdui")
[node name="CollisionShape3D" parent="YSorted/SeedPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_tm0yg")
[node name="PickupInteractionArea" parent="YSorted/ScytheGenericPickup" index="3" node_paths=PackedStringArray("_spriteToOutline")]
_spriteToOutline = []
[node name="Icon" parent="YSorted/SeedPickup" index="4"]
scale = Vector2(1, 1)
[node name="CollisionShape3D" parent="YSorted/ScytheGenericPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_lbnqo")
[node name="ShovelGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
visible = false
position = Vector2(5454, 2049)
[node name="SpawnWithItem" parent="YSorted/ShovelGenericPickup" index="0"]
_blueprint = ExtResource("27_ipqaa")
[node name="PickupInteractionArea" parent="YSorted/ShovelGenericPickup" index="3" node_paths=PackedStringArray("_spriteToOutline")]
_spriteToOutline = []
[node name="CollisionShape3D" parent="YSorted/ShovelGenericPickup/PickupInteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_l4wxt")
[node name="Farm visuals" type="Node2D" parent="YSorted"]
position = Vector2(-60, 122)
@@ -1124,10 +1170,9 @@ collision_mask = 6
position = Vector2(-252.56, 231.32)
polygon = PackedVector2Array(247.227, 43.5123, 44.7822, 43.5123, -87.2178, 45.123, -104.329, -55.2797, -154.107, -73.5347, -160.107, -380.38, -175.44, -400.783, -63.44, -512.461, 97.8934, -541.991, 261.671, -599.172, 374.782, -526.421, 502.338, -526.421, 637.893, -396.488, 598.56, -360.783, 596.338, -58.2327, 528.782, -58.2327, 501.449, 45.9283)
[node name="EnterHouseInteraction" parent="YSorted/Farm visuals/Static" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("27_klb81")]
[node name="EnterHouseInteraction" parent="YSorted/Farm visuals/Static" instance=ExtResource("27_klb81")]
position = Vector2(5839, 2349)
scale = Vector2(2.425, 2.425)
_spriteToOutline = NodePath("DoorSprite")
_id = 0
[node name="DoorSprite" type="Sprite2D" parent="YSorted/Farm visuals/Static/EnterHouseInteraction"]
@@ -1160,7 +1205,6 @@ region_rect = Rect2(130, 0, 201, 278)
[node name="bush6" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/left side"]
modulate = Color(0.8428, 0.8771, 0.98, 1)
z_index = 2
material = SubResource("ShaderMaterial_bcdgk")
position = Vector2(2612, 4022)
scale = Vector2(2, 2)
@@ -1256,7 +1300,6 @@ region_enabled = true
region_rect = Rect2(1699, 76, 280, 230)
[node name="bush14" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/left side"]
z_index = 2
material = SubResource("ShaderMaterial_bcdgk")
position = Vector2(8925, 4194)
scale = Vector2(-5.54387, 3.80466)
@@ -1380,6 +1423,18 @@ offset = Vector2(0, -172)
region_enabled = true
region_rect = Rect2(1837, 651, 139, 180)
[node name="bush24" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/left side"]
modulate = Color(0.8428, 0.8771, 0.98, 1)
z_index = 2
y_sort_enabled = true
material = SubResource("ShaderMaterial_bcdgk")
position = Vector2(15973, 3380)
scale = Vector2(-1.93815, 1.5875)
texture = ExtResource("14_mrwmr")
offset = Vector2(0, -172)
region_enabled = true
region_rect = Rect2(1464, 419, 144, 115)
[node name="bush3" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/left side"]
modulate = Color(1, 0.86, 0.86, 1)
material = SubResource("ShaderMaterial_bcdgk")
@@ -1517,7 +1572,6 @@ region_enabled = true
region_rect = Rect2(1699, 76, 280, 230)
[node name="bush13" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/right side"]
z_index = 2
material = SubResource("ShaderMaterial_bcdgk")
position = Vector2(8145, 4141)
scale = Vector2(-2.82886, 2.51195)
@@ -1527,7 +1581,6 @@ region_enabled = true
region_rect = Rect2(1699, 76, 280, 230)
[node name="bush14" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/right side"]
z_index = 2
material = SubResource("ShaderMaterial_bcdgk")
position = Vector2(8925, 4194)
scale = Vector2(-5.54387, 3.80466)
@@ -1538,7 +1591,6 @@ region_rect = Rect2(130, 0, 201, 278)
[node name="bush15" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/right side"]
modulate = Color(0.8428, 0.8771, 0.98, 1)
z_index = 2
material = SubResource("ShaderMaterial_bcdgk")
position = Vector2(7763, 4164)
scale = Vector2(3.21806, 3.18583)
@@ -1805,7 +1857,7 @@ region_enabled = true
region_rect = Rect2(29, 204, 219, 159)
[node name="grass27" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/grass"]
z_index = 2
z_index = -5
position = Vector2(7757, 3423)
rotation = 1.57079
scale = Vector2(7.28513, 6.16997)
@@ -1953,7 +2005,7 @@ region_rect = Rect2(29, 204, 219, 159)
[node name="grass5" type="Sprite2D" parent="YSorted/Farm visuals/Static/greenery/grass"]
z_index = -5
position = Vector2(15381, 3152)
position = Vector2(15375, 3149)
scale = Vector2(5.77602, 3.87779)
texture = ExtResource("44_uxa2m")
region_enabled = true
@@ -2293,13 +2345,6 @@ offset_top = 0.228533
offset_right = -456.339
offset_bottom = 30.2285
[node name="QuestLogRoot" parent="CanvasLayer" index="2"]
metadata/_edit_use_anchors_ = true
[node name="Text" parent="CanvasLayer/Control/ColorRect" index="0"]
text = "[Hier könnte ihre Werbung stehen]"
autowrap_mode = 3
[node name="Audio" type="Node" parent="."]
[node name="Background Music Ramp up" type="AudioStreamPlayer2D" parent="Audio"]
@@ -2341,28 +2386,28 @@ max_distance = 2e+07
playback_type = 2
script = ExtResource("40_w3jkj")
[node name="SpecialQuestTrigger" type="Node" parent="."]
[node name="SpeicialQuestTrigger" type="Node" parent="."]
[node name="QuestInstantStart" type="Node" parent="SpecialQuestTrigger"]
[node name="QuestInstantStart" type="Node" parent="SpeicialQuestTrigger"]
[node name="QuestTrigger" type="Node" parent="SpecialQuestTrigger/QuestInstantStart"]
[node name="QuestTrigger" type="Node" parent="SpeicialQuestTrigger/QuestInstantStart"]
script = ExtResource("66_2065p")
questResource = ExtResource("67_tm0yg")
toStatus = 1
makeActive = true
[node name="ToolsCollectedTrigger" type="Node" parent="SpecialQuestTrigger"]
[node name="ToolsCollectedTrigger" type="Node" parent="SpeicialQuestTrigger"]
script = ExtResource("68_hux6i")
_itemsToContain = Array[Resource]([SubResource("Resource_y820s"), SubResource("Resource_50loj")])
_onAvailableQuest = ExtResource("68_lbnqo")
_toNextQuest = ExtResource("69_l4wxt")
[node name="FieldWorkTrigger" type="Node" parent="SpecialQuestTrigger"]
[node name="FieldWorkTrigger" type="Node" parent="SpeicialQuestTrigger"]
script = ExtResource("74_fv1t2")
_onAvailableQuest = ExtResource("75_l7ekk")
_toNextQuest = ExtResource("76_xcwle")
[node name="StartDialog" type="Node" parent="SpecialQuestTrigger/FieldWorkTrigger"]
[node name="StartDialog" type="Node" parent="SpeicialQuestTrigger/FieldWorkTrigger"]
script = ExtResource("77_l7ekk")
timeline = "quest2_tomatoes_end"
@@ -2371,7 +2416,6 @@ timeline = "quest2_tomatoes_end"
[connection signal="InteractedTool" from="YSorted/Brünnen/InteractionArea" to="YSorted/Vesna" method="TryFillWateringCan"]
[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/SeedPickup" to="YSorted/Vesna" method="HandlePickUp"]
[connection signal="InteractedTool" from="YSorted/Farm visuals/Static/EnterHouseInteraction" to="." method="LoadSceneAtIndex"]
[connection signal="FieldCreated" from="YSorted/Farm visuals/FieldParent" to="Audio/SFX/Farming SFX" method="PlayOneShot"]
[connection signal="input_event" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Vesna/FarmingControls" method="InputEventPressedOn"]
@@ -2384,15 +2428,19 @@ timeline = "quest2_tomatoes_end"
[connection signal="DuckCollected" from="YSorted/ducks/Duck7" to="YSorted/ducks" method="Increment"]
[connection signal="Dialogue" from="YSorted/ducks/DialogicToggle" to="YSorted/ducks/dialogic starter" method="open"]
[connection signal="finished" from="Audio/Background Music Ramp up" to="Audio/Background Music loop" method="PlayFromOffset"]
[connection signal="ready" from="SpecialQuestTrigger/QuestInstantStart" to="SpecialQuestTrigger/QuestInstantStart/QuestTrigger" method="Trigger"]
[connection signal="OnFulfilled" from="SpecialQuestTrigger/FieldWorkTrigger" to="SpecialQuestTrigger/FieldWorkTrigger/StartDialog" method="open"]
[connection signal="ready" from="SpeicialQuestTrigger/QuestInstantStart" to="SpeicialQuestTrigger/QuestInstantStart/QuestTrigger" method="Trigger"]
[connection signal="OnFulfilled" from="SpeicialQuestTrigger/FieldWorkTrigger" to="SpeicialQuestTrigger/FieldWorkTrigger/StartDialog" method="open"]
[editable path="YSorted/Vesna"]
[editable path="YSorted/Brünnen/InteractionArea"]
[editable path="YSorted/HoeGenericPickup"]
[editable path="YSorted/HoeGenericPickup/PickupInteractionArea"]
[editable path="YSorted/CanGenericPickup"]
[editable path="YSorted/CanGenericPickup/PickupInteractionArea"]
[editable path="YSorted/RakeGenericPickup"]
[editable path="YSorted/RakeGenericPickup/PickupInteractionArea"]
[editable path="YSorted/SeedPickup"]
[editable path="YSorted/SeedPickup/PickupInteractionArea"]
[editable path="YSorted/ScytheGenericPickup"]
[editable path="YSorted/ScytheGenericPickup/PickupInteractionArea"]
[editable path="YSorted/ShovelGenericPickup"]
[editable path="YSorted/ShovelGenericPickup/PickupInteractionArea"]
[editable path="CanvasLayer"]
+220
View File
@@ -0,0 +1,220 @@
[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://c76mhhqyk4lgh" path="res://scripts/CSharp/Common/Fight/FightHappening.cs" id="1_gsk03"]
[ext_resource type="Script" uid="uid://dtf4ejct4m682" path="res://scripts/CSharp/Common/Fight/ActionAnimationController.cs" id="2_7kjgs"]
[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://7jsxokx67gpq" path="res://prefabs/fight/fighterVisuals/vesna_fighter_visual.tscn" id="4_qo0gi"]
[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="PackedScene" uid="uid://bydwj3pbvqrhb" path="res://prefabs/minigame/minigame.tscn" id="8_2b3cf"]
[ext_resource type="Script" uid="uid://byf2ywov34g0x" path="res://scripts/CSharp/Common/Fight/UI/ActionSelectUiSetup.cs" id="8_bkwsr"]
[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://2f7rqk50gtdg" path="res://scripts/CSharp/Common/Fight/SwitchSceneOnFightEnd.cs" id="10_qqd8u"]
[node name="BabushkaSceneFightHappening" type="Node2D"]
[node name="FightHappening" type="Node" parent="."]
script = ExtResource("1_gsk03")
[node name="ActionAnimationController" type="Node" parent="." node_paths=PackedStringArray("_allFightersVisual")]
script = ExtResource("2_7kjgs")
_allFightersVisual = NodePath("../FightVisuals")
[node name="StateReactionActionAnimation" type="Node" parent="ActionAnimationController"]
script = ExtResource("4_ydj1i")
_fightState = 10
[node name="Camera2D" type="Camera2D" parent="."]
[node name="FightSetup" type="Node2D" parent="."]
script = ExtResource("1_fiutj")
[node name="FightVisuals" type="Node2D" parent="." node_paths=PackedStringArray("_allyFighters", "_enemyFighters")]
position = Vector2(0, 259)
script = ExtResource("2_lu4y4")
_allyFighters = NodePath("AllyFighters")
_enemyFighters = NodePath("EnemyFighters")
_blobFighterVisual = ExtResource("4_vp8s0")
_vesnaFighterVisual = ExtResource("4_qo0gi")
_positionDistanceFromCenter = PackedFloat32Array(300, 550, 800)
[node name="AllyFighters" type="Node2D" parent="FightVisuals"]
[node name="EnemyFighters" type="Node2D" parent="FightVisuals"]
[node name="EnvironmentVisuals" type="Node2D" parent="."]
[node name="MinigameHandler" type="Node2D" parent="." node_paths=PackedStringArray("_minigameController")]
script = ExtResource("8_falfe")
_minigameController = NodePath("Minigame")
[node name="Minigame" parent="MinigameHandler" instance=ExtResource("8_2b3cf")]
process_mode = 4
visible = false
[node name="SwitchSceneOnFightEnd" type="Node" parent="." node_paths=PackedStringArray("_fightSceneSwitcher")]
script = ExtResource("10_qqd8u")
_fightSceneSwitcher = NodePath("FightSceneSwitcher")
[node name="FightSceneSwitcher" parent="SwitchSceneOnFightEnd" node_paths=PackedStringArray("_sceneRoot") instance=ExtResource("2_phrlx")]
_sceneRoot = NodePath("../..")
[node name="ActionSelect" type="CanvasLayer" parent="." node_paths=PackedStringArray("_attackActionButton", "_summonActionButton", "_talkActionButton", "_fleeActionButton")]
visible = false
script = ExtResource("8_bkwsr")
_attackActionButton = NodePath("BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer/AttackButton")
_summonActionButton = NodePath("BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer2/Summon Button")
_talkActionButton = NodePath("BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3/Talk Button")
_fleeActionButton = NodePath("BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer4/Flee Button")
[node name="BottomPanel" type="Control" parent="ActionSelect"]
custom_minimum_size = Vector2(0, 200)
layout_mode = 3
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0
size_flags_vertical = 8
[node name="background" type="ColorRect" parent="ActionSelect/BottomPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(1, 1, 1, 0.27451)
[node name="VBoxContainer" type="VBoxContainer" parent="ActionSelect/BottomPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/margin_left = 200
theme_override_constants/margin_right = 200
[node name="HBoxContainer" type="HBoxContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer"]
layout_mode = 2
alignment = 1
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="AttackButton" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 41
text = "Attack"
[node name="MarginContainer2" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="Summon Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 41
text = "Summon"
[node name="MarginContainer3" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="Talk Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3"]
layout_mode = 2
theme_override_font_sizes/font_size = 41
text = "Talk"
[node name="MarginContainer4" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="Flee Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer4"]
layout_mode = 2
theme_override_font_sizes/font_size = 41
text = "Flee"
[node name="MarginContainer2" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/margin_left = 200
theme_override_constants/margin_right = 200
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="Label" type="Label" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2/MarginContainer"]
layout_mode = 2
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 41
text = "This text explains the currently hovered button"
[node name="StateReactionInputActionSelect" type="Node" parent="ActionSelect"]
script = ExtResource("4_ydj1i")
_fightState = 6
[node name="StateMachineDebugger" type="Node" parent="." node_paths=PackedStringArray("_label", "_current")]
script = ExtResource("8_tv7cl")
_label = NodePath("Label")
_current = NodePath("Current")
[node name="Label" type="Label" parent="StateMachineDebugger"]
offset_left = -982.0
offset_top = -497.0
offset_right = -893.0
offset_bottom = -474.0
text = "Hello world"
[node name="Current" type="Label" parent="StateMachineDebugger"]
offset_left = 705.0
offset_top = -495.0
offset_right = 794.0
offset_bottom = -472.0
text = "Hello world"
[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="ActionSelect/StateReactionInputActionSelect" method="FightHappeningStateTransitioned"]
[connection signal="SignalTransitionState" from="FightHappening" to="StateMachineDebugger" method="StateChange"]
[connection signal="SignalTransitionToState" from="FightHappening" to="MinigameHandler" method="OnStateEnter"]
[connection signal="SignalTransitionToState" from="FightHappening" to="SwitchSceneOnFightEnd" method="OnFightStateEnter"]
[connection signal="OnStateEntered" from="ActionAnimationController/StateReactionActionAnimation" to="ActionAnimationController" method="StateEnter"]
[connection signal="OnStateExited" from="ActionAnimationController/StateReactionActionAnimation" to="ActionAnimationController" method="StateExit"]
[connection signal="pressed" from="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer/AttackButton" to="ActionSelect" method="SelectAction" binds= [1]]
[connection signal="pressed" from="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer2/Summon Button" to="ActionSelect" method="SelectAction" binds= [2]]
[connection signal="pressed" from="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3/Talk Button" to="ActionSelect" method="SelectAction" binds= [3]]
[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="StateEntered"]
[connection signal="OnStateExited" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="hide"]
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -24,12 +24,12 @@
[ext_resource type="Texture2D" uid="uid://bmjjfd5ngptxe" path="res://art/nature/baum märz 2025/backtreebois team kennedy.png" id="23_uhyft"]
[ext_resource type="Texture2D" uid="uid://bcw6oeovkmiup" path="res://art/nature/baum märz 2025/sonnenblumeseamless.png" id="24_3fmyy"]
[ext_resource type="Shader" uid="uid://xnky830dtfsn" path="res://shader/repeat_texture.gdshader" id="25_sgom5"]
[ext_resource type="Script" uid="uid://di0xxwfw43m0i" path="res://scripts/CSharp/Common/Fight/FightStarter.cs" id="26_gg38r"]
[ext_resource type="PackedScene" uid="uid://hk8ahyp6dgl6" path="res://prefabs/fight/fight_base_scene.tscn" id="27_55b52"]
[ext_resource type="PackedScene" uid="uid://bp64p6y72j71w" path="res://prefabs/fight/fighters/enemy_blob_fighter.tscn" id="27_hfhye"]
[ext_resource type="Script" uid="uid://di0xxwfw43m0i" path="res://scripts/CSharp/Common/FightOld/FightStarter.cs" id="26_gg38r"]
[ext_resource type="PackedScene" uid="uid://hk8ahyp6dgl6" path="res://prefabs/fightOld/fight_base_scene.tscn" id="27_55b52"]
[ext_resource type="PackedScene" uid="uid://bp64p6y72j71w" path="res://prefabs/fightOld/fighters/enemy_blob_fighter.tscn" id="27_hfhye"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="29_3jjxs"]
[ext_resource type="PackedScene" uid="uid://ddpl8cbck7e6s" path="res://prefabs/characters/Chugar.tscn" id="29_26tkn"]
[ext_resource type="PackedScene" uid="uid://cr66tpdr5rma5" path="res://prefabs/fight/fighters/enemy_mavkha_fighter.tscn" id="29_hfhye"]
[ext_resource type="PackedScene" uid="uid://cr66tpdr5rma5" path="res://prefabs/fightOld/fighters/enemy_mavkha_fighter.tscn" id="29_hfhye"]
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="30_l10vl"]
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="31_c2gvt"]
[ext_resource type="Texture2D" uid="uid://dyueumlr5ltvr" path="res://art/nature/baum märz 2025/megaeichel megaast.png" id="37_gg38r"]
+1
View File
@@ -105,6 +105,7 @@ _data = {
}
[node name="SceneTransition" type="CanvasLayer" node_paths=PackedStringArray("animationPlayer")]
layer = 100
script = ExtResource("1_e0bkc")
animationPlayer = NodePath("SceneFadeAnimation")
@@ -0,0 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://c1dsbe7ryaije"]
[ext_resource type="Script" uid="uid://iv0dbf32bfw1" path="res://scripts/CSharp/Common/TestScripts/MinigameTestStarter.cs" id="1_fwf73"]
[ext_resource type="PackedScene" uid="uid://bydwj3pbvqrhb" path="res://prefabs/minigame/minigame.tscn" id="1_wh3re"]
[node name="BabushkaSceneMinigameTest" type="Node2D" node_paths=PackedStringArray("_minigameController")]
script = ExtResource("1_fwf73")
_minigameController = NodePath("Minigame")
[node name="Minigame" parent="." instance=ExtResource("1_wh3re")]
[node name="Camera2D" type="Camera2D" parent="."]
+16
View File
@@ -0,0 +1,16 @@
using Godot;
using System;
public partial class Button : Godot.Button
{
//[Export] private AudioStreamPlaybackInteractive _audioStreamInteractive;
[Export] private AudioStreamPlayer2D _palyer;
private int bla = 0;
public void Pressed()
{
bla = bla == 0 ? 1 : 0;
var s = ((AudioStreamPlaybackSynchronized)_palyer.GetStreamPlayback());
}
}
+1
View File
@@ -0,0 +1 @@
uid://bfyhyjutba2o
+8
View File
@@ -0,0 +1,8 @@
extends Button
@export var i:
func _on_pressed() -> void:
pass # Replace with function body.
+1
View File
@@ -0,0 +1 @@
uid://b126dduoht87j
+82
View File
@@ -0,0 +1,82 @@
[gd_scene load_steps=14 format=3 uid="uid://b4cch0o4218rb"]
[ext_resource type="AudioStream" uid="uid://iux86v7qmf33" path="res://audio/Music/TestingMusic/FightTest_Base.ogg" id="1_kcx1j"]
[ext_resource type="AudioStream" uid="uid://cimd2rvdwtfkv" path="res://audio/Music/TestingMusic/FightTest_Pattern1.ogg" id="2_71etn"]
[ext_resource type="AudioStream" uid="uid://kpbkw64o86q4" path="res://audio/Music/TestingMusic/FightTest_Pattern2.ogg" id="3_3u8ta"]
[ext_resource type="AudioStream" uid="uid://cmyrgerm8m4nw" path="res://audio/Music/TestingMusic/FightTest_Pattern3.ogg" id="4_1dcxw"]
[ext_resource type="AudioStream" uid="uid://ddu3pxk121x87" path="res://audio/Music/TestingMusic/NightTest_Pattern1.ogg" id="5_80mhq"]
[ext_resource type="AudioStream" uid="uid://ddxekmi71ekin" path="res://audio/Music/TestingMusic/NightTest_Pattern2.ogg" id="6_ui405"]
[ext_resource type="AudioStream" uid="uid://cjnt07ai5bed8" path="res://audio/Music/TestingMusic/NightTest_Pattern3.ogg" id="7_dpoqt"]
[ext_resource type="AudioStream" uid="uid://bk5yqto8j3egp" path="res://audio/sfx/SFX_Quest_Fail_Placeholder_01.wav" id="8_71etn"]
[ext_resource type="Script" uid="uid://bfyhyjutba2o" path="res://scenes/testing/Button.cs" id="9_3u8ta"]
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_ks5rm"]
resource_name = "test"
stream_count = 3
stream_0/stream = ExtResource("2_71etn")
stream_0/volume = 0.0
stream_1/stream = ExtResource("3_3u8ta")
stream_1/volume = 0.0
stream_2/stream = ExtResource("4_1dcxw")
stream_2/volume = 0.0
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_kt7r4"]
stream_count = 3
stream_0/stream = ExtResource("5_80mhq")
stream_0/volume = 0.0
stream_1/stream = ExtResource("6_ui405")
stream_1/volume = 0.0
stream_2/stream = ExtResource("7_dpoqt")
stream_2/volume = 0.0
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_nwvf5"]
clip_count = 3
clip_0/name = &"fight"
clip_0/stream = SubResource("AudioStreamSynchronized_ks5rm")
clip_0/auto_advance = 1
clip_0/next_clip = 1
clip_1/name = &"night"
clip_1/stream = SubResource("AudioStreamSynchronized_kt7r4")
clip_1/auto_advance = 1
clip_1/next_clip = 0
clip_2/name = &"fanfare"
clip_2/stream = ExtResource("8_71etn")
clip_2/auto_advance = 0
_transitions = {
Vector2i(0, 1): {
"fade_beats": 1.0,
"fade_mode": 4,
"filler_clip": 2,
"from_time": 0,
"to_time": 0,
"use_filler_clip": true
}
}
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_sv75a"]
stream_count = 2
stream_0/stream = ExtResource("1_kcx1j")
stream_0/volume = 0.0
stream_1/stream = SubResource("AudioStreamInteractive_nwvf5")
stream_1/volume = 0.0
[node name="Node2D" type="Node2D"]
[node name="Music" type="AudioStreamPlayer2D" parent="."]
stream = SubResource("AudioStreamSynchronized_sv75a")
autoplay = true
[node name="Button" type="Button" parent="." node_paths=PackedStringArray("_palyer")]
offset_left = 56.0
offset_top = 31.0
offset_right = 349.0
offset_bottom = 175.0
script = ExtResource("9_3u8ta")
_palyer = NodePath("../Music")
[node name="Camera2D" type="Camera2D" parent="."]
[node name="Camera3D" type="Camera3D" parent="."]
fov = 104.538
[connection signal="pressed" from="Button" to="Button" method="Pressed"]
@@ -18,10 +18,13 @@ public partial class CameraController : Camera2D
[Export] private Node2D _followNode;
public FightInstance? fightToShow;
public FightHappening? fightToShow;
public override void _Process(double delta)
{
this.GlobalPosition = fightToShow?.camPositionNode.GlobalPosition ?? _followNode.GlobalPosition;
this.GlobalPosition = /*fightToShow?.camPositionNode.GlobalPosition ??*/ _followNode.GlobalPosition;
}
}
@@ -1,5 +1,6 @@
using System;
using Babushka.scripts.CSharp.Common.Services;
using System.Linq;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.CharacterControls;
@@ -11,103 +12,99 @@ public partial class InteractionArea2D : Node2D
[Export] private bool _active = true;
[Export] private bool _useOutline = true;
[Export] private ShaderMaterial _outlineMaterial;
[Export] private bool _useSprite = true;
[Export] private CanvasItem _spriteToOutline;
//[Export] private bool _useSprite = true;
[Export(PropertyHint.ArrayType)] private CanvasItem[] _spriteToOutline = [];
[Export] private bool _showLabel = true;
[Export] private int _id = -1; // TODO: remove
private Material _backupMaterial;
private Material[] _backupMaterial;
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
[Signal] public delegate void InteractedEventHandler();
public bool IsActive
{
get => _active;
set => _active = value;
set => _active = value;
}
public void SetActiveInverse(bool active)
{
IsActive = !active;
}
public override void _Ready()
{
if (_useSprite && _useOutline)
if (_useOutline)
{
try
{
_backupMaterial = _spriteToOutline.Material;
_backupMaterial = _spriteToOutline.Select(s => s.Material).ToArray();
}
catch(Exception exception)
catch (Exception exception)
{
GD.PrintErr($"No sprite to outline found on: {GetParent().Name}" + exception.Message);
}
}
}
public void OnPlayerEntered(Node2D player)
{
if (!_active || !InputService.Instance.InputEnabled)
if (!_active)
return;
if(_showLabel)
if (_showLabel)
_label.Show();
if (!_useSprite || !_useOutline)
if (!_useOutline)
return;
_spriteToOutline.Material = _outlineMaterial;
_spriteToOutline.ForEach(s => s.Material = _outlineMaterial);
}
public void OnPlayerExited(Node2D player)
{
if (!_active)
return;
_label.Hide();
if (!_useSprite || !_useOutline)
if (!_useOutline)
return;
_spriteToOutline.Material = _backupMaterial;
//_spriteToOutline.Material = _backupMaterial;
for (var i = 0; i < _spriteToOutline.Length; i++)
{
_spriteToOutline[i].Material = _backupMaterial[i];
}
}
public override void _Input(InputEvent @event)
{
if (!_active || !InputService.Instance.InputEnabled)
if (!_active)
return;
if (@event.IsAction("interact") && @event.IsPressed())
{
TryInteract();
}
if (_area.HasOverlappingBodies())
{
_label.Hide();
if (@event.IsActionPressed("click") && @event.IsPressed())
{
TryInteract();
}
}
if (_useOutline)
{
for (var i = 0; i < _spriteToOutline.Length; i++)
{
_spriteToOutline[i].Material = _backupMaterial[i];
}
}
private void TryInteract()
{
if (_area.HasOverlappingBodies())
{
_label.Hide();
if (_useSprite && _useOutline)
_spriteToOutline.Material = _backupMaterial;
EmitSignal(SignalName.InteractedTool, _id);
EmitSignal(SignalName.Interacted);
EmitSignal(SignalName.InteractedTool, _id);
EmitSignal(SignalName.Interacted);
}
}
}
public void SetSpriteActiveState(bool success, int id) // TODO: remove
{
GD.PrintErr("SetSpriteActiveState is being called.");
if(!_active)
if (!_active)
return;
}
@@ -1,3 +1,4 @@
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.Services;
using Godot;
@@ -1,6 +1,5 @@
using System;
using Babushka.scripts.CSharp.Common.CharacterControls;
using Babushka.scripts.CSharp.Common.Inventory;
using Godot;
namespace Babushka.scripts.CSharp.Common.Farming;
@@ -14,9 +13,7 @@ public partial class FieldBehaviour2D : Sprite2D
[Export] private Texture2D Tilled;
[Export] private Texture2D Watered;
[Export] public FieldState FieldState = FieldState.Tilled;
[Export] public InteractionArea2D PlantingInteraction;
[Export] public Node2D PlantingPlaceholder;
[Export] private InteractionArea2D _growingCollider;
public Vector2 FieldPosition;
@@ -34,22 +31,19 @@ public partial class FieldBehaviour2D : Sprite2D
{
case FieldState.Empty:
FieldState = FieldState.Empty;
PlantingInteraction.IsActive = false;
break;
case FieldState.Tilled:
FieldState = FieldState.Tilled;
_fieldSprite.Texture = Tilled;
PlantingInteraction.IsActive = true;
_growingCollider.Visible = false;
break;
case FieldState.Watered:
FieldState = FieldState.Watered;
_fieldSprite.Texture = Watered;
PlantingInteraction.IsActive = true;
_growingCollider.Visible = true;
break;
case FieldState.Planted:
FieldState = FieldState.Planted;
_fieldSprite.Texture = Tilled;
PlantingInteraction.IsActive = false;
break;
default:
FieldState = FieldState.NotFound;
@@ -68,42 +62,19 @@ public partial class FieldBehaviour2D : Sprite2D
/// </summary>
public void Farm()
{
if (TryPlant())
switch (FieldState)
{
UpdateFieldState(FieldState.Planted);
case FieldState.Empty:
_fieldSprite.Texture = Tilled;
FieldState = FieldState.Tilled;
break;
case FieldState.Watered:
FieldState = FieldState.Planted;
break;
case FieldState.Planted:
break;
default:
break;
}
}
private bool TryPlant()
{
bool success = false;
int currentSlotIndex = InventoryManager.Instance.CurrentSelectedSlotIndex;
ItemInstance? item = InventoryManager.Instance.playerInventory.Slots[currentSlotIndex].itemInstance;
if (item == null || PlantingPlaceholder.GetChildCount() > 0)
return success;
PackedScene? plantPrefab = item.blueprint.itemPrefab;
if (plantPrefab != null)
{
Node plantInstance = plantPrefab.Instantiate();
if (plantInstance is Node2D plant2d)
{
PlantingPlaceholder.AddChild(plant2d);
plant2d.GlobalPosition = PlantingPlaceholder.GlobalPosition;
PlantBehaviour2D? plantBehaviour = plant2d as PlantBehaviour2D;
if (plantBehaviour != null)
{
plantBehaviour.Field = this;
}
success = true;
}
}
return success;
}
}
@@ -12,6 +12,20 @@ public partial class FieldService2D : Node2D
[Signal] public delegate void FieldCreatedEventHandler();
/*
public override void _PhysicsProcess(double delta)
{
var spaceState = GetWorld2D().DirectSpaceState;
// use global coordinates, not local to node
var query = PhysicsRayQueryParameters2D.Create(GetGlobalMousePosition(), new Vector3(0,0,-1),
CollisionMask, [GetRid()]);
var result = spaceState.IntersectRay(query);
if (result.Count > 0)
GD.Print("Hit at point: ", result["position"]);
}
*/
//Create
public bool TryAddEntry(Vector2I key, FieldBehaviour2D field)
{
@@ -1,5 +1,5 @@
using System;
using Babushka.scripts.CSharp.Common.Animation;
using Babushka.scripts.CSharp.Common.CharacterControls;
using Babushka.scripts.CSharp.Common.Inventory;
using Godot;
@@ -25,23 +25,6 @@ public partial class PlantBehaviour2D : Node2D
private string _magicWordDialogicEventName = "MagicWord";
private Sprite2D _currentPlantSprite = null;
private bool _magicWordSaid = false;
/// <summary>
/// public accessor for the field reference
/// </summary>
public FieldBehaviour2D Field
{
get => _field;
set => _field = value;
}
public override void _Ready()
{
GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation);
_state = PlantState.Planted;
_currentPlantSprite = GetRandomSprite(_seeds);
_currentPlantSprite.Visible = true;
}
/// <summary>
@@ -52,8 +35,9 @@ public partial class PlantBehaviour2D : Node2D
if (_field.FieldState != FieldState.Watered || _magicWordSaid != _magicWordNeeded)
return;
// todo: replace with EventBus when possible
GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation);
//GetTree().CallGroup("PlantGrowing", PlayerMovement.MethodName.PlayFarmingAnimation);
// todo:
// find out why the last plant stage is being skipped the second time around
switch (_state)
{
case PlantState.None:
@@ -46,21 +46,23 @@ public partial class VesnaBehaviour2D : Node
{
InventorySlot currentSlot = InventoryManager.Instance.GetCurrentSelectedSlot();
ItemInstance? currentItem = currentSlot.itemInstance;
if (currentItem == null)
return;
int toolId = -1;
if (currentItem != null && currentItem.blueprint == _hoe)
if (currentItem.blueprint == _hoe)
{
toolId = 0;
}
if (currentItem != null && currentItem.blueprint == _wateringCan)
if (currentItem.blueprint == _wateringCan)
{
toolId = 1;
}
ActivateTool(toolId);
_vesnaAnimations.ActivateTool(toolId >= 0, toolId);
EmitSignal(SignalName.InventorySelectionChanged, toolId);
}
@@ -0,0 +1,25 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class ActionAnimationController : Node
{
#region Shortcuts
private FightWorld.FightHappeningData HappeningData => FightWorld.Instance.fightHappeningData ?? throw new NoFightHappeningException();
#endregion
[Export] private AllFightersVisual _allFightersVisual = null!;
public void StateEnter()
{
_ = HappeningData.actionStaging!.AnimateAction(_allFightersVisual);
}
public void StateExit()
{
}
}
@@ -0,0 +1 @@
uid://dtf4ejct4m682
@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace Babushka.scripts.CSharp.Common.Fight.ActionDetails;
public class MinigameActionDetail : FighterAction.FighterActionDetail
{
// settings
// result
public List<int>? damageHits = null;
public MinigameActionDetail()
{
}
public override bool DetailComplete()
{
return damageHits != null;
}
public void ResetResult()
{
damageHits = null;
}
}
@@ -0,0 +1 @@
uid://du8cm2q5kwikl
@@ -0,0 +1,39 @@
using System;
namespace Babushka.scripts.CSharp.Common.Fight.ActionDetails;
public class TargetSelectActionDetail : FighterAction.FighterActionDetail
{
public enum VisualRange
{
Single
}
// settings
public required bool selectEnemy;
public required bool selectAlly;
public VisualRange visualRange = VisualRange.Single;
// result
private FightWorld.Fighter? target;
public override bool DetailComplete()
{
return target != null;
}
public void ResetResult()
{
target = null;
}
public void SetTarget(FightWorld.Fighter fighter)
{
target = fighter;
}
public FightWorld.Fighter GetTarget()
{
return target ?? throw new InvalidOperationException("No target selected");
}
}
@@ -0,0 +1 @@
uid://e8c8ym0fyprn
@@ -0,0 +1,65 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Fight.ActionDetails;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
public class AllyAttackAction : FighterAction
{
// details
public TargetSelectActionDetail targetSelect = new()
{
selectEnemy = true,
selectAlly = false
};
public MinigameActionDetail minigameDetail = new();
public override Variant<float, Func<bool>> GetAnimationEnd()
{
return 1;
}
public override bool NextDetail()
{
return !targetSelect.DetailComplete() || !minigameDetail.DetailComplete();
}
public override FighterActionDetail CurrentDetail()
{
return targetSelect.DetailComplete() ? minigameDetail : targetSelect;
}
public override AllyActionButton BindToActionButton()
{
return AllyActionButton.Attack;
}
public override void Reset()
{
targetSelect.ResetResult();
minigameDetail.ResetResult();
}
public override void ExecuteAction()
{
var totalDamage = minigameDetail.damageHits!.Sum(dh => dh);
targetSelect.GetTarget().AddHealth(-totalDamage);
}
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
{
var currentFighter = HappeningData.fighterTurn.Current;
var targetFighter = targetSelect.GetTarget();
var currentFighterVisual = allFightersVisual.GetVisualForFighter(currentFighter);
var targetFighterVisual = allFightersVisual.GetVisualForFighter(targetFighter);
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
_ = targetFighterVisual.AnimateHit();
await currentFighterVisual.AnimatePosToBase();
}
}
@@ -0,0 +1 @@
uid://c8c4t80bqsja5
@@ -0,0 +1,36 @@
using System;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Util;
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
public class BlobAttackAction : FighterAction
{
public override Variant<float, Func<bool>> GetAnimationEnd()
{
return 1;
}
public override bool NextDetail()
{
return false;
}
public override void ExecuteAction()
{
FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-3);
}
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
{
var currentFighter = HappeningData.fighterTurn.Current;
var targetFighter = FightWorld.Instance.allyFighters.vesnaFighter;
var currentFighterVisual = allFightersVisual.GetVisualForFighter(currentFighter);
var targetFighterVisual = allFightersVisual.GetVisualForFighter(targetFighter);
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
_ = targetFighterVisual.AnimateHit();
await currentFighterVisual.AnimatePosToBase();
}
}
@@ -0,0 +1 @@
uid://dlik4vktiu7dg
@@ -0,0 +1,142 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Babushka.scripts.CSharp.Common.Fight.ActionDetails;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class AllFightersVisual : Node
{
[ExportCategory("References")] [Export]
private Node2D _allyFighters = null!;
[Export] private Node2D _enemyFighters = null!;
[ExportCategory("Fighter Visual Scenes")]
[Export] private PackedScene _blobFighterVisual = null!;
[Export] private PackedScene _bigBlobFighterVisual = null!;
[Export] private PackedScene _mavkaFighterVisual = null!;
[Export] private PackedScene _yourMomFighterVisual = null!;
[Export] private PackedScene _vesnaFighterVisual = null!;
[ExportCategory("Settings")]
[Export(PropertyHint.ArrayType)] private float[] _positionDistanceFromCenter = [10, 20, 30];
private Dictionary<FightWorld.Fighter, FighterVisual> _fighterVisuals = new();
#region Shortcuts
private FightWorld.FightHappeningData HappeningData =>
FightWorld.Instance.fightHappeningData ?? throw new NoFightHappeningException();
#endregion
#region State Reactions
public void FightHappeningStateChange(FightHappening.FightState from, FightHappening.FightState to)
{
if (to == FightHappening.FightState.FightersEnterAnim)
{
EnterFighter();
}
if (to == FightHappening.FightState.InputActionDetail)
{
if (HappeningData.actionStaging!.CurrentDetail() is TargetSelectActionDetail targetDetail)
{
ShowTargetSelect(targetDetail);
}
}
if (from == FightHappening.FightState.InputActionDetail)
{
HideTargetSelect();
}
if (from == FightHappening.FightState.ActionAnim)
{
_fighterVisuals.Values.ForEach(fv => fv.UpdateHealthBar());
}
}
public void EnterFighter()
{
if (HappeningData.fightersEnterStaging == null)
return;
if (!HappeningData.fightersEnterStaging.HasAnyToExecute())
return;
foreach (var fighter in HappeningData.fightersEnterStaging.enteringEnemyFighters)
{
var packedScene = fighter.type switch
{
FightWorld.Fighter.Type.Blob => _blobFighterVisual,
FightWorld.Fighter.Type.BigBlob => _bigBlobFighterVisual,
FightWorld.Fighter.Type.Mavka => _mavkaFighterVisual,
FightWorld.Fighter.Type.YourMom => _yourMomFighterVisual,
FightWorld.Fighter.Type.Vesna => _vesnaFighterVisual,
_ => throw new ArgumentOutOfRangeException()
};
var fighterVisual = packedScene.Instantiate<FighterVisual>();
fighterVisual.Initialize(fighter);
_enemyFighters.AddChild(fighterVisual);
fighterVisual.Position = new Vector2(_positionDistanceFromCenter[_enemyFighters.GetChildCount() - 1], 0);
_fighterVisuals.Add(fighter, fighterVisual);
}
foreach (var fighter in HappeningData.fightersEnterStaging.enteringAllyFighters)
{
var packedScene = fighter.type switch
{
FightWorld.Fighter.Type.Blob => _blobFighterVisual,
FightWorld.Fighter.Type.BigBlob => _bigBlobFighterVisual,
FightWorld.Fighter.Type.Mavka => _mavkaFighterVisual,
FightWorld.Fighter.Type.YourMom => _yourMomFighterVisual,
FightWorld.Fighter.Type.Vesna => _vesnaFighterVisual,
_ => throw new ArgumentOutOfRangeException()
};
var fighterVisual = packedScene.Instantiate<FighterVisual>();
fighterVisual.Initialize(fighter);
_allyFighters.AddChild(fighterVisual);
fighterVisual.Position = new Vector2(-_positionDistanceFromCenter[_allyFighters.GetChildCount() - 1], 0);
_fighterVisuals.Add(fighter, fighterVisual);
}
}
private void ShowTargetSelect(TargetSelectActionDetail targetDetail)
{
if (targetDetail.selectEnemy)
_fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation))
.ForEach(kv => kv.Value.SetTargetSelectionActive(true));
if (targetDetail.selectAlly)
_fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.allyFighterFormation))
.ForEach(kv => kv.Value.SetTargetSelectionActive(true));
}
private void HideTargetSelect()
{
foreach (var visual in _fighterVisuals.Values)
{
visual.SetTargetSelectionActive(false);
}
}
#endregion
public FighterVisual GetVisualForFighter(FightWorld.Fighter fighter)
{
return _fighterVisuals.TryGetValue(fighter, out var visual)
? visual
: throw new InvalidOperationException("No visual for this fighter");
}
}
@@ -0,0 +1 @@
uid://dwsqst8fhhqlc
@@ -0,0 +1,30 @@
using Babushka.scripts.CSharp.Common.Fight.Actions;
namespace Babushka.scripts.CSharp.Common.Fight;
public class AllyFighters
{
public FightWorld.Fighter vesnaFighter = new()
{
type = FightWorld.Fighter.Type.Vesna,
maxHealth = 20,
availableActions =
[
new AllyAttackAction()
]
};
public FightWorld.Fighter chuhaFighter = new()
{
type = FightWorld.Fighter.Type.Chuha,
maxHealth = 15,
availableActions =
[
new FighterAction.Skip()
]
};
public bool IsAlive()
{
return vesnaFighter.IsAlive();
}
}
@@ -0,0 +1 @@
uid://dst8xcyiw18uc
@@ -0,0 +1,386 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightHappening : Node
{
/*
To get a visual overview of the FightHappening state machine, refer to the graph on miro:
https://miro.com/app/board/uXjVK8YEprM=/?moveToWidget=3458764640805655262&cot=14
*/
#region Internal Types
public enum FightState
{
None,
FightStartAnim,
FightersEnter,
FightersEnterAnim,
NextFighter,
StateCheck,
InputActionSelect,
ActionCheckDetails,
InputActionDetail,
ActionExecute,
ActionAnim,
EnemyActionSelect,
PlayerWin,
EnemyWin,
}
public class FightersEnterStaging
{
public required List<FightWorld.Fighter> enteringAllyFighters;
public required List<FightWorld.Fighter> enteringEnemyFighters;
public bool HasAnyToExecute()
{
return enteringAllyFighters.Any() || enteringEnemyFighters.Any();
}
}
#endregion
#region Settings
private const float StartAnimationTime = 1;
private const float FightersEnterAnimationTime = 1;
#endregion
#region Shortcuts
private static FightWorld.FightHappeningData HappeningData =>
FightWorld.Instance.fightHappeningData ?? throw new NoFightHappeningException();
private static FightWorld.Fighter CurrentFighter => HappeningData.fighterTurn.Current;
#endregion
#region Events
[Signal]
public delegate void SignalTransitionFromStateEventHandler(FightState state);
[Signal]
public delegate void SignalTransitionStateEventHandler(FightState from, FightState to);
[Signal]
public delegate void SignalTransitionToStateEventHandler(FightState state);
#endregion
#region Singleton
public static FightHappening Instance = null!;
private void SetupInstance()
{
Instance = this;
}
#endregion
public override void _Ready()
{
SetupInstance();
StartFight();
}
#region Public Methods
public void StartFight()
{
RequireState(FightState.None);
ChangeState(FightState.FightStartAnim);
}
public void ActionSelect(FighterAction action)
{
RequireState(FightState.InputActionSelect);
HappeningData.actionStaging = action;
action.Reset();
ChangeState(FightState.ActionCheckDetails);
}
public void DetailFilled()
{
RequireState(FightState.InputActionDetail);
ChangeState(FightState.ActionCheckDetails);
}
#endregion
#region State Machine
private bool _inTransition = false;
private FightState? _changeToAfterTransition = null;
private void ChangeState(FightState nextState)
{
_changeToAfterTransition = null;
if (_inTransition)
{
_changeToAfterTransition = nextState;
return;
}
_inTransition = true;
TransitionFromState();
var lastState = HappeningData.fightState;
HappeningData.fightState = nextState;
TransitionToState(nextState);
EmitSignalSignalTransitionFromState(lastState);
EmitSignalSignalTransitionState(lastState, nextState);
EmitSignalSignalTransitionToState(nextState);
_inTransition = false;
if (_changeToAfterTransition.HasValue)
{
ChangeState(_changeToAfterTransition.Value);
}
}
private void TransitionFromState()
{
// fixed behaviour
switch (HappeningData.fightState)
{
default: break;
}
}
private void TransitionToState(FightState nextState)
{
// fixed behaviour
switch (HappeningData.fightState)
{
case FightState.FightStartAnim:
AdvanceToStateInSeconds(FightState.FightersEnter, StartAnimationTime);
break;
case FightState.FightersEnter:
HappeningData.fightersEnterStaging = StageFightersEnter();
if (HappeningData.fightersEnterStaging.HasAnyToExecute())
{
ExecuteFightersEnter();
ChangeState(FightState.FightersEnterAnim);
}
else
{
ChangeState(FightState.NextFighter);
}
break;
case FightState.FightersEnterAnim:
AdvanceToStateInSeconds(FightState.NextFighter, FightersEnterAnimationTime);
break;
case FightState.NextFighter:
ExecuteNextFighter();
ChangeState(FightState.StateCheck);
break;
case FightState.StateCheck:
// restest action staging and fighter enter staging
HappeningData.actionStaging = null;
HappeningData.fightersEnterStaging = null;
if (!FightWorld.Instance.allyFighters.IsAlive())
{
ChangeState(FightState.EnemyWin);
}
else if (HappeningData.enemyGroup.AreAllDead())
{
ChangeState(FightState.PlayerWin);
}
else if (CurrentFighter.actionPointsLeft <= 0)
{
ChangeState(FightState.FightersEnter);
}
else if (CurrentFighter.IsInFormation(HappeningData.enemyFighterFormation))
{
ChangeState(FightState.EnemyActionSelect);
}
else
{
ChangeState(FightState.InputActionSelect);
}
break;
case FightState.InputActionSelect:
// wait for player input
break;
case FightState.ActionCheckDetails:
RequireNotNull(HappeningData.actionStaging);
if (ActionAbort())
ChangeState(FightState.InputActionSelect);
else if (ActionNeededDetail())
ChangeState(FightState.InputActionDetail);
else
ChangeState(FightState.ActionExecute);
break;
case FightState.InputActionDetail:
// wait for player input
break;
case FightState.EnemyActionSelect:
HappeningData.actionStaging = CurrentFighter.AutoSelectAction();
ChangeState(FightState.ActionExecute);
break;
case FightState.ActionExecute:
ExecuteAction();
ChangeState(FightState.ActionAnim);
break;
case FightState.ActionAnim:
var actionTime = GetActionAnimationEnd();
if (actionTime.IsType<float>())
{
AdvanceToStateInSeconds(FightState.StateCheck, actionTime);
}
else
{
_ = AdvanceToStateWhenDone(FightState.StateCheck, actionTime);
}
break;
case FightState.EnemyWin:
// TODO: remove and find proper solution
ReviveVesna();
break;
default: break;
}
}
#endregion
#region Game Logic
private FightersEnterStaging StageFightersEnter()
{
// ally
var enteringAllyFighters = new List<FightWorld.Fighter>();
var allyFighters = FightWorld.Instance.allyFighters;
if (!allyFighters.vesnaFighter.IsInFormation(HappeningData.allyFighterFormation))
{
enteringAllyFighters.Add(allyFighters.vesnaFighter);
}
// enemy
const int totalEnemySpace = 3;
var enemySpaceLeft = HappeningData.enemyFighterFormation.GetEmptySlotCount();
return new FightersEnterStaging
{
enteringAllyFighters = enteringAllyFighters,
enteringEnemyFighters = HappeningData.enemyGroup.fighters
.WhereIsAlive()
.WhereIsNotInFormation(HappeningData.enemyFighterFormation)
.Take(enemySpaceLeft)
.ToList()
};
}
private void ExecuteFightersEnter()
{
Debug.Assert(HappeningData.fightersEnterStaging != null);
foreach (var fighter in HappeningData.fightersEnterStaging.enteringAllyFighters)
{
var emptySlotIndex = HappeningData.allyFighterFormation.GetFirstEmptySlot();
if (emptySlotIndex < 0) throw new Exception("No empty slot for ally fighter to enter");
HappeningData.allyFighterFormation.SetFighterAtPosition(emptySlotIndex, fighter);
HappeningData.fighterTurn.AddAsLast(fighter);
}
foreach (var fighter in HappeningData.fightersEnterStaging.enteringEnemyFighters)
{
var emptySlotIndex = HappeningData.enemyFighterFormation.GetFirstEmptySlot();
if (emptySlotIndex < 0) throw new Exception("No empty slot for enemy fighter to enter");
HappeningData.enemyFighterFormation.SetFighterAtPosition(emptySlotIndex, fighter);
HappeningData.fighterTurn.AddAsLast(fighter);
}
}
private void ExecuteNextFighter()
{
HappeningData.fighterTurn.Next();
CurrentFighter.actionPointsLeft = FightWorld.Fighter.MaxActionPoints;
}
private void ExecuteAction()
{
Debug.Assert(HappeningData.actionStaging != null);
HappeningData.actionStaging.ExecuteAction();
CurrentFighter.actionPointsLeft -= HappeningData.actionStaging.GetActionPointCost();
}
private Variant<float, Func<bool>> GetActionAnimationEnd()
{
Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.GetAnimationEnd();
}
private bool ActionAbort()
{
Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.MarkedForAbort();
}
private bool ActionNeededDetail()
{
Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.NextDetail();
}
// TODO: remove
private void ReviveVesna()
{
var vesnaFighter = FightWorld.Instance.allyFighters.vesnaFighter;
vesnaFighter.health = vesnaFighter.maxHealth;
GD.Print("Vesna has been revived. This is for the current prototype only");
}
#endregion // Game Logic
#region Utility
private void RequireState(params FightState[] states)
{
if (states.Contains(HappeningData.fightState))
return;
throw new Exception(
$"Can not call this Method while in state {HappeningData.fightState}. Only available in {string.Join(" ,", states)}");
}
private void RequireNotNull(Object? o)
{
if (o != null)
return;
throw new Exception("Object must not be null to call this method");
}
private void AdvanceToStateInSeconds(FightState nextState, float seconds)
{
FightWorld.Instance.GetTree().CreateTimer(seconds).Timeout += () => ChangeState(nextState);
}
private async Task AdvanceToStateWhenDone(FightState nextState, Func<bool> isDone)
{
while (!isDone())
{
await FightWorld.Instance.ToSignal(FightWorld.Instance.GetTree(), SceneTree.SignalName.ProcessFrame);
}
ChangeState(nextState);
}
#endregion
}
@@ -0,0 +1,15 @@
using Godot;
using System;
using System.Diagnostics;
using Babushka.scripts.CSharp.Common.Fight;
public partial class FightHappeningSceneSetup : Node2D
{
public override void _Ready()
{
var fightHappening = FightWorld.Instance.fightHappeningData;
Debug.Assert(fightHappening != null, "Fight happening scene loaded, without a fight happening");
}
}
@@ -0,0 +1 @@
uid://cnhpnn8o0gybd
@@ -0,0 +1,57 @@
using Godot;
using System;
using System.Linq;
using Babushka.scripts.CSharp.Common.Fight;
public partial class FightHappeningStateDebugger : Node
{
[Export] private Label _label;
[Export] private Label _current;
private FightWorld.FightHappeningData Data => FightWorld.Instance.fightHappeningData!;
public void StateChange(FightHappening.FightState from, FightHappening.FightState to)
{
_current.Text = $"{to}";
_label.Text += $"State changed from {from} to {to}\n";
switch (to)
{
case FightHappening.FightState.None:
break;
case FightHappening.FightState.FightStartAnim:
break;
case FightHappening.FightState.FightersEnter:
break;
case FightHappening.FightState.FightersEnterAnim:
_label.Text +=
$" {Data.fightersEnterStaging!.enteringAllyFighters.Count} allies " +
$"and {Data.fightersEnterStaging.enteringEnemyFighters.Count} enemies are entering the fight.\n";
break;
case FightHappening.FightState.NextFighter:
break;
case FightHappening.FightState.StateCheck:
break;
case FightHappening.FightState.InputActionSelect:
break;
case FightHappening.FightState.ActionCheckDetails:
break;
case FightHappening.FightState.InputActionDetail:
break;
case FightHappening.FightState.ActionExecute:
_label.Text += $" Executing action: {Data.actionStaging!.GetType()}\n";
break;
case FightHappening.FightState.ActionAnim:
break;
case FightHappening.FightState.EnemyActionSelect:
break;
case FightHappening.FightState.PlayerWin:
break;
case FightHappening.FightState.EnemyWin:
break;
default:
throw new ArgumentOutOfRangeException(nameof(to), to, null);
}
}
}
@@ -0,0 +1 @@
uid://d2ugtb3dalrg3
@@ -0,0 +1,27 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightHappeningStateReaction : Node
{
[Export] private FightHappening.FightState _fightState;
[Signal]
public delegate void OnStateEnteredEventHandler();
[Signal]
public delegate void OnStateExitedEventHandler();
public void FightHappeningStateTransitioned(FightHappening.FightState fromState, FightHappening.FightState toState)
{
if (fromState == _fightState)
{
EmitSignalOnStateExited();
}
if (toState == _fightState)
{
EmitSignalOnStateEntered();
}
}
}
@@ -0,0 +1 @@
uid://buiwuf7pjfq8
@@ -1,351 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Babushka.scripts.CSharp.Common.Camera;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightInstance : Node2D //TODO: remake
{
[Export(PropertyHint.ArrayType)] private Node2D[] _friendlyFightSpots;
[Export(PropertyHint.ArrayType)] private Node2D[] _enemyFightSpots;
[Export] public Node2D camPositionNode;
[Export] private FightStateManager _fightStateManager;
[Export] private Label _fightEndText;
[Signal]
public delegate void FightStartedEventHandler();
[Signal]
public delegate void FightEndedEventHandler();
private List<Fighter> _friendlyFighters = new();
private List<Fighter> _enemyFighters = new();
private FightAttack? _stagedAttack = null;
public override void _Ready()
{
//_fightStateManager.CurrentFightState = FightStateManager.FightState.FightStartAnim;
_fightStateManager.ExitingTransition += from =>
{
switch (from)
{
case FightStateManager.FightState.None:
CaptureCamera();
Show();
EmitSignalFightStarted();
break;
case FightStateManager.FightState.Input:
HideAttackButtons();
break;
case FightStateManager.FightState.InputTargetSelect:
HideTargetButtons();
break;
case FightStateManager.FightState.FriendAttackAnim:
_stagedAttack = null;
break;
case FightStateManager.FightState.PlayerWinAnim:
case FightStateManager.FightState.EnemyWinAnim:
_fightEndText.Text = "";
break;
}
};
_fightStateManager.EnteringTransition += to =>
{
switch (to)
{
case FightStateManager.FightState.None:
EmitSignalFightEnded();
CleanUp();
Hide();
ReleaseCamera();
break;
case FightStateManager.FightState.Input:
if (CheckWinAndSetState())
break;
if (CheckFriendlyActionsLeftAndSetState())
break;
ShowAttackButtons();
break;
case FightStateManager.FightState.InputTargetSelect:
ShowTargetButtons();
break;
case FightStateManager.FightState.FriendAttackAnim:
ExecuteAttack();
GetTree().CreateTimer(1).Timeout += () => _fightStateManager.CurrentFightState = FightStateManager.FightState.Input;
break;
case FightStateManager.FightState.Enemy:
if (CheckWinAndSetState())
break;
if (CheckEnemyActionsLeftAndSetState())
break;
DecideEnemyAttack();
_fightStateManager.CurrentFightState = FightStateManager.FightState.EnemyAttackAnim;
break;
case FightStateManager.FightState.EnemyAttackAnim:
ExecuteAttack();
GetTree().CreateTimer(1).Timeout += () => _fightStateManager.CurrentFightState = FightStateManager.FightState.Enemy;
break;
case FightStateManager.FightState.PlayerWinAnim:
_fightEndText.Text = "You Win!";
GetTree().CreateTimer(1.5).Timeout += () => _fightStateManager.CurrentFightState = FightStateManager.FightState.None;
break;
case FightStateManager.FightState.EnemyWinAnim:
_fightEndText.Text = "You Died :(";
GetTree().CreateTimer(3).Timeout += () => _fightStateManager.CurrentFightState = FightStateManager.FightState.None;
break;
case FightStateManager.FightState.ChangeSideToEnemy:
ResetEnemyActions();
_fightStateManager.CurrentFightState = FightStateManager.FightState.Enemy;
break;
case FightStateManager.FightState.ChangeSideToFriendly:
ResetFriendlyActions();
_fightStateManager.CurrentFightState = FightStateManager.FightState.Input;
break;
case FightStateManager.FightState.Heal:
Heal();
GetTree().CreateTimer(1).Timeout += () => _fightStateManager.CurrentFightState = FightStateManager.FightState.Input;
break;
}
};
}
private void Heal()
{
// TODO: make heal staging system
_friendlyFighters.Where(f => !f.IsDead()).ForEach(f =>
{
f.Health += 50;
f.HealAnimation();
f.DecrementActions();
});
UpdateHealthVisual();
}
private void ResetEnemyActions()
{
_enemyFighters.ForEach(f => f.ResetActions());
}
private void ResetFriendlyActions()
{
_friendlyFighters.ForEach(f => f.ResetActions());
}
/**
* <returns>
* <c>true</c> if the state was changed
* </returns>
*/
private bool CheckFriendlyActionsLeftAndSetState()
{
var hasActionsLeft = _friendlyFighters.Where(f => !f.IsDead()).Any(f => f.HasActionsLeft());
if (hasActionsLeft)
{
return false;
} // else
_fightStateManager.CurrentFightState = FightStateManager.FightState.ChangeSideToEnemy;
return true;
}
/**
* <returns>
* <c>true</c> if the state was changed
* </returns>
*/
private bool CheckEnemyActionsLeftAndSetState()
{
var hasActionsLeft = _enemyFighters.Where(f => !f.IsDead()).Any(f => f.HasActionsLeft());
if (hasActionsLeft)
{
return false;
} // else
_fightStateManager.CurrentFightState = FightStateManager.FightState.ChangeSideToFriendly;
return true;
}
private void CleanUp()
{
_enemyFighters.ForEach(f => f.QueueFree());
_friendlyFighters.ForEach(f => f.QueueFree());
_enemyFighters = new();
_friendlyFighters = new();
}
private void DecideEnemyAttack()
{
var availableEnemyFighters =
_enemyFighters
.Where(f => !f.IsDead())
.Where(f=>f.HasActionsLeft())
.ToList();
var aliveFriendlyFighters =
_friendlyFighters
.Where(f => !f.IsDead())
.ToList();
if (availableEnemyFighters.Count <= 0)
throw new InvalidOperationException("No enemy fighters available for attack.");
if (aliveFriendlyFighters.Count <= 0)
throw new InvalidOperationException("No friendly fighters available to target.");
var fighter = availableEnemyFighters.Random();
var target = aliveFriendlyFighters.Random();
_stagedAttack = new FightAttack
{
attacker = fighter!,
needsSelectedTarget = true,
damage = fighter!.attackStrength,
target = target!
};
}
private void ExecuteAttack()
{
if (_stagedAttack == null)
throw new InvalidOperationException("No staged attack to execute.");
if (!_stagedAttack.needsSelectedTarget)
throw new NotImplementedException("Non-targeted attacks are not implemented yet.");
if (_stagedAttack.needsSelectedTarget && _stagedAttack.target == null)
throw new InvalidOperationException("No target selected for the staged attack.");
_stagedAttack.target!.Health -= _stagedAttack.damage;
_stagedAttack.attacker.DecrementActions();
_stagedAttack.attacker.AttackAnimation(_stagedAttack);
UpdateHealthVisual();
}
private void UpdateHealthVisual()
{
_friendlyFighters
.Concat(_enemyFighters)
.ForEach(f => f.UpdateHealthVisual());
}
private void ReleaseCamera()
{
CameraController.Instance.fightToShow = null;
}
private void CaptureCamera()
{
CameraController.Instance.fightToShow = this;
}
public void Start(FightParty fightParty, PackedScene?[] enemies)
{
if (_fightStateManager.IsRunning())
{
GD.PushWarning("Can not start a running fight");
return;
}
if (fightParty.vesna)
{
InstantiateFighter(_friendlyFightSpots[1], FightManager.Instance.fightingVesnaScene);
}
for (var i = 0; i < Math.Min(_enemyFightSpots.Length, enemies.Length); i++)
{
var enemy = enemies[i];
if (enemy == null)
continue;
InstantiateFighter(_enemyFightSpots[i], enemy, true);
}
_fightStateManager.ToStartAnim();
}
private void InstantiateFighter(Node2D parent, PackedScene fighterScene, bool isEnemy = false)
{
var fighter = fighterScene.Instantiate<Fighter>();
fighter.fightInstance = this;
parent.AddChild(fighter);
if (isEnemy)
{
_enemyFighters.Add(fighter);
}
else
{
_friendlyFighters.Add(fighter);
}
}
public void SelectAttack(Fighter fighter)
{
_stagedAttack = new FightAttack
{
attacker = fighter,
damage = fighter.attackStrength,
needsSelectedTarget = true
};
if (_stagedAttack.needsSelectedTarget)
{
_fightStateManager.CurrentFightState = FightStateManager.FightState.InputTargetSelect;
}
else
{
_fightStateManager.CurrentFightState = FightStateManager.FightState.FriendAttackAnim;
}
}
private void HideAttackButtons()
{
_friendlyFighters.ForEach(f => f.HideAttackButton());
}
private void ShowAttackButtons()
{
_friendlyFighters.ForEach(f => f.ShowAttackButton());
}
private void HideTargetButtons()
{
_enemyFighters.ForEach(f => f.HideTargetButtons());
}
private void ShowTargetButtons()
{
_enemyFighters.Where(f => !f.IsDead()).ForEach(f => f.ShowTargetButtons());
}
public void SelectTargetAndAttack(Fighter fighter)
{
if (_stagedAttack == null)
throw new InvalidOperationException("No staged attack to select target for.");
_stagedAttack.target = fighter;
_fightStateManager.CurrentFightState = FightStateManager.FightState.FriendAttackAnim;
}
public void SelectHeal(Fighter fighter)
{
_fightStateManager.CurrentFightState = FightStateManager.FightState.Heal;
}
public bool CheckWinAndSetState()
{
if (_enemyFighters.All(f => f.IsDead()))
{
_fightStateManager.CurrentFightState = FightStateManager.FightState.PlayerWinAnim;
return true;
}
if (_friendlyFighters.All(f => f.IsDead()))
{
_fightStateManager.CurrentFightState = FightStateManager.FightState.EnemyWinAnim;
return true;
}
return false;
}
}
@@ -0,0 +1,43 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Fight;
using Babushka.scripts.CSharp.Common.Fight.ActionDetails;
using Babushka.scripts.CSharp.Common.Minigame;
public partial class FightMinigameHandler : Node
{
#region Shortcuts
private FightWorld.FightHappeningData HappeningData => FightWorld.Instance.fightHappeningData ?? throw new NoFightHappeningException();
#endregion
[Export] private MinigameController _minigameController;
public void OnStateEnter(FightHappening.FightState to)
{
if(to!=FightHappening.FightState.InputActionDetail) return;
var currentDetail = HappeningData.actionStaging!.CurrentDetail();
if(currentDetail is not MinigameActionDetail minigameDetail) return;
_minigameController.Run(new MinigameController.Builder<int>()
.AddRegion(4).RegionWithText("4").RegionWithTheme(MinigameController.RegionTheme.Normal)
.AddRegion(0).RegionWithProportion(1.5f).RegionWithText("0").RegionWithTheme(MinigameController.RegionTheme.Bad)
.AddRegion(8).RegionWithProportion(0.5f).RegionWithText("8").RegionWithTheme(MinigameController.RegionTheme.VeryGood)
.AddRegion(0).RegionWithProportion(1.5f).RegionWithText("0").RegionWithTheme(MinigameController.RegionTheme.Bad)
.AddRegion(3).RegionWithText("3").RegionWithTheme(MinigameController.RegionTheme.NormalAlt1)
.AddRegion(5).RegionWithText("5").RegionWithTheme(MinigameController.RegionTheme.NormalAlt2)
.WithHitCount(3)
).ContinueWith(task =>
{
minigameDetail.damageHits = task.Result;
//FightHappening.Instance.DetailFilled();
// Apparently ContinueWith spawn a new Thread, but methods on a node only want to be called from the main thread
FightHappening.Instance.CallDeferred("DetailFilled");
});
}
}
@@ -0,0 +1 @@
uid://bwm0nhvt1083k
@@ -0,0 +1,29 @@
using System.Collections.Generic;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightRoomSceneSetup : Node
{
[Export(PropertyHint.ArrayType)] private Node2D[] _enemyGroupSpawns;
[Export] private PackedScene _roamingEnemyGroupPrefab;
[Export] private FightSceneSwitcher _fightSceneSwitcher;
public override void _Ready()
{
var room = FightWorld.Instance.currentRoom!;
var i = 0;
foreach (var availableParent in _enemyGroupSpawns.Shuffle())
{
var enemyGroup = room.enemyGroups[i];
var roamingEnemyGroup = _roamingEnemyGroupPrefab.Instantiate<RoamingEnemyGroup>();
roamingEnemyGroup.Initialize(enemyGroup, _fightSceneSwitcher);
availableParent.AddChild(roamingEnemyGroup);
if (i >= room.enemyGroups.Count - 1) break;
i++;
}
}
}
@@ -0,0 +1 @@
uid://dbu8afaiohpdh
@@ -0,0 +1,63 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.SceneManagement;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightSceneSwitcher : Node
{
[Export] private Node _sceneRoot = null!;
[Export] private string _fightRoomScenePath = null!;
[Export] private string _fightHappeningScene = null!;
private void LoadNext()
{
var nextRoom = FightWorld.Instance.currentRoom;
Debug.Assert(nextRoom != null, "nextRoom!=null");
var nextFightHappening = FightWorld.Instance.fightHappeningData;
SceneTransitionThreaded.Instance.ChangeSceneToFile(nextFightHappening != null
? _fightHappeningScene
: _fightRoomScenePath);
_ = UnloadAfterDelay();
}
private async Task UnloadAfterDelay()
{
await ToSignal(GetTree().CreateTimer(1.0f), "timeout"); // 1.0f seconds
//sceneRoot.QueueFree();
}
public void SwitchRoom(int pathIndex)
{
Debug.Assert(FightWorld.Instance.currentRoom != null, "FightWorld.Instance.currentRoom!=null");
if (!FightWorld.Instance.currentRoom.paths.TryGetValue(pathIndex, out var nextRoom))
throw new Exception("Trying to go down a non-existent path");
FightWorld.Instance.currentRoom = nextRoom;
LoadNext();
}
public void SwitchToFight(FightWorld.FighterGroup enemyGroup)
{
if (FightWorld.Instance.fightHappeningData != null)
throw new Exception("Trying to start a fight while already in a fight");
FightWorld.Instance.fightHappeningData = new FightWorld.FightHappeningData
{
enemyGroup = enemyGroup,
};
LoadNext();
}
public void ExitFight()
{
if (FightWorld.Instance.fightHappeningData == null)
throw new Exception("Trying to exit a fight while not in a fight");
FightWorld.Instance.fightHappeningData = null;
LoadNext();
}
}
@@ -0,0 +1 @@
uid://cql8mt5jsmcdl
@@ -1,76 +0,0 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightStateManager : Node
{
[Signal]
public delegate void ExitingTransitionEventHandler(FightState exitingState);
[Signal]
public delegate void EnteringTransitionEventHandler(FightState enteringState);
public enum FightState
{
None,
FightStartAnim,
Input,
InputTargetSelect,
FriendAttackAnim,
Enemy,
EnemyAttackAnim,
PlayerWinAnim,
EnemyWinAnim,
ChangeSideToEnemy,
ChangeSideToFriendly,
Heal,
}
private FightState _fightStateBacking = FightState.None;
public FightState CurrentFightState
{
set => Transition(_fightStateBacking, value);
get => _fightStateBacking;
}
private void Transition(FightState from, FightState to)
{
if(from == to)
return;
GD.Print($"Transitioning from {from} to {to}");
ExitTransition(from);
_fightStateBacking = to;
EnterTransition(to);
}
private void ExitTransition(FightState from)
{
EmitSignalExitingTransition(from);
}
private void EnterTransition(FightState to)
{
EmitSignalEnteringTransition(to);
switch (to)
{
case FightState.FightStartAnim:
EnterFightStartAnim();
break;
}
}
private void EnterFightStartAnim()
{
GetTree().CreateTimer(1).Timeout += () => CurrentFightState = FightState.Input;
}
public void ToStartAnim()
{
CurrentFightState = FightState.FightStartAnim;
}
public bool IsRunning()
{
return CurrentFightState != FightState.None;
}
}
@@ -1 +0,0 @@
uid://oe1uypehqvr7
+48
View File
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Babushka.scripts.CSharp.Common.Fight;
public static class FightUtils
{
public static IEnumerable<FightWorld.Fighter> WhereIsAlive(this IEnumerable<FightWorld.Fighter> self)
{
return self.Where(e => e.IsAlive());
}
public static IEnumerable<FightWorld.Fighter> WhereIsNotInFormation(this IEnumerable<FightWorld.Fighter> self, FighterFormation formation)
{
return self.Where(e => !e.IsInFormation(formation));
}
public static bool IsAlive(this FightWorld.Fighter self)
{
return self.GetHealth() > 0;
}
public static bool IsDead(this FightWorld.Fighter self)
{
return !self.IsAlive();
}
public static int GetHealth(this FightWorld.Fighter self)
{
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)
{
return formation.ContainsFighter(self);
}
public static bool AreAllDead(this FightWorld.FighterGroup self)
{
return self.fighters.All(e => e.IsDead());
}
}
@@ -0,0 +1 @@
uid://beuhpltb84pf
+190
View File
@@ -0,0 +1,190 @@
using System.Collections.Generic;
using Babushka.scripts.CSharp.Common.Fight.Actions;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightWorld : Node
{
public class World
{
public required List<Room> rooms;
}
public class Room
{
public required Dictionary<int, Room> paths;
public required List<FighterGroup> enemyGroups;
}
public class FighterGroup
{
public required List<Fighter> fighters;
}
public class FightHappeningData
{
public required FighterGroup enemyGroup;
public FightHappening.FightState fightState = FightHappening.FightState.None;
public readonly FighterTurn fighterTurn = new();
public readonly FighterFormation allyFighterFormation = new();
public readonly FighterFormation enemyFighterFormation = new();
public FightHappening.FightersEnterStaging? fightersEnterStaging;
public FighterAction? actionStaging;
}
public class Fighter
{
public enum Type
{
Blob,
BigBlob,
Mavka,
YourMom,
Vesna,
Chuha
}
public required Type type;
public required int maxHealth;
public required List<FighterAction> availableActions;
public const int MaxActionPoints = 1;
public int? health = null; // null => initialize to full health on spawn
public int actionPointsLeft;
public FighterAction AutoSelectAction()
{
return availableActions.Random() ?? new FighterAction.Skip();
}
}
#region AutoLoad ( Contains _EnterTree() )
public static FightWorld Instance { get; private set; } = null!;
public override void _EnterTree()
{
Instance = this;
MyEnterTree();
}
#endregion
public World? world = null;
public Room? currentRoom = null;
public FightHappeningData? fightHappeningData = null;
public AllyFighters allyFighters = new();
public void MyEnterTree()
{
Generate();
currentRoom = world!.rooms[0];
}
public void Generate()
{
world = new Generator().GenerateWorld();
}
private class Generator
{
public World GenerateWorld()
{
var world = new World
{
rooms = GenerateRooms()
};
return world;
}
private List<Room> GenerateRooms()
{
var rooms = new List<Room>();
var roomCount = 2;
for (var i = 0; i < roomCount; i++)
{
rooms.Add(GenerateDisconnectedRoom());
}
// Connect rooms linearly
for (var i = 0; i < rooms.Count - 1; i++)
{
rooms[i].paths[0] = rooms[i + 1];
rooms[i + 1].paths[1] = rooms[i];
}
return rooms;
}
private Room GenerateDisconnectedRoom()
{
var room = new Room
{
paths = new Dictionary<int, Room>(),
enemyGroups = GenerateEnemyGroups()
};
return room;
}
private List<FighterGroup> GenerateEnemyGroups()
{
var enemyGroups = new List<FighterGroup>();
var enemyGroupCount = GD.RandRange(1, 3);
for (var i = 0; i < enemyGroupCount; i++)
{
enemyGroups.Add(GenerateSingleEnemyGroup());
}
return enemyGroups;
}
private FighterGroup GenerateSingleEnemyGroup()
{
var enemyGroup = new FighterGroup
{
fighters = []
};
var enemyCount = GD.RandRange(1, 3);
for (var i = 0; i < enemyCount; i++)
{
enemyGroup.fighters.Add(GenerateSingleEnemy());
}
return enemyGroup;
}
private Fighter GenerateSingleEnemy()
{
var typeRoll = GD.RandRange(0, 99);
//var type = typeRoll switch
//{
// < 50 => Fighter.Type.Blob,
// < 75 => Fighter.Type.BigBlob,
// < 90 => Fighter.Type.Mavka,
// _ => Fighter.Type.YourMom
//};
var type = Fighter.Type.Blob;
var enemy = new Fighter
{
type = type,
health = null,
maxHealth = 12,
availableActions =
[
new BlobAttackAction()
]
};
return enemy;
}
}
}
@@ -0,0 +1 @@
uid://dqe1i2qmpttwf
-181
View File
@@ -1,181 +0,0 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class Fighter : Node2D
{
[Export] public string name;
[Export] public int maxHealth;
[Export] public int attackStrength;
[Export] public int maxActions = 1;
[ExportCategory("References")]
[Export] private Node2D _attackButtons;
[Export] private Node2D _targetButtons;
[Export] private Node2D _targetMarker;
[Export] private Label _healthText;
[Export] private Node2D _visualSprite;
[Signal] public delegate void DamageTakenEventHandler();
[Signal] public delegate void AttackingEventHandler();
[Signal] public delegate void DyingEventHandler();
[Signal] public delegate void HealedEventHandler();
private int _health;
private int _actions;
public FightInstance fightInstance;
public int Health
{
get => _health;
set
{
_health = value;
if (_health <= 0)
{
_health = 0;
Die();
}
if (_health > maxHealth)
{
_health = maxHealth;
}
}
}
private void Die()
{
_visualSprite.Scale = new Vector2(1, 0.3f);
EmitSignalDying();
}
public override void _Ready()
{
Health = maxHealth;
UpdateHealthVisual();
ResetActions();
}
public void Attack()
{
fightInstance.SelectAttack(this);
}
public void HideAttackButton()
{
_attackButtons.Hide();
}
public void ShowAttackButton()
{
_attackButtons.Show();
}
public void HideTargetButtons()
{
_targetButtons.Hide();
}
public void ShowTargetButtons()
{
_targetButtons.Show();
}
public void TargetMouseEvent(Node viewport, InputEvent inputEvent, int shapeIdx)
{
if (inputEvent.IsPressed())
ClickedTarget();
}
public void AttackMouseEvent(Node viewport, InputEvent inputEvent, int shapeIdx)
{
if (inputEvent.IsPressed())
ClickedAttack();
}
public void HealMouseEvent(Node viewport, InputEvent inputEvent, int shapeIdx)
{
if (inputEvent.IsPressed())
ClickedHeal();
}
private void ClickedAttack()
{
fightInstance.SelectAttack(this);
}
private void ClickedHeal()
{
fightInstance.SelectHeal(this);
}
private void ClickedTarget()
{
fightInstance.SelectTargetAndAttack(this);
}
public void StartHoverTarget()
{
_targetMarker.Visible = true;
}
public void EndHoverTarget()
{
_targetMarker.Visible = false;
}
public void UpdateHealthVisual()
{
_healthText.Text = $"{Health}/{maxHealth}";
}
public void AttackAnimation(FightAttack attack)
{
EmitSignalAttacking();
var tween = GetTree().CreateTween();
tween.TweenProperty(this, "global_position", attack.target.GlobalPosition, 0.15);
tween.TweenCallback(Callable.From(() => attack.target?.HitAnimation(attack)));
tween.TweenProperty(this, "position", new Vector2(0, 0), 0.7)
.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
}
private void HitAnimation(FightAttack attack)
{
EmitSignalDamageTaken();
var tween = GetTree().CreateTween();
tween.TweenProperty(this, "scale", new Vector2(1.4f, 0.6f), 0.15);
tween.TweenProperty(this, "scale", new Vector2(1, 1), 0.4)
.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
}
public bool IsDead()
{
return Health <= 0;
}
public void ResetActions()
{
_actions = maxActions;
}
public bool HasActionsLeft()
{
return _actions > 0;
}
public void DecrementActions()
{
_actions--;
}
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);
}
}
@@ -0,0 +1,132 @@
using System;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public abstract class FighterAction
{
// enum has explicit values, because they are set in godot signals as integers
// e.g. here: BabushkaSceneFightHappening => ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer/AttackButton
public enum AllyActionButton
{
None,
Attack = 1,
Summon = 2,
Talk = 3,
Flee = 4,
}
public class TargetSelection
{
// ReSharper disable once MemberHidesStaticFromOuterClass
public static readonly TargetSelection Skip = new() { skipTargetSelection = () => true };
public Func<bool> skipTargetSelection = () => false;
}
public abstract class FighterActionDetail
{
public abstract bool DetailComplete();
}
private bool _abort = false;
#region Shortcuts
protected static FightWorld.FightHappeningData HappeningData =>
FightWorld.Instance.fightHappeningData ?? throw new NoFightHappeningException();
#endregion
/// <summary>
/// Executes the data modification for the action. This must happen instantly and not via a coroutines or callbacks.
/// To get a multiple hit effect for one action, use appropriate Visual Manipulation functions in AnimateAction.
/// </summary>
public virtual void ExecuteAction()
{
}
/// <summary>
/// Returns a way to determine, when an action animation is done
/// </summary>
/// <returns>
/// A variant that can be <c>float</c> or <c>Func&lt;bool&gt;</c>.<br/>
/// When the return type is <c>float</c>, the animation will take the return value amount of seconds.<br/>
/// When the return type is <c>Func&lt;bool&gt;</c>, the animation will be done, when the function returns true.
/// </returns>
public abstract Variant<float, Func<bool>> GetAnimationEnd();
/// <summary>
/// Animates the action.
/// </summary>
/// <param name="allFightersVisual"></param>
public virtual async Task AnimateAction(AllFightersVisual allFightersVisual)
{
}
public void MarkAbort()
{
_abort = true;
}
public bool MarkedForAbort()
{
return _abort;
}
/// <summary>
/// Returns the FighterActionDetail, that is currently handled.
/// </summary>
/// <returns></returns>
public virtual FighterActionDetail CurrentDetail()
{
throw new Exception("Action has no details to handle");
}
/// <summary>
/// Sets the next Detail to be handled. Returns false, when there are no more details to handle.
/// </summary>
/// <returns></returns>
public abstract bool NextDetail();
/// <summary>
/// Returns the action point cost of this action.
/// Right now, only the values 1 and 0 make sense.
/// </summary>
/// <returns></returns>
public virtual int GetActionPointCost()
{
return 1;
}
/// <summary>
/// Will be called right after the action is selected by the player. Can be used to reset the state of the details
/// </summary>
public virtual void Reset()
{
}
/// <summary>
/// If this action should be bound to an action button in the UI, return the corresponding enum value here.
/// </summary>
/// <returns></returns>
public virtual AllyActionButton BindToActionButton()
{
return AllyActionButton.None;
}
public class Skip : FighterAction
{
public override Variant<float, Func<bool>> GetAnimationEnd()
{
return 0f;
}
public override bool NextDetail()
{
return false;
}
}
}

Some files were not shown because too many files have changed in this diff Show More