Debian Codegraph @

modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptProperties.generated.cs

raw symbols SCIP
1 using Godot;
2 using Godot.NativeInterop;
3
4 partial class ScriptBoilerplate
5 {
6 #pragma warning disable CS0109 // Disable warning about redundant 'new' keyword
7 /// <summary>
8 /// Cached StringNames for the properties and fields contained in this class, for fast lookup.
9 /// </summary>
10 public new class PropertyName : global::Godot.Node.PropertyName {
11 /// <summary>
12 /// Cached name for the '_nodePath' field.
13 /// </summary>
14 public new static readonly global::Godot.StringName @_nodePath = "_nodePath";
15 /// <summary>
16 /// Cached name for the '_velocity' field.
17 /// </summary>
18 public new static readonly global::Godot.StringName @_velocity = "_velocity";
19 }
20 /// <inheritdoc/>
21 [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
22 protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value)
23 {
24 if (name == PropertyName.@_nodePath) {
25 this.@_nodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
26 return true;
27 }
28 if (name == PropertyName.@_velocity) {
29 this.@_velocity = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
30 return true;
31 }
32 return base.SetGodotClassPropertyValue(name, value);
33 }
34 /// <inheritdoc/>
35 [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
36 protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
37 {
38 if (name == PropertyName.@_nodePath) {
39 value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this.@_nodePath);
40 return true;
41 }
42 if (name == PropertyName.@_velocity) {
43 value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this.@_velocity);
44 return true;
45 }
46 return base.GetGodotClassPropertyValue(name, out value);
47 }
48 /// <summary>
49 /// Get the property information for all the properties declared in this class.
50 /// This method is used by Godot to register the available properties in the editor.
51 /// Do not call this method.
52 /// </summary>
53 [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
54 internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList()
55 {
56 var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>();
57 properties.Add(new(type: (global::Godot.Variant.Type)22, name: PropertyName.@_nodePath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
58 properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.@_velocity, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
59 return properties;
60 }
61 #pragma warning restore CS0109
62 }