1 /** 2 Node reference. 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.visualscriptscenenode; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.meta; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.object; 22 import godot.classdb; 23 import godot.visualscriptnode; 24 import godot.resource; 25 import godot.reference; 26 /** 27 Node reference. 28 29 A direct reference to a node. 30 $(B Input Ports:) 31 none 32 $(B Output Ports:) 33 - Data: `node` (obj) 34 */ 35 @GodotBaseClass struct VisualScriptSceneNode 36 { 37 enum string _GODOT_internal_name = "VisualScriptSceneNode"; 38 public: 39 @nogc nothrow: 40 union { godot_object _godot_object; VisualScriptNode _GODOT_base; } 41 alias _GODOT_base this; 42 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 43 package(godot) __gshared bool _classBindingInitialized = false; 44 package(godot) static struct _classBinding 45 { 46 __gshared: 47 @GodotName("set_node_path") GodotMethod!(void, NodePath) setNodePath; 48 @GodotName("get_node_path") GodotMethod!(NodePath) getNodePath; 49 } 50 bool opEquals(in VisualScriptSceneNode other) const { return _godot_object.ptr is other._godot_object.ptr; } 51 VisualScriptSceneNode opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 52 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 53 mixin baseCasts; 54 static VisualScriptSceneNode _new() 55 { 56 static godot_class_constructor constructor; 57 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptSceneNode"); 58 if(constructor is null) return typeof(this).init; 59 return cast(VisualScriptSceneNode)(constructor()); 60 } 61 @disable new(size_t s); 62 /** 63 64 */ 65 void setNodePath(NodePathArg0)(in NodePathArg0 path) 66 { 67 checkClassBinding!(typeof(this))(); 68 ptrcall!(void)(_classBinding.setNodePath, _godot_object, path); 69 } 70 /** 71 72 */ 73 NodePath getNodePath() 74 { 75 checkClassBinding!(typeof(this))(); 76 return ptrcall!(NodePath)(_classBinding.getNodePath, _godot_object); 77 } 78 /** 79 The node's path in the scene tree. 80 */ 81 @property NodePath nodePath() 82 { 83 return getNodePath(); 84 } 85 /// ditto 86 @property void nodePath(NodePath v) 87 { 88 setNodePath(v); 89 } 90 }