1 /** 2 General-purpose proximity detection node. 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.proximitygroup; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.traits; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.globalenums; 22 import godot.object; 23 import godot.classdb; 24 import godot.spatial; 25 /** 26 General-purpose proximity detection node. 27 28 29 */ 30 @GodotBaseClass struct ProximityGroup 31 { 32 package(godot) enum string _GODOT_internal_name = "ProximityGroup"; 33 public: 34 @nogc nothrow: 35 union { /** */ godot_object _godot_object; /** */ Spatial _GODOT_base; } 36 alias _GODOT_base this; 37 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 38 package(godot) __gshared bool _classBindingInitialized = false; 39 package(godot) static struct GDNativeClassBinding 40 { 41 __gshared: 42 @GodotName("_proximity_group_broadcast") GodotMethod!(void, String, Variant) _proximityGroupBroadcast; 43 @GodotName("broadcast") GodotMethod!(void, String, Variant) broadcast; 44 @GodotName("get_dispatch_mode") GodotMethod!(ProximityGroup.DispatchMode) getDispatchMode; 45 @GodotName("get_grid_radius") GodotMethod!(Vector3) getGridRadius; 46 @GodotName("get_group_name") GodotMethod!(String) getGroupName; 47 @GodotName("set_dispatch_mode") GodotMethod!(void, long) setDispatchMode; 48 @GodotName("set_grid_radius") GodotMethod!(void, Vector3) setGridRadius; 49 @GodotName("set_group_name") GodotMethod!(void, String) setGroupName; 50 } 51 /// 52 pragma(inline, true) bool opEquals(in ProximityGroup other) const 53 { return _godot_object.ptr is other._godot_object.ptr; } 54 /// 55 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 56 { _godot_object.ptr = n; return null; } 57 /// 58 pragma(inline, true) bool opEquals(typeof(null) n) const 59 { return _godot_object.ptr is n; } 60 /// 61 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 62 mixin baseCasts; 63 /// Construct a new instance of ProximityGroup. 64 /// Note: use `memnew!ProximityGroup` instead. 65 static ProximityGroup _new() 66 { 67 static godot_class_constructor constructor; 68 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("ProximityGroup"); 69 if(constructor is null) return typeof(this).init; 70 return cast(ProximityGroup)(constructor()); 71 } 72 @disable new(size_t s); 73 /// 74 enum DispatchMode : int 75 { 76 /** 77 78 */ 79 modeProxy = 0, 80 /** 81 82 */ 83 modeSignal = 1, 84 } 85 /// 86 enum Constants : int 87 { 88 modeProxy = 0, 89 modeSignal = 1, 90 } 91 /** 92 93 */ 94 void _proximityGroupBroadcast(VariantArg1)(in String method, in VariantArg1 parameters) 95 { 96 Array _GODOT_args = Array.make(); 97 _GODOT_args.append(method); 98 _GODOT_args.append(parameters); 99 String _GODOT_method_name = String("_proximity_group_broadcast"); 100 this.callv(_GODOT_method_name, _GODOT_args); 101 } 102 /** 103 104 */ 105 void broadcast(VariantArg1)(in String method, in VariantArg1 parameters) 106 { 107 checkClassBinding!(typeof(this))(); 108 ptrcall!(void)(GDNativeClassBinding.broadcast, _godot_object, method, parameters); 109 } 110 /** 111 112 */ 113 ProximityGroup.DispatchMode getDispatchMode() const 114 { 115 checkClassBinding!(typeof(this))(); 116 return ptrcall!(ProximityGroup.DispatchMode)(GDNativeClassBinding.getDispatchMode, _godot_object); 117 } 118 /** 119 120 */ 121 Vector3 getGridRadius() const 122 { 123 checkClassBinding!(typeof(this))(); 124 return ptrcall!(Vector3)(GDNativeClassBinding.getGridRadius, _godot_object); 125 } 126 /** 127 128 */ 129 String getGroupName() const 130 { 131 checkClassBinding!(typeof(this))(); 132 return ptrcall!(String)(GDNativeClassBinding.getGroupName, _godot_object); 133 } 134 /** 135 136 */ 137 void setDispatchMode(in long mode) 138 { 139 checkClassBinding!(typeof(this))(); 140 ptrcall!(void)(GDNativeClassBinding.setDispatchMode, _godot_object, mode); 141 } 142 /** 143 144 */ 145 void setGridRadius(in Vector3 radius) 146 { 147 checkClassBinding!(typeof(this))(); 148 ptrcall!(void)(GDNativeClassBinding.setGridRadius, _godot_object, radius); 149 } 150 /** 151 152 */ 153 void setGroupName(in String name) 154 { 155 checkClassBinding!(typeof(this))(); 156 ptrcall!(void)(GDNativeClassBinding.setGroupName, _godot_object, name); 157 } 158 /** 159 160 */ 161 @property ProximityGroup.DispatchMode dispatchMode() 162 { 163 return getDispatchMode(); 164 } 165 /// ditto 166 @property void dispatchMode(long v) 167 { 168 setDispatchMode(v); 169 } 170 /** 171 172 */ 173 @property Vector3 gridRadius() 174 { 175 return getGridRadius(); 176 } 177 /// ditto 178 @property void gridRadius(Vector3 v) 179 { 180 setGridRadius(v); 181 } 182 /** 183 184 */ 185 @property String groupName() 186 { 187 return getGroupName(); 188 } 189 /// ditto 190 @property void groupName(String v) 191 { 192 setGroupName(v); 193 } 194 }