C#: Rename Object to GodotObject
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace Godot.SourceGenerators.Sample
|
||||
{
|
||||
partial class Bar : Godot.Object
|
||||
partial class Bar : GodotObject
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
{
|
||||
}
|
||||
|
||||
partial class NotSameNameAsFile : Godot.Object
|
||||
partial class NotSameNameAsFile : GodotObject
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Godot.SourceGenerators.Sample;
|
||||
|
||||
public partial class EventSignals : Godot.Object
|
||||
public partial class EventSignals : GodotObject
|
||||
{
|
||||
[Signal]
|
||||
public delegate void MySignalEventHandler(string str, int num);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[SuppressMessage("ReSharper", "RedundantNameQualifier")]
|
||||
[SuppressMessage("ReSharper", "ArrangeObjectCreationWhenTypeEvident")]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public partial class ExportedFields : Godot.Object
|
||||
public partial class ExportedFields : GodotObject
|
||||
{
|
||||
[Export] private Boolean field_Boolean = true;
|
||||
[Export] private Char field_Char = 'f';
|
||||
@@ -80,7 +80,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Vector2[] field_Vector2Array = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
|
||||
[Export] private Vector3[] field_Vector3Array = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
|
||||
[Export] private Color[] field_ColorArray = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
|
||||
[Export] private Godot.Object[] field_GodotObjectOrDerivedArray = { null };
|
||||
[Export] private GodotObject[] field_GodotObjectOrDerivedArray = { null };
|
||||
[Export] private StringName[] field_StringNameArray = { "foo", "bar" };
|
||||
[Export] private NodePath[] field_NodePathArray = { "foo", "bar" };
|
||||
[Export] private Rid[] field_RidArray = { default, default, default };
|
||||
@@ -93,7 +93,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Variant field_Variant = "foo";
|
||||
|
||||
// Classes
|
||||
[Export] private Godot.Object field_GodotObjectOrDerived;
|
||||
[Export] private GodotObject field_GodotObjectOrDerived;
|
||||
[Export] private Godot.Texture field_GodotResourceTexture;
|
||||
[Export] private StringName field_StringName = new StringName("foo");
|
||||
[Export] private NodePath field_NodePath = new NodePath("foo");
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[SuppressMessage("ReSharper", "RedundantNameQualifier")]
|
||||
[SuppressMessage("ReSharper", "ArrangeObjectCreationWhenTypeEvident")]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public partial class ExportedProperties : Godot.Object
|
||||
public partial class ExportedProperties : GodotObject
|
||||
{
|
||||
// Do not generate default value
|
||||
private String _notGenerate_Property_String = new string("not generate");
|
||||
@@ -168,7 +168,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Vector2[] property_Vector2Array { get; set; } = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
|
||||
[Export] private Vector3[] property_Vector3Array { get; set; } = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
|
||||
[Export] private Color[] property_ColorArray { get; set; } = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
|
||||
[Export] private Godot.Object[] property_GodotObjectOrDerivedArray { get; set; } = { null };
|
||||
[Export] private GodotObject[] property_GodotObjectOrDerivedArray { get; set; } = { null };
|
||||
[Export] private StringName[] field_StringNameArray { get; set; } = { "foo", "bar" };
|
||||
[Export] private NodePath[] field_NodePathArray { get; set; } = { "foo", "bar" };
|
||||
[Export] private Rid[] field_RidArray { get; set; } = { default, default, default };
|
||||
@@ -177,7 +177,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Variant property_Variant { get; set; } = "foo";
|
||||
|
||||
// Classes
|
||||
[Export] private Godot.Object property_GodotObjectOrDerived { get; set; }
|
||||
[Export] private GodotObject property_GodotObjectOrDerived { get; set; }
|
||||
[Export] private Godot.Texture property_GodotResourceTexture { get; set; }
|
||||
[Export] private StringName property_StringName { get; set; } = new StringName("foo");
|
||||
[Export] private NodePath property_NodePath { get; set; } = new NodePath("foo");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Godot.SourceGenerators.Sample
|
||||
{
|
||||
partial class Foo : Godot.Object
|
||||
partial class Foo : GodotObject
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
|
||||
namespace Godot.SourceGenerators.Sample
|
||||
{
|
||||
partial class Generic<T> : Godot.Object
|
||||
partial class Generic<T> : GodotObject
|
||||
{
|
||||
private int _field;
|
||||
}
|
||||
|
||||
// Generic again but different generic parameters
|
||||
partial class Generic<T, R> : Godot.Object
|
||||
partial class Generic<T, R> : GodotObject
|
||||
{
|
||||
private int _field;
|
||||
}
|
||||
|
||||
// Generic again but without generic parameters
|
||||
partial class Generic : Godot.Object
|
||||
partial class Generic : GodotObject
|
||||
{
|
||||
private int _field;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace Godot.SourceGenerators.Sample;
|
||||
|
||||
[SuppressMessage("ReSharper", "RedundantNameQualifier")]
|
||||
public partial class Methods : Godot.Object
|
||||
public partial class Methods : GodotObject
|
||||
{
|
||||
private void MethodWithOverload()
|
||||
{
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[SuppressMessage("ReSharper", "ArrangeObjectCreationWhenTypeEvident")]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
// We split the definition of ExportedFields to verify properties work across multiple files.
|
||||
public partial class ExportedFields : Godot.Object
|
||||
public partial class ExportedFields : GodotObject
|
||||
{
|
||||
// Note we use Array and not System.Array. This tests the generated namespace qualification.
|
||||
[Export] private Int64[] field_empty_Int64Array = Array.Empty<Int64>();
|
||||
|
||||
Reference in New Issue
Block a user