1 /** 2 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.animationnodeoneshot; 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.animationnode; 24 import godot.resource; 25 import godot.reference; 26 /** 27 28 */ 29 @GodotBaseClass struct AnimationNodeOneShot 30 { 31 enum string _GODOT_internal_name = "AnimationNodeOneShot"; 32 public: 33 @nogc nothrow: 34 union { godot_object _godot_object; AnimationNode _GODOT_base; } 35 alias _GODOT_base this; 36 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 37 package(godot) __gshared bool _classBindingInitialized = false; 38 package(godot) static struct _classBinding 39 { 40 __gshared: 41 @GodotName("set_fadein_time") GodotMethod!(void, double) setFadeinTime; 42 @GodotName("get_fadein_time") GodotMethod!(double) getFadeinTime; 43 @GodotName("set_fadeout_time") GodotMethod!(void, double) setFadeoutTime; 44 @GodotName("get_fadeout_time") GodotMethod!(double) getFadeoutTime; 45 @GodotName("set_autorestart") GodotMethod!(void, bool) setAutorestart; 46 @GodotName("has_autorestart") GodotMethod!(bool) hasAutorestart; 47 @GodotName("set_autorestart_delay") GodotMethod!(void, double) setAutorestartDelay; 48 @GodotName("get_autorestart_delay") GodotMethod!(double) getAutorestartDelay; 49 @GodotName("set_autorestart_random_delay") GodotMethod!(void, double) setAutorestartRandomDelay; 50 @GodotName("get_autorestart_random_delay") GodotMethod!(double) getAutorestartRandomDelay; 51 @GodotName("set_mix_mode") GodotMethod!(void, long) setMixMode; 52 @GodotName("get_mix_mode") GodotMethod!(AnimationNodeOneShot.MixMode) getMixMode; 53 @GodotName("set_use_sync") GodotMethod!(void, bool) setUseSync; 54 @GodotName("is_using_sync") GodotMethod!(bool) isUsingSync; 55 } 56 bool opEquals(in AnimationNodeOneShot other) const { return _godot_object.ptr is other._godot_object.ptr; } 57 AnimationNodeOneShot opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 58 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 59 mixin baseCasts; 60 static AnimationNodeOneShot _new() 61 { 62 static godot_class_constructor constructor; 63 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AnimationNodeOneShot"); 64 if(constructor is null) return typeof(this).init; 65 return cast(AnimationNodeOneShot)(constructor()); 66 } 67 @disable new(size_t s); 68 /// 69 enum MixMode : int 70 { 71 /** 72 73 */ 74 mixModeBlend = 0, 75 /** 76 77 */ 78 mixModeAdd = 1, 79 } 80 /// 81 enum Constants : int 82 { 83 mixModeBlend = 0, 84 mixModeAdd = 1, 85 } 86 /** 87 88 */ 89 void setFadeinTime(in double time) 90 { 91 checkClassBinding!(typeof(this))(); 92 ptrcall!(void)(_classBinding.setFadeinTime, _godot_object, time); 93 } 94 /** 95 96 */ 97 double getFadeinTime() const 98 { 99 checkClassBinding!(typeof(this))(); 100 return ptrcall!(double)(_classBinding.getFadeinTime, _godot_object); 101 } 102 /** 103 104 */ 105 void setFadeoutTime(in double time) 106 { 107 checkClassBinding!(typeof(this))(); 108 ptrcall!(void)(_classBinding.setFadeoutTime, _godot_object, time); 109 } 110 /** 111 112 */ 113 double getFadeoutTime() const 114 { 115 checkClassBinding!(typeof(this))(); 116 return ptrcall!(double)(_classBinding.getFadeoutTime, _godot_object); 117 } 118 /** 119 120 */ 121 void setAutorestart(in bool enable) 122 { 123 checkClassBinding!(typeof(this))(); 124 ptrcall!(void)(_classBinding.setAutorestart, _godot_object, enable); 125 } 126 /** 127 128 */ 129 bool hasAutorestart() const 130 { 131 checkClassBinding!(typeof(this))(); 132 return ptrcall!(bool)(_classBinding.hasAutorestart, _godot_object); 133 } 134 /** 135 136 */ 137 void setAutorestartDelay(in double enable) 138 { 139 checkClassBinding!(typeof(this))(); 140 ptrcall!(void)(_classBinding.setAutorestartDelay, _godot_object, enable); 141 } 142 /** 143 144 */ 145 double getAutorestartDelay() const 146 { 147 checkClassBinding!(typeof(this))(); 148 return ptrcall!(double)(_classBinding.getAutorestartDelay, _godot_object); 149 } 150 /** 151 152 */ 153 void setAutorestartRandomDelay(in double enable) 154 { 155 checkClassBinding!(typeof(this))(); 156 ptrcall!(void)(_classBinding.setAutorestartRandomDelay, _godot_object, enable); 157 } 158 /** 159 160 */ 161 double getAutorestartRandomDelay() const 162 { 163 checkClassBinding!(typeof(this))(); 164 return ptrcall!(double)(_classBinding.getAutorestartRandomDelay, _godot_object); 165 } 166 /** 167 168 */ 169 void setMixMode(in long mode) 170 { 171 checkClassBinding!(typeof(this))(); 172 ptrcall!(void)(_classBinding.setMixMode, _godot_object, mode); 173 } 174 /** 175 176 */ 177 AnimationNodeOneShot.MixMode getMixMode() const 178 { 179 checkClassBinding!(typeof(this))(); 180 return ptrcall!(AnimationNodeOneShot.MixMode)(_classBinding.getMixMode, _godot_object); 181 } 182 /** 183 184 */ 185 void setUseSync(in bool enable) 186 { 187 checkClassBinding!(typeof(this))(); 188 ptrcall!(void)(_classBinding.setUseSync, _godot_object, enable); 189 } 190 /** 191 192 */ 193 bool isUsingSync() const 194 { 195 checkClassBinding!(typeof(this))(); 196 return ptrcall!(bool)(_classBinding.isUsingSync, _godot_object); 197 } 198 /** 199 200 */ 201 @property double fadeinTime() 202 { 203 return getFadeinTime(); 204 } 205 /// ditto 206 @property void fadeinTime(double v) 207 { 208 setFadeinTime(v); 209 } 210 /** 211 212 */ 213 @property double fadeoutTime() 214 { 215 return getFadeoutTime(); 216 } 217 /// ditto 218 @property void fadeoutTime(double v) 219 { 220 setFadeoutTime(v); 221 } 222 /** 223 224 */ 225 @property bool autorestart() 226 { 227 return hasAutorestart(); 228 } 229 /// ditto 230 @property void autorestart(bool v) 231 { 232 setAutorestart(v); 233 } 234 /** 235 236 */ 237 @property double autorestartDelay() 238 { 239 return getAutorestartDelay(); 240 } 241 /// ditto 242 @property void autorestartDelay(double v) 243 { 244 setAutorestartDelay(v); 245 } 246 /** 247 248 */ 249 @property double autorestartRandomDelay() 250 { 251 return getAutorestartRandomDelay(); 252 } 253 /// ditto 254 @property void autorestartRandomDelay(double v) 255 { 256 setAutorestartRandomDelay(v); 257 } 258 /** 259 260 */ 261 @property bool sync() 262 { 263 return isUsingSync(); 264 } 265 /// ditto 266 @property void sync(bool v) 267 { 268 setUseSync(v); 269 } 270 }