1 /** 2 Executes a series of Sequence ports. 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.visualscriptsequence; 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.visualscriptnode; 25 import godot.resource; 26 import godot.reference; 27 /** 28 Executes a series of Sequence ports. 29 30 Steps through a series of one or more output Sequence ports. The `current` data port outputs the currently executing item. 31 $(B Input Ports:) 32 - Sequence: `in order` 33 $(B Output Ports:) 34 - Sequence: `1` 35 - Sequence: `2 - n` (optional) 36 - Data (int): `current` 37 */ 38 @GodotBaseClass struct VisualScriptSequence 39 { 40 package(godot) enum string _GODOT_internal_name = "VisualScriptSequence"; 41 public: 42 @nogc nothrow: 43 union { /** */ godot_object _godot_object; /** */ VisualScriptNode _GODOT_base; } 44 alias _GODOT_base this; 45 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 46 package(godot) __gshared bool _classBindingInitialized = false; 47 package(godot) static struct GDNativeClassBinding 48 { 49 __gshared: 50 @GodotName("get_steps") GodotMethod!(long) getSteps; 51 @GodotName("set_steps") GodotMethod!(void, long) setSteps; 52 } 53 /// 54 pragma(inline, true) bool opEquals(in VisualScriptSequence other) const 55 { return _godot_object.ptr is other._godot_object.ptr; } 56 /// 57 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 58 { _godot_object.ptr = n; return null; } 59 /// 60 pragma(inline, true) bool opEquals(typeof(null) n) const 61 { return _godot_object.ptr is n; } 62 /// 63 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 64 mixin baseCasts; 65 /// Construct a new instance of VisualScriptSequence. 66 /// Note: use `memnew!VisualScriptSequence` instead. 67 static VisualScriptSequence _new() 68 { 69 static godot_class_constructor constructor; 70 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptSequence"); 71 if(constructor is null) return typeof(this).init; 72 return cast(VisualScriptSequence)(constructor()); 73 } 74 @disable new(size_t s); 75 /** 76 77 */ 78 long getSteps() const 79 { 80 checkClassBinding!(typeof(this))(); 81 return ptrcall!(long)(GDNativeClassBinding.getSteps, _godot_object); 82 } 83 /** 84 85 */ 86 void setSteps(in long steps) 87 { 88 checkClassBinding!(typeof(this))(); 89 ptrcall!(void)(GDNativeClassBinding.setSteps, _godot_object, steps); 90 } 91 /** 92 The number of steps in the sequence. 93 */ 94 @property long steps() 95 { 96 return getSteps(); 97 } 98 /// ditto 99 @property void steps(long v) 100 { 101 setSteps(v); 102 } 103 }