| 1 |
using Godot; |
| 2 |
using Godot.NativeInterop; |
| 3 |
|
| 4 |
partial class AbstractGenericNode<T> |
| 5 |
{ |
| 6 |
#pragma warning disable CS0109 |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
public new class PropertyName : global::Godot.Node.PropertyName { |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
public new static readonly global::Godot.StringName @MyArray = "MyArray"; |
| 15 |
} |
| 16 |
|
| 17 |
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] |
| 18 |
protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value) |
| 19 |
{ |
| 20 |
if (name == PropertyName.@MyArray) { |
| 21 |
this.@MyArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<T>(value); |
| 22 |
return true; |
| 23 |
} |
| 24 |
return base.SetGodotClassPropertyValue(name, value); |
| 25 |
} |
| 26 |
|
| 27 |
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] |
| 28 |
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value) |
| 29 |
{ |
| 30 |
if (name == PropertyName.@MyArray) { |
| 31 |
value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this.@MyArray); |
| 32 |
return true; |
| 33 |
} |
| 34 |
return base.GetGodotClassPropertyValue(name, out value); |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] |
| 42 |
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList() |
| 43 |
{ |
| 44 |
var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>(); |
| 45 |
properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.@MyArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true)); |
| 46 |
return properties; |
| 47 |
} |
| 48 |
#pragma warning restore CS0109 |
| 49 |
} |