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.scenetreetimer;
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.reference;
23 /**
24 
25 */
26 @GodotBaseClass struct SceneTreeTimer
27 {
28 	enum string _GODOT_internal_name = "SceneTreeTimer";
29 public:
30 @nogc nothrow:
31 	union { godot_object _godot_object; Reference _GODOT_base; }
32 	alias _GODOT_base this;
33 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
34 	package(godot) __gshared bool _classBindingInitialized = false;
35 	package(godot) static struct _classBinding
36 	{
37 		__gshared:
38 		@GodotName("set_time_left") GodotMethod!(void, double) setTimeLeft;
39 		@GodotName("get_time_left") GodotMethod!(double) getTimeLeft;
40 	}
41 	bool opEquals(in SceneTreeTimer other) const { return _godot_object.ptr is other._godot_object.ptr; }
42 	SceneTreeTimer opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
43 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
44 	mixin baseCasts;
45 	static SceneTreeTimer _new()
46 	{
47 		static godot_class_constructor constructor;
48 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("SceneTreeTimer");
49 		if(constructor is null) return typeof(this).init;
50 		return cast(SceneTreeTimer)(constructor());
51 	}
52 	@disable new(size_t s);
53 	/**
54 	
55 	*/
56 	void setTimeLeft(in double time)
57 	{
58 		checkClassBinding!(typeof(this))();
59 		ptrcall!(void)(_classBinding.setTimeLeft, _godot_object, time);
60 	}
61 	/**
62 	
63 	*/
64 	double getTimeLeft() const
65 	{
66 		checkClassBinding!(typeof(this))();
67 		return ptrcall!(double)(_classBinding.getTimeLeft, _godot_object);
68 	}
69 	/**
70 	
71 	*/
72 	@property double timeLeft()
73 	{
74 		return getTimeLeft();
75 	}
76 	/// ditto
77 	@property void timeLeft(double v)
78 	{
79 		setTimeLeft(v);
80 	}
81 }