Fix source generation of statically imported members
This commit is contained in:
+4
@@ -1,6 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using static Godot.Mathf;
|
||||
|
||||
public partial class ExportedFields : GodotObject
|
||||
{
|
||||
@@ -18,6 +19,9 @@ public partial class ExportedFields : GodotObject
|
||||
[Export] private Double _fieldDouble = 10;
|
||||
[Export] private String _fieldString = "foo";
|
||||
|
||||
// Static import
|
||||
[Export] private Single _fieldStaticImport = RadToDeg(2 * Pi);
|
||||
|
||||
// Godot structs
|
||||
[Export] private Vector2 _fieldVector2 = new(10f, 10f);
|
||||
[Export] private Vector2I _fieldVector2I = Vector2I.Up;
|
||||
|
||||
+27
@@ -1,5 +1,6 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using static Godot.Mathf;
|
||||
|
||||
public partial class ExportedProperties(string primaryCtorParameter) : GodotObject
|
||||
{
|
||||
@@ -82,6 +83,20 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
|
||||
}
|
||||
}
|
||||
|
||||
private Single _fullPropertyStaticImport = Pi;
|
||||
[Export]
|
||||
public Single FullPropertyStaticImport
|
||||
{
|
||||
get
|
||||
{
|
||||
return _fullPropertyStaticImport;
|
||||
}
|
||||
set
|
||||
{
|
||||
_fullPropertyStaticImport = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Lambda Property
|
||||
private String _lamdaPropertyString = "LamdaPropertyString";
|
||||
[Export]
|
||||
@@ -91,6 +106,14 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
|
||||
set => _lamdaPropertyString = value;
|
||||
}
|
||||
|
||||
private Single _lambdaPropertyStaticImport = Tau;
|
||||
[Export]
|
||||
public Single LambdaPropertyStaticImport
|
||||
{
|
||||
get => _lambdaPropertyStaticImport;
|
||||
set => _lambdaPropertyStaticImport = value;
|
||||
}
|
||||
|
||||
// Primary Constructor Parameter
|
||||
[Export]
|
||||
public String PrimaryCtorParameter { get; set; } = primaryCtorParameter;
|
||||
@@ -99,6 +122,10 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
|
||||
[Export]
|
||||
public Single ConstantMath { get; set; } = 2 * Mathf.Pi;
|
||||
|
||||
//Constant Math Expression With Static Import
|
||||
[Export]
|
||||
public Single ConstantMathStaticImport { get; set; } = RadToDeg(2 * Pi);
|
||||
|
||||
// Static Strings Addition
|
||||
[Export]
|
||||
public string StaticStringAddition { get; set; } = string.Empty + string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user