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.visualscriptyield;
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 
28 */
29 @GodotBaseClass struct VisualScriptYield
30 {
31 	enum string _GODOT_internal_name = "VisualScriptYield";
32 public:
33 @nogc nothrow:
34 	union { godot_object _godot_object; VisualScriptNode _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_yield_mode") GodotMethod!(void, long) setYieldMode;
42 		@GodotName("get_yield_mode") GodotMethod!(VisualScriptYield.YieldMode) getYieldMode;
43 		@GodotName("set_wait_time") GodotMethod!(void, double) setWaitTime;
44 		@GodotName("get_wait_time") GodotMethod!(double) getWaitTime;
45 	}
46 	bool opEquals(in VisualScriptYield other) const { return _godot_object.ptr is other._godot_object.ptr; }
47 	VisualScriptYield opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
48 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
49 	mixin baseCasts;
50 	static VisualScriptYield _new()
51 	{
52 		static godot_class_constructor constructor;
53 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualScriptYield");
54 		if(constructor is null) return typeof(this).init;
55 		return cast(VisualScriptYield)(constructor());
56 	}
57 	@disable new(size_t s);
58 	/// 
59 	enum YieldMode : int
60 	{
61 		/**
62 		
63 		*/
64 		yieldFrame = 1,
65 		/**
66 		
67 		*/
68 		yieldPhysicsFrame = 2,
69 		/**
70 		
71 		*/
72 		yieldWait = 3,
73 	}
74 	/// 
75 	enum Constants : int
76 	{
77 		yieldFrame = 1,
78 		yieldPhysicsFrame = 2,
79 		yieldWait = 3,
80 	}
81 	/**
82 	
83 	*/
84 	void setYieldMode(in long mode)
85 	{
86 		checkClassBinding!(typeof(this))();
87 		ptrcall!(void)(_classBinding.setYieldMode, _godot_object, mode);
88 	}
89 	/**
90 	
91 	*/
92 	VisualScriptYield.YieldMode getYieldMode()
93 	{
94 		checkClassBinding!(typeof(this))();
95 		return ptrcall!(VisualScriptYield.YieldMode)(_classBinding.getYieldMode, _godot_object);
96 	}
97 	/**
98 	
99 	*/
100 	void setWaitTime(in double sec)
101 	{
102 		checkClassBinding!(typeof(this))();
103 		ptrcall!(void)(_classBinding.setWaitTime, _godot_object, sec);
104 	}
105 	/**
106 	
107 	*/
108 	double getWaitTime()
109 	{
110 		checkClassBinding!(typeof(this))();
111 		return ptrcall!(double)(_classBinding.getWaitTime, _godot_object);
112 	}
113 	/**
114 	
115 	*/
116 	@property VisualScriptYield.YieldMode mode()
117 	{
118 		return getYieldMode();
119 	}
120 	/// ditto
121 	@property void mode(long v)
122 	{
123 		setYieldMode(v);
124 	}
125 	/**
126 	
127 	*/
128 	@property double waitTime()
129 	{
130 		return getWaitTime();
131 	}
132 	/// ditto
133 	@property void waitTime(double v)
134 	{
135 		setWaitTime(v);
136 	}
137 }