diff --git a/GodotHelper/src/MyNodeExtensions.cs b/GodotHelper/src/MyNodeExtensions.cs index 579c160..de6d15e 100644 --- a/GodotHelper/src/MyNodeExtensions.cs +++ b/GodotHelper/src/MyNodeExtensions.cs @@ -11,10 +11,10 @@ public static class MyNodeExtensions /// /// Checks if given Property exists on Base /// - /// Current GodotObject - /// Property Name + /// Current GodotObject + /// Property Name /// bool true if given property exists on Base - public static bool HasProperty(this GodotObject Base, string PropertyName) + public static bool HasProperty(this GodotObject @base, string propertyName) { /* Returns the object's property list as an Godot.Collections.Array of dictionaries. @@ -26,9 +26,9 @@ public static class MyNodeExtensions - hint_string depends on the hint (see PropertyHint); - usage is a combination of PropertyUsageFlags. */ - foreach (var Property in Base.GetPropertyListEx()) + foreach (var property in @base.GetPropertyListEx()) { - if (Property.Name == PropertyName) + if (property.Name == propertyName) { return true; } @@ -39,7 +39,7 @@ public static class MyNodeExtensions public static (Node node, Resource resource, NodePath remaining) GetNodeAndResourceEx(this Node self, NodePath path) { var result = self.GetNodeAndResource(path); - return ((Node)result[0], (Resource)result[1], (NodePath)result[2]); + 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 predicate) => node.GetChildren().Where(predicate).ToList().ForEach(item => item.QueueFree()); diff --git a/GodotHelper/src/Raycasts/ShapeCastResult3D.cs b/GodotHelper/src/Raycasts/ShapeCastResult3D.cs index ec98499..a0dfdda 100644 --- a/GodotHelper/src/Raycasts/ShapeCastResult3D.cs +++ b/GodotHelper/src/Raycasts/ShapeCastResult3D.cs @@ -1,7 +1,7 @@ -using Godot; - namespace GodotHelpers.Raycasts; +using Godot; + public record ShapeCastResult3D( GodotObject Collider, int ColliderId, diff --git a/GodotHelper/src/VariantUtils.cs b/GodotHelper/src/VariantUtils.cs index cf7edaf..907e93b 100644 --- a/GodotHelper/src/VariantUtils.cs +++ b/GodotHelper/src/VariantUtils.cs @@ -1,8 +1,8 @@ +namespace SJK.GodotHelpers; + using System; -using System.Collections.Generic; using Godot; using Godot.Collections; -namespace SJK.GodotHelpers; public static class VariantUtils { @@ -73,6 +73,18 @@ public static class VariantUtils Variant.Type.Signal => typeof(Signal), Variant.Type.Dictionary => typeof(Dictionary), Variant.Type.Array => typeof(Godot.Collections.Array), + Variant.Type.Projection => throw new NotImplementedException(), + Variant.Type.PackedByteArray => throw new NotImplementedException(), + Variant.Type.PackedInt32Array => throw new NotImplementedException(), + Variant.Type.PackedInt64Array => throw new NotImplementedException(), + Variant.Type.PackedFloat32Array => throw new NotImplementedException(), + Variant.Type.PackedFloat64Array => throw new NotImplementedException(), + Variant.Type.PackedStringArray => throw new NotImplementedException(), + Variant.Type.PackedVector2Array => throw new NotImplementedException(), + Variant.Type.PackedVector3Array => throw new NotImplementedException(), + Variant.Type.PackedColorArray => throw new NotImplementedException(), + Variant.Type.PackedVector4Array => throw new NotImplementedException(), + Variant.Type.Max => throw new NotImplementedException(), _ => typeof(object) }; } diff --git a/cspell.json b/cspell.json index 69a4f6f..49e54b0 100644 --- a/cspell.json +++ b/cspell.json @@ -1,6 +1,7 @@ { "files": [ - "**/*.*" + "**/*.*", + "**/*.uid" ], "ignorePaths": [ "**/*.tscn",