Fix export
This commit is contained in:
66
Ma.sln
66
Ma.sln
@@ -1,66 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35222.181
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ma", "Zennysoft.Game.Ma\Ma.csproj", "{B685AA99-B971-46A7-A708-00546BA0EF55}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Ma.Adapter", "Zennysoft.Game.Ma.Implementation\Zennysoft.Ma.Adapter.csproj", "{3C934960-1375-4971-BF3F-C21F5241573A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E4C0167B-02AB-49E0-B36D-30D0A2479C25}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Abstractions", "Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj", "{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zennysoft.Game.Implementation", "Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj", "{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.Release|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.Release|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C934960-1375-4971-BF3F-C21F5241573A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB9A8B79-82E1-4254-B4FB-7F4BCB57BDBF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F93CA4C0-DFA0-4AE2-AFB4-8238390F11F0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EFF5E6D7-4263-4677-8014-337284356F7A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -5,5 +5,4 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
||||
<PackageReference Include="System.IO.Abstractions" Version="22.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj" />
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file is used by Code Analysis to maintain SuppressMessage
|
||||
// attributes that are applied to this project.
|
||||
// Project-level suppressions either have no target or are given
|
||||
// a specific target and scoped to a namespace, type, member, etc.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure", Justification = "<Pending>", Scope = "namespace", Target = "~N:Zennysoft.Game.Ma.Implementation")]
|
||||
@@ -2,18 +2,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<!-- Use NativeAOT. -->
|
||||
<PublishAot>true</PublishAot>
|
||||
<WarningsAsErrors>CS9057</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="src\items\weapons\models\**" />
|
||||
<EmbeddedResource Remove="src\items\weapons\models\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Root the assemblies to avoid trimming. -->
|
||||
<TrimmerRootAssembly Include="GodotSharp" />
|
||||
<TrimmerRootAssembly Include="$(TargetName)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Chickensoft.AutoInject" Version="2.5.0" />
|
||||
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
||||
@@ -29,11 +19,6 @@
|
||||
<PackageReference Include="System.IO.Abstractions" Version="22.0.11" />
|
||||
<PackageReference Include="Zeroconf" Version="3.7.16" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="src\enemy\enemy_types\14. horse_head\" />
|
||||
<Folder Include="src\enemy\enemy_types\15. ox_face\" />
|
||||
<Folder Include="src\ui\dialogue\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include=".editorconfig" />
|
||||
</ItemGroup>
|
||||
@@ -49,5 +34,5 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="GodotSharpEditor" Version="4.4.0-dev.2" />
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
61
Zennysoft.Game.Ma/Ma.sln
Normal file
61
Zennysoft.Game.Ma/Ma.sln
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35222.181
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ma", "Ma.csproj", "{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Abstractions", "..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj", "{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Implementation", "..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj", "{F6808C1C-EDFB-4602-BA01-34FB682A270C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Ma.Adapter", "..\Zennysoft.Game.Ma.Implementation\Zennysoft.Ma.Adapter.csproj", "{CC55EDC3-B9EA-4393-BE4D-630C34393A94}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Release|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Release|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {797FF6A1-5959-42C9-A7A2-A8D39F9AC1A4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -26,16 +26,16 @@ DialogueController="*res://src/game/DialogueController.cs"
|
||||
|
||||
editor/wrap_long_lines=true
|
||||
runtime/balloon_path="res://src/ui/dialogue/Balloon.tscn"
|
||||
runtime/advanced/uses_dotnet=true
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/size/viewport_width=1024
|
||||
window/size/viewport_height=768
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="Ma"
|
||||
project/solution_directory="Ma"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
|
||||
@@ -38,80 +38,80 @@ public partial class App : CanvasLayer, IApp
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
var container = new SimpleInjector.Container();
|
||||
container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
|
||||
container.Register<IAppRepo, AppRepo>(Lifestyle.Singleton);
|
||||
container.Register<IAppLogic, AppLogic>(Lifestyle.Singleton);
|
||||
container.Verify();
|
||||
var container = new SimpleInjector.Container();
|
||||
container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
|
||||
container.RegisterSingleton<IAppRepo, AppRepo>();
|
||||
container.RegisterSingleton<IAppLogic, AppLogic>();
|
||||
//container.Verify();
|
||||
|
||||
Instantiator = new Instantiator(GetTree());
|
||||
Instantiator = new Instantiator(GetTree());
|
||||
|
||||
AppRepo = container.GetInstance<IAppRepo>();
|
||||
AppLogic = container.GetInstance<IAppLogic>();
|
||||
AppRepo = container.GetInstance<IAppRepo>();
|
||||
AppLogic = container.GetInstance<IAppLogic>();
|
||||
|
||||
AppLogic.Set(AppRepo);
|
||||
AppLogic.Set(new AppLogic.Data());
|
||||
AppLogic.Set(AppRepo);
|
||||
AppLogic.Set(new AppLogic.Data());
|
||||
|
||||
Menu.NewGame += OnNewGame;
|
||||
Menu.LoadGame += OnLoadGame;
|
||||
Menu.Quit += OnQuit;
|
||||
Menu.NewGame += OnNewGame;
|
||||
Menu.LoadGame += OnLoadGame;
|
||||
Menu.Quit += OnQuit;
|
||||
|
||||
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
||||
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
||||
|
||||
Input.MouseMode = Input.MouseModeEnum.Visible;
|
||||
this.Provide();
|
||||
Input.MouseMode = Input.MouseModeEnum.Visible;
|
||||
this.Provide();
|
||||
}
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
AppBinding = AppLogic.Bind();
|
||||
AppBinding = AppLogic.Bind();
|
||||
|
||||
AppBinding
|
||||
.Handle((in AppLogic.Output.ShowSplashScreen _) =>
|
||||
{
|
||||
HideMenus();
|
||||
BlankScreen.Hide();
|
||||
Splash.Show();
|
||||
})
|
||||
.Handle((in AppLogic.Output.HideSplashScreen _) =>
|
||||
{
|
||||
BlankScreen.Show();
|
||||
FadeToBlack();
|
||||
})
|
||||
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
||||
{
|
||||
Game = Instantiator.LoadAndInstantiate<Game>(GAME_SCENE_PATH);
|
||||
GameWindow.AddChildEx(Game);
|
||||
Instantiator.SceneTree.Paused = false;
|
||||
})
|
||||
.Handle((in AppLogic.Output.ShowMainMenu _) =>
|
||||
{
|
||||
// Load everything while we're showing a black screen, then fade in.
|
||||
HideMenus();
|
||||
Menu.Show();
|
||||
AppBinding
|
||||
.Handle((in AppLogic.Output.ShowSplashScreen _) =>
|
||||
{
|
||||
HideMenus();
|
||||
BlankScreen.Hide();
|
||||
Splash.Show();
|
||||
})
|
||||
.Handle((in AppLogic.Output.HideSplashScreen _) =>
|
||||
{
|
||||
BlankScreen.Show();
|
||||
FadeToBlack();
|
||||
})
|
||||
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
||||
{
|
||||
Game = Instantiator.LoadAndInstantiate<Game>(GAME_SCENE_PATH);
|
||||
GameWindow.AddChildEx(Game);
|
||||
Instantiator.SceneTree.Paused = false;
|
||||
})
|
||||
.Handle((in AppLogic.Output.ShowMainMenu _) =>
|
||||
{
|
||||
// Load everything while we're showing a black screen, then fade in.
|
||||
HideMenus();
|
||||
Menu.Show();
|
||||
|
||||
FadeInFromBlack();
|
||||
Menu.NewGameButton.GrabFocus();
|
||||
})
|
||||
.Handle((in AppLogic.Output.FadeToBlack _) => FadeToBlack())
|
||||
.Handle((in AppLogic.Output.HideGame _) => FadeToBlack())
|
||||
.Handle((in AppLogic.Output.ShowGame _) =>
|
||||
{
|
||||
HideMenus();
|
||||
FadeInFromBlack();
|
||||
})
|
||||
.Handle((in AppLogic.Output.StartLoadingSaveFile _) =>
|
||||
{
|
||||
Game.SaveFileLoaded += OnSaveFileLoaded;
|
||||
Game.LoadExistingGame();
|
||||
})
|
||||
.Handle((in AppLogic.Output.ExitGame _) =>
|
||||
{
|
||||
GetTree().Quit();
|
||||
});
|
||||
FadeInFromBlack();
|
||||
Menu.NewGameButton.GrabFocus();
|
||||
})
|
||||
.Handle((in AppLogic.Output.FadeToBlack _) => FadeToBlack())
|
||||
.Handle((in AppLogic.Output.HideGame _) => FadeToBlack())
|
||||
.Handle((in AppLogic.Output.ShowGame _) =>
|
||||
{
|
||||
HideMenus();
|
||||
FadeInFromBlack();
|
||||
})
|
||||
.Handle((in AppLogic.Output.StartLoadingSaveFile _) =>
|
||||
{
|
||||
Game.SaveFileLoaded += OnSaveFileLoaded;
|
||||
Game.LoadExistingGame();
|
||||
})
|
||||
.Handle((in AppLogic.Output.ExitGame _) =>
|
||||
{
|
||||
GetTree().Quit();
|
||||
});
|
||||
|
||||
|
||||
AppLogic.Start();
|
||||
AppLogic.Start();
|
||||
}
|
||||
|
||||
public void OnNewGame() => AppLogic.Input(new AppLogic.Input.NewGame());
|
||||
@@ -122,44 +122,44 @@ public partial class App : CanvasLayer, IApp
|
||||
|
||||
public void OnSaveFileLoaded()
|
||||
{
|
||||
Game.SaveFileLoaded -= OnSaveFileLoaded;
|
||||
AppLogic.Input(new AppLogic.Input.SaveFileLoaded());
|
||||
Game.SaveFileLoaded -= OnSaveFileLoaded;
|
||||
AppLogic.Input(new AppLogic.Input.SaveFileLoaded());
|
||||
}
|
||||
|
||||
public void FadeInFromBlack()
|
||||
{
|
||||
BlankScreen.Show();
|
||||
AnimationPlayer.Play("fade_in");
|
||||
BlankScreen.Show();
|
||||
AnimationPlayer.Play("fade_in");
|
||||
}
|
||||
|
||||
public void FadeToBlack()
|
||||
{
|
||||
BlankScreen.Show();
|
||||
AnimationPlayer.Play("fade_out");
|
||||
BlankScreen.Show();
|
||||
AnimationPlayer.Play("fade_out");
|
||||
}
|
||||
|
||||
public void HideMenus()
|
||||
{
|
||||
Splash.Hide();
|
||||
Menu.Hide();
|
||||
Splash.Hide();
|
||||
Menu.Hide();
|
||||
}
|
||||
|
||||
public void OnAnimationFinished(StringName animation)
|
||||
{
|
||||
if (animation == "fade_in")
|
||||
{
|
||||
AppLogic.Input(new AppLogic.Input.FadeInFinished());
|
||||
BlankScreen.Hide();
|
||||
return;
|
||||
}
|
||||
if (animation == "fade_in")
|
||||
{
|
||||
AppLogic.Input(new AppLogic.Input.FadeInFinished());
|
||||
BlankScreen.Hide();
|
||||
return;
|
||||
}
|
||||
|
||||
AppLogic.Input(new AppLogic.Input.FadeOutFinished());
|
||||
AppLogic.Input(new AppLogic.Input.FadeOutFinished());
|
||||
}
|
||||
|
||||
public void OnExitTree()
|
||||
{
|
||||
AppLogic.Stop();
|
||||
AppBinding.Dispose();
|
||||
AppRepo.Dispose();
|
||||
AppLogic.Stop();
|
||||
AppBinding.Dispose();
|
||||
AppRepo.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public partial class Game : Node3D, IGame
|
||||
{
|
||||
_container = new SimpleInjector.Container();
|
||||
Module.Bootstrap(_container);
|
||||
_container.Verify();
|
||||
//_container.Verify();
|
||||
|
||||
GameRepo = _container.GetInstance<IGameRepo>();
|
||||
GameLogic = _container.GetInstance<IGameLogic>();
|
||||
|
||||
@@ -173,7 +173,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
if (ItemSlots.Length == 0 || UseButton.HasFocus() || DropButton.HasFocus() || ThrowButton.HasFocus())
|
||||
return;
|
||||
|
||||
if (@event.IsActionPressed(GameInputs.UiRight) && _currentPageNumber == InventoryPageNumber.FirstPage && inventory.Items.Count() > _itemsPerPage)
|
||||
if (@event.IsActionPressed(GameInputs.UiRight) && _currentPageNumber == InventoryPageNumber.FirstPage && inventory.Items.Count > _itemsPerPage)
|
||||
ChangeInventoryPage(InventoryPageNumber.SecondPage);
|
||||
|
||||
if (@event.IsActionPressed(GameInputs.UiLeft) && _currentPageNumber == InventoryPageNumber.SecondPage)
|
||||
@@ -250,7 +250,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
{
|
||||
FloorLabel.Text = $"Floor {_map.CurrentFloorNumber:D2}";
|
||||
|
||||
if (ItemSlots.Any())
|
||||
if (ItemSlots.Length != 0)
|
||||
{
|
||||
var item = ItemSlots.ElementAt(_currentIndex).Item;
|
||||
ItemDescriptionTitle.Text = $"{item.ItemName}";
|
||||
@@ -272,9 +272,9 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
if (currentItem is EquipableItem equipable)
|
||||
{
|
||||
UseButton.Text = equipable.IsEquipped ? "Unequip" : "Equip";
|
||||
ThrowButton.Disabled = equipable.IsEquipped ? true : false;
|
||||
ThrowButton.Disabled = equipable.IsEquipped;
|
||||
ThrowButton.FocusMode = equipable.IsEquipped ? FocusModeEnum.None : FocusModeEnum.All;
|
||||
DropButton.Disabled = equipable.IsEquipped ? true : false;
|
||||
DropButton.Disabled = equipable.IsEquipped;
|
||||
DropButton.FocusMode = equipable.IsEquipped ? FocusModeEnum.None : FocusModeEnum.All;
|
||||
}
|
||||
else
|
||||
@@ -345,7 +345,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
itemSlot.SetEquippedItemStyle();
|
||||
}
|
||||
|
||||
if (ItemSlots.Any())
|
||||
if (ItemSlots.Length != 0)
|
||||
{
|
||||
ItemSlots.ElementAt(_currentIndex).SetSelectedItemStyle();
|
||||
if (ItemSlots.ElementAt(_currentIndex).Item is EquipableItem equipable && equipable.IsEquipped)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=50 format=3 uid="uid://jds3hr41coal"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dcqssoikr3pl7" path="res://src/npc/Npc.cs" id="1_f3624"]
|
||||
[ext_resource type="Resource" uid="uid://b681mabgdkg6j" path="res://src/npc/Ran/ran.dialogue" id="2_3udpp"]
|
||||
[ext_resource type="Resource" uid="uid://lao0opxww3ib" path="res://src/dialog/Dialogue.dialogue" id="2_3udpp"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct2523slwx30o" path="res://src/npc/Ran/animations/Layer 1.png" id="4_bww12"]
|
||||
[ext_resource type="Texture2D" uid="uid://b72fnsmgg1mff" path="res://src/npc/Ran/animations/Layer 2.png" id="5_jl1c6"]
|
||||
[ext_resource type="Texture2D" uid="uid://c01a6i2hmq7nb" path="res://src/npc/Ran/animations/Layer 3.png" id="6_yx0nu"]
|
||||
|
||||
@@ -95,7 +95,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
|
||||
private Dictionary<int, int> _expToNextLevel;
|
||||
|
||||
private IDamageCalculator _damageCalculator;
|
||||
private DamageCalculator _damageCalculator;
|
||||
|
||||
#region Initialization
|
||||
public void Initialize()
|
||||
@@ -118,7 +118,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
{
|
||||
var container = new SimpleInjector.Container();
|
||||
container.Register<IPlayerLogic, PlayerLogic>(Lifestyle.Singleton);
|
||||
container.Verify();
|
||||
//container.Verify();
|
||||
|
||||
Settings = new PlayerLogic.Settings() { RotationSpeed = PlayerStatResource.RotationSpeed, MoveSpeed = PlayerStatResource.MoveSpeed, Acceleration = PlayerStatResource.Acceleration };
|
||||
Stats = new PlayerStatController();
|
||||
@@ -218,10 +218,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
}
|
||||
else
|
||||
{
|
||||
var attackSpeed = ((Weapon)EquippedWeapon.Value).AttackSpeed;
|
||||
AnimationPlayer.SetSpeedScale((float)attackSpeed);
|
||||
AnimationPlayer.Play("attack");
|
||||
_gameRepo.OnPlayerAttack();
|
||||
PlayAttackAnimation();
|
||||
}
|
||||
})
|
||||
.Handle((in PlayerLogic.Output.ThrowItem output) =>
|
||||
@@ -321,7 +318,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
transform.Basis = new Basis(Vector3.Up, Settings.RotationSpeed * -rawInput.X * delta) * transform.Basis;
|
||||
var moveDirection = new Vector3(strafeRightInput - strafeLeftInput, 0, rawInput.Z).Normalized();
|
||||
var velocity = Basis * moveDirection * Settings.MoveSpeed * Settings.Acceleration;
|
||||
_knockbackStrength = _knockbackStrength * 0.9f;
|
||||
_knockbackStrength *= 0.9f;
|
||||
Transform = Transform with { Basis = transform.Basis };
|
||||
Velocity = velocity + (_knockbackDirection * _knockbackStrength);
|
||||
MoveAndSlide();
|
||||
@@ -481,6 +478,17 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
throwItem.GlobalRotation = GlobalRotation;
|
||||
}
|
||||
|
||||
private void PlayAttackAnimation()
|
||||
{
|
||||
var attackSpeed = ((Weapon)EquippedWeapon.Value).AttackSpeed;
|
||||
AnimationPlayer.SetSpeedScale((float)attackSpeed);
|
||||
if (EquippedWeapon.Value.ItemName == "Atonement")
|
||||
AnimationPlayer.Play("atonement_attack");
|
||||
else
|
||||
AnimationPlayer.Play("attack");
|
||||
_gameRepo.OnPlayerAttack();
|
||||
}
|
||||
|
||||
private void OnAnimationFinished(StringName animation)
|
||||
{
|
||||
PlayerLogic.Input(new PlayerLogic.Input.AttackAnimationFinished());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=61 format=4 uid="uid://cfecvvav8kkp6"]
|
||||
[gd_scene load_steps=62 format=4 uid="uid://cfecvvav8kkp6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://yxmiqy7i0t7r" path="res://src/player/Player.cs" id="1_xcol5"]
|
||||
[ext_resource type="Script" uid="uid://6edayafleq8y" path="res://src/hitbox/Hitbox.cs" id="2_lb3qc"]
|
||||
@@ -109,9 +109,14 @@ tracks/0/keys = {
|
||||
"values": [10, 1, 11]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_g183x"]
|
||||
resource_name = "atonement_attack"
|
||||
step = 0.0833333
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_w8l8m"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_hcjph"),
|
||||
&"atonement_attack": SubResource("Animation_g183x"),
|
||||
&"attack": SubResource("Animation_0jjwv"),
|
||||
&"hit_wall": SubResource("Animation_es4xk")
|
||||
}
|
||||
@@ -539,7 +544,7 @@ flip_v = true
|
||||
[node name="Camera" type="Node3D" parent="."]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Camera"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.003, 1.52615, 0.482136)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.003, 1.62599, 0.482136)
|
||||
cull_mask = 1048569
|
||||
fov = 45.0
|
||||
near = 0.001
|
||||
|
||||
37
Zennysoft.Game.Ma/src/player/Warp.gdshader
Normal file
37
Zennysoft.Game.Ma/src/player/Warp.gdshader
Normal file
@@ -0,0 +1,37 @@
|
||||
shader_type spatial;
|
||||
render_mode unshaded;
|
||||
|
||||
|
||||
// Handles the concentric ripples
|
||||
uniform float frequency: hint_range(0, 15, 0.01) = 4.0;
|
||||
uniform float amplitude: hint_range(0, 3, 0.1) = 2.0;
|
||||
uniform float ripple_rate : hint_range(0, 20.0, 1) = 5;
|
||||
uniform float blending : hint_range(0.0, 1.0, 0.01) = 1.0;
|
||||
|
||||
// Handles the waves themselves
|
||||
uniform float wave_amplitude: hint_range(0.001, 0.1, 0.001) = 0.05;
|
||||
uniform float wave_frequency: hint_range(0, 15, 0.01) = 4.0;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap, repeat_disable;
|
||||
|
||||
vec2 wave(vec2 uv, float time) {
|
||||
return vec2(
|
||||
uv.x + sin(uv.y * wave_frequency + time) * wave_amplitude,
|
||||
uv.y + sin(uv.x * wave_frequency + time) * wave_amplitude
|
||||
);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 screen_pixel_size = 1.0 / VIEWPORT_SIZE;
|
||||
vec2 center_position = -1.0 + 2.0 * UV;
|
||||
float center_distance = length(center_position);
|
||||
|
||||
float ripple = sin(center_distance * -frequency * PI + ripple_rate * TIME) * amplitude / (center_distance + 1.0);
|
||||
|
||||
vec2 uv = FRAGCOORD.xy * screen_pixel_size + (center_position/center_distance) * ripple * wave_amplitude;
|
||||
vec2 background_wave = wave(uv, TIME);
|
||||
vec4 background_texture = texture(SCREEN_TEXTURE, background_wave) * sqrt(amplitude);
|
||||
|
||||
ALBEDO = background_texture.rgb;
|
||||
ALPHA = blending;
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/player/Warp.gdshader.uid
Normal file
1
Zennysoft.Game.Ma/src/player/Warp.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://oatmuwfkep0w
|
||||
Reference in New Issue
Block a user