C#: Renames to follow .NET naming conventions
Renamed C# types and members to use PascalCase and follow .NET naming conventions.
This commit is contained in:
@@ -29,19 +29,19 @@ namespace Godot.SourceGenerators.Sample
|
||||
|
||||
// Godot structs
|
||||
[Export] private Vector2 field_Vector2 = new(10f, 10f);
|
||||
[Export] private Vector2i field_Vector2i = Vector2i.Up;
|
||||
[Export] private Vector2I field_Vector2I = Vector2I.Up;
|
||||
[Export] private Rect2 field_Rect2 = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
|
||||
[Export] private Rect2i field_Rect2i = new(new Vector2i(10, 10), new Vector2i(10, 10));
|
||||
[Export] private Rect2I field_Rect2I = new(new Vector2I(10, 10), new Vector2I(10, 10));
|
||||
[Export] private Transform2D field_Transform2D = Transform2D.Identity;
|
||||
[Export] private Vector3 field_Vector3 = new(10f, 10f, 10f);
|
||||
[Export] private Vector3i field_Vector3i = Vector3i.Back;
|
||||
[Export] private Vector3I field_Vector3I = Vector3I.Back;
|
||||
[Export] private Basis field_Basis = new Basis(Quaternion.Identity);
|
||||
[Export] private Quaternion field_Quaternion = new Quaternion(Basis.Identity);
|
||||
[Export] private Transform3D field_Transform3D = Transform3D.Identity;
|
||||
[Export] private Vector4 field_Vector4 = new(10f, 10f, 10f, 10f);
|
||||
[Export] private Vector4i field_Vector4i = Vector4i.One;
|
||||
[Export] private Vector4I field_Vector4I = Vector4I.One;
|
||||
[Export] private Projection field_Projection = Projection.Identity;
|
||||
[Export] private AABB field_AABB = new AABB(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
|
||||
[Export] private Aabb field_Aabb = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
|
||||
[Export] private Color field_Color = Colors.Aquamarine;
|
||||
[Export] private Plane field_Plane = Plane.PlaneXZ;
|
||||
[Export] private Callable field_Callable = new Callable(Engine.GetMainLoop(), "_process");
|
||||
@@ -83,7 +83,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Godot.Object[] 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 };
|
||||
[Export] private Rid[] field_RidArray = { default, default, default };
|
||||
// Note we use Array and not System.Array. This tests the generated namespace qualification.
|
||||
[Export] private Int32[] field_empty_Int32Array = Array.Empty<Int32>();
|
||||
// Note we use List and not System.Collections.Generic.
|
||||
@@ -97,7 +97,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Godot.Texture field_GodotResourceTexture;
|
||||
[Export] private StringName field_StringName = new StringName("foo");
|
||||
[Export] private NodePath field_NodePath = new NodePath("foo");
|
||||
[Export] private RID field_RID;
|
||||
[Export] private Rid field_Rid;
|
||||
|
||||
[Export]
|
||||
private Godot.Collections.Dictionary field_GodotDictionary =
|
||||
|
||||
+7
-7
@@ -117,19 +117,19 @@ namespace Godot.SourceGenerators.Sample
|
||||
|
||||
// Godot structs
|
||||
[Export] private Vector2 property_Vector2 { get; set; } = new(10f, 10f);
|
||||
[Export] private Vector2i property_Vector2i { get; set; } = Vector2i.Up;
|
||||
[Export] private Vector2I property_Vector2I { get; set; } = Vector2I.Up;
|
||||
[Export] private Rect2 property_Rect2 { get; set; } = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
|
||||
[Export] private Rect2i property_Rect2i { get; set; } = new(new Vector2i(10, 10), new Vector2i(10, 10));
|
||||
[Export] private Rect2I property_Rect2I { get; set; } = new(new Vector2I(10, 10), new Vector2I(10, 10));
|
||||
[Export] private Transform2D property_Transform2D { get; set; } = Transform2D.Identity;
|
||||
[Export] private Vector3 property_Vector3 { get; set; } = new(10f, 10f, 10f);
|
||||
[Export] private Vector3i property_Vector3i { get; set; } = Vector3i.Back;
|
||||
[Export] private Vector3I property_Vector3I { get; set; } = Vector3I.Back;
|
||||
[Export] private Basis property_Basis { get; set; } = new Basis(Quaternion.Identity);
|
||||
[Export] private Quaternion property_Quaternion { get; set; } = new Quaternion(Basis.Identity);
|
||||
[Export] private Transform3D property_Transform3D { get; set; } = Transform3D.Identity;
|
||||
[Export] private Vector4 property_Vector4 { get; set; } = new(10f, 10f, 10f, 10f);
|
||||
[Export] private Vector4i property_Vector4i { get; set; } = Vector4i.One;
|
||||
[Export] private Vector4I property_Vector4I { get; set; } = Vector4I.One;
|
||||
[Export] private Projection property_Projection { get; set; } = Projection.Identity;
|
||||
[Export] private AABB property_AABB { get; set; } = new AABB(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
|
||||
[Export] private Aabb property_Aabb { get; set; } = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
|
||||
[Export] private Color property_Color { get; set; } = Colors.Aquamarine;
|
||||
[Export] private Plane property_Plane { get; set; } = Plane.PlaneXZ;
|
||||
[Export] private Callable property_Callable { get; set; } = new Callable(Engine.GetMainLoop(), "_process");
|
||||
@@ -171,7 +171,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[Export] private Godot.Object[] 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 };
|
||||
[Export] private Rid[] field_RidArray { get; set; } = { default, default, default };
|
||||
|
||||
// Variant
|
||||
[Export] private Variant property_Variant { get; set; } = "foo";
|
||||
@@ -181,7 +181,7 @@ namespace Godot.SourceGenerators.Sample
|
||||
[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");
|
||||
[Export] private RID property_RID { get; set; }
|
||||
[Export] private Rid property_Rid { get; set; }
|
||||
|
||||
[Export]
|
||||
private Godot.Collections.Dictionary property_GodotDictionary { get; set; } =
|
||||
|
||||
Reference in New Issue
Block a user