Compare commits
10 Commits
9f968fd814
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7320b84020 | |||
| ebca3a1da9 | |||
| 0d94eef283 | |||
| 835cc42d33 | |||
| 38c30da8a5 | |||
| 56670cb0ba | |||
| 14ad27fa99 | |||
| 1e8d33e436 | |||
| c5d5a0da61 | |||
| fa5bc913a4 |
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
DOTNET_NOLOGO: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
token: ${{ secrets.GH_BASIC }}
|
||||
lfs: true
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
# run: |
|
||||
# version="${{ steps.next-version.outputs.version }}"
|
||||
|
||||
# curl -X POST "http://192.168.1.4:3000/api/packages/Ronnie/GodotHelpers/releases" \
|
||||
# curl -X POST "https://gitea.superjrking.com/api/packages/Ronnie/GodotHelpers/releases" \
|
||||
# -H "Authorization: token ${{ secrets.GH_BASIC }}" \
|
||||
# -H "Content-Type: application/json" \
|
||||
# -d "{
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
- name: Publish to Nuget
|
||||
run: |
|
||||
dotnet nuget push "${{ steps.package-path.outputs.package }}" \
|
||||
--source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \
|
||||
--source "https://gitea.superjrking.com/api/packages/Ronnie/nuget/index.json" \
|
||||
--allow-insecure-connections \
|
||||
--api-key "${{ secrets.NUGET_KEY }}" \
|
||||
--skip-duplicate
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="GodotSharp" Version="4.6.2" />
|
||||
<PackageReference Include="SjkScripts" Version="1.0.17" />
|
||||
<PackageReference Include="SjkScripts" Version="1.0.19" />
|
||||
<!-- [1.2.3,2.3.4] use range of versions -->
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
14
GodotHelper/src/Math/Planes.cs
Normal file
14
GodotHelper/src/Math/Planes.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace GodotHelpers;
|
||||
|
||||
using Godot;
|
||||
public static partial class SJKMath
|
||||
{
|
||||
public static Vector3? MouseToPlane(this Plane plane, Camera3D viewCamera, Vector2? mousePos = null)
|
||||
{
|
||||
var from = viewCamera.ProjectRayOrigin( mousePos ?? viewCamera.GetViewport().GetMousePosition());
|
||||
var normal = viewCamera.ProjectRayNormal(mousePos ?? viewCamera.GetViewport().GetMousePosition());
|
||||
return plane.IntersectsRay(from, normal);
|
||||
}
|
||||
public static Vector3? MouseToGroundPlane(this Camera3D viewCamera, Vector2? mousePos = null, float offset = 0) =>
|
||||
(Plane.PlaneXZ with { D = offset }).MouseToPlane(viewCamera, mousePos);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ namespace GodotHelpers;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
|
||||
using SJK.Functional;
|
||||
|
||||
public static class MyNodeExtensions
|
||||
{
|
||||
@@ -41,6 +41,7 @@ public static class MyNodeExtensions
|
||||
var result = self.GetNodeAndResource(path);
|
||||
return ((Node)(GodotObject)result[0], (Resource)(GodotObject)result[1], (NodePath)result[2]);
|
||||
}
|
||||
|
||||
public static void QueueFreeChildren(this Node node) => node.GetChildren().ToList().ForEach(item => item.QueueFree());
|
||||
public static void QueueFreeChildren(this Node node, Func<Node, bool> predicate) => node.GetChildren().Where(predicate).ToList().ForEach(item => item.QueueFree());
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
<add key="gitea" value="http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" allowInsecureConnections="True" />
|
||||
<add key="coverlet" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
|
||||
<add key="gitea" value="https://gitea.superjrking.com/api/packages/Ronnie/nuget/index.json"/>
|
||||
</packageSources>
|
||||
<packageSourceCredentials>
|
||||
<gitea>
|
||||
|
||||
Reference in New Issue
Block a user