| 1 |
using Godot; |
| 2 |
using Godot.NativeInterop; |
| 3 |
|
| 4 |
partial class Methods |
| 5 |
{ |
| 6 |
#pragma warning disable CS0109 |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
public new class MethodName : global::Godot.GodotObject.MethodName { |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
public new static readonly global::Godot.StringName @MethodWithOverload = "MethodWithOverload"; |
| 15 |
} |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] |
| 22 |
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo> GetGodotMethodList() |
| 23 |
{ |
| 24 |
var methods = new global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo>(3); |
| 25 |
methods.Add(new(name: MethodName.@MethodWithOverload, returnVal: new(type: (global::Godot.Variant.Type)0, name: "", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), flags: (global::Godot.MethodFlags)1, arguments: null, defaultArguments: null)); |
| 26 |
methods.Add(new(name: MethodName.@MethodWithOverload, returnVal: new(type: (global::Godot.Variant.Type)0, name: "", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), flags: (global::Godot.MethodFlags)1, arguments: new() { new(type: (global::Godot.Variant.Type)2, name: "a", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), }, defaultArguments: null)); |
| 27 |
methods.Add(new(name: MethodName.@MethodWithOverload, returnVal: new(type: (global::Godot.Variant.Type)0, name: "", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), flags: (global::Godot.MethodFlags)1, arguments: new() { new(type: (global::Godot.Variant.Type)2, name: "a", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), new(type: (global::Godot.Variant.Type)2, name: "b", hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)6, exported: false), }, defaultArguments: null)); |
| 28 |
return methods; |
| 29 |
} |
| 30 |
#pragma warning restore CS0109 |
| 31 |
|
| 32 |
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] |
| 33 |
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret) |
| 34 |
{ |
| 35 |
if (method == MethodName.@MethodWithOverload && args.Count == 0) { |
| 36 |
@MethodWithOverload(); |
| 37 |
ret = default; |
| 38 |
return true; |
| 39 |
} |
| 40 |
if (method == MethodName.@MethodWithOverload && args.Count == 1) { |
| 41 |
@MethodWithOverload(global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(args[0])); |
| 42 |
ret = default; |
| 43 |
return true; |
| 44 |
} |
| 45 |
if (method == MethodName.@MethodWithOverload && args.Count == 2) { |
| 46 |
@MethodWithOverload(global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(args[0]), global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(args[1])); |
| 47 |
ret = default; |
| 48 |
return true; |
| 49 |
} |
| 50 |
return base.InvokeGodotClassMethod(method, args, out ret); |
| 51 |
} |
| 52 |
|
| 53 |
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] |
| 54 |
protected override bool HasGodotClassMethod(in godot_string_name method) |
| 55 |
{ |
| 56 |
if (method == MethodName.@MethodWithOverload) { |
| 57 |
return true; |
| 58 |
} |
| 59 |
return base.HasGodotClassMethod(method); |
| 60 |
} |
| 61 |
} |