improve: rename project
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.4.0-beta.2">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<PackageId>Hangman.SDK</PackageId>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Version>0.0.1</Version>
|
||||
<Authors>Hangman</Authors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GodotSharp" Version="4.4.0-beta.2"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="build\.targets" Pack="true" PackagePath="build\.targets"/>
|
||||
<Content Include="build\publish"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
2
Package/build/publish
Normal file
2
Package/build/publish
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
dotnet nuget push "$(ls -t ../../.godot/mono/temp/bin/Debug/Polonium.*.nupkg | head -n 1)" --source hangman-lab
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangman.SDK", "Hangman.SDK.csproj", "{5BA39DF8-7098-4348-A670-B3F34269F48F}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium", "Polonium.csproj", "{5BA39DF8-7098-4348-A670-B3F34269F48F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangman.SDK.Generators", "..\Hangman.SDK.Generators\Hangman.SDK.Generators.csproj", "{41B784D2-841C-44D6-90F3-9219BC264B19}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium.Generators", "..\Polonium.Generators\Polonium.Generators.csproj", "{41B784D2-841C-44D6-90F3-9219BC264B19}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangman.SDK.Generators.Test", "..\Hangman.SDK.Generators.Test\Hangman.SDK.Generators.Test.csproj", "{3BADB215-214B-41C1-B94E-89AF4A972F30}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polonium.Generators.Test", "..\Polonium.Generators.Test\Polonium.Generators.Test.csproj", "{3BADB215-214B-41C1-B94E-89AF4A972F30}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -1,11 +0,0 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="Scene">
|
||||
<AdditionalFiles Include="Assets/**/*.tscn" />
|
||||
</ItemGroup>
|
||||
<Target Name="EnsureFolders" BeforeTargets="BeforeBuild">
|
||||
<MakeDir Directories="$(ProjectDir)Assets" Condition="!Exists('$(ProjectDir)Assets')"/>
|
||||
<MakeDir Directories="$(ProjectDir)Concepts" Condition="!Exists('$(ProjectDir)Concepts')"/>
|
||||
<MakeDir Directories="$(ProjectDir)Registries" Condition="!Exists('$(ProjectDir)Registries')"/>
|
||||
<MakeDir Directories="$(ProjectDir)Data" Condition="!Exists('$(ProjectDir)Data')"/>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
dotnet nuget push "$(ls -t ../.godot/mono/temp/bin/Debug/Hangman.SDK.*.nupkg | head -n 1)" --source hangman-lab
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Hangman.SDK.Attributes;
|
||||
namespace Polonium.Attributes;
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class AutoRegister : Attribute
|
||||
{
|
||||
|
||||
25
src/Scenes/CameraScene.cs
Normal file
25
src/Scenes/CameraScene.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Godot;
|
||||
|
||||
namespace Polonium.Scenes;
|
||||
|
||||
public abstract partial class CameraScene : Scene
|
||||
{
|
||||
private Camera2D Camera { get; set; }
|
||||
protected abstract float MaxZoom { get; }
|
||||
protected abstract float MinZoom { get; }
|
||||
protected abstract float ZoomRate { get; }
|
||||
private float Zoom
|
||||
{
|
||||
get => Camera.Zoom.X;
|
||||
set => Camera.Zoom = value * Vector2.One;
|
||||
}
|
||||
public override void _Ready()
|
||||
{
|
||||
Camera = GetNode<Camera2D>("Camera");
|
||||
base._Ready();
|
||||
}
|
||||
protected void ZoomIn() => Mathf.Max(Zoom * (1 + ZoomRate), MaxZoom);
|
||||
protected void ZoomOut() => Mathf.Min(Zoom * (1 - ZoomRate), MinZoom);
|
||||
protected void ZoomAt(Vector2 pos) => Camera.Position = pos;
|
||||
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
using Godot;
|
||||
|
||||
namespace Hangman.SDK.Scenes;
|
||||
namespace Polonium.Scenes;
|
||||
|
||||
public abstract partial class RootScene : Node2D
|
||||
{
|
||||
private Scene CurrentScene { get; set; }
|
||||
private Polonium.Scenes.Scene CurrentScene { get; set; }
|
||||
|
||||
public void SwitchScene(Scene scene)
|
||||
public void SwitchScene(Polonium.Scenes.Scene scene)
|
||||
{
|
||||
if (CurrentScene != null)
|
||||
RemoveChild(CurrentScene);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Godot;
|
||||
|
||||
namespace Hangman.SDK.Scenes;
|
||||
namespace Polonium.Scenes;
|
||||
|
||||
public abstract partial class Scene : Node2D
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace Hangman.SDK;
|
||||
namespace Polonium;
|
||||
|
||||
public static class Utils
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user