1 /**
2 A time-seeking animation node to be used with $(D AnimationTree).
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.animationnodetimeseek;
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.animationnode;
25 import godot.resource;
26 /**
27 A time-seeking animation node to be used with $(D AnimationTree).
28 
29 This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an $(D Animation) from the start or a certain playback position inside the $(D AnimationNodeBlendTree). After setting the time and changing the animation playback, the seek node automatically goes into sleep mode on the next process frame by setting its `seek_position` value to `-1.0`.
30 
31 
32 # Play child animation from the start.
33 animation_tree.set("parameters/Seek/seek_position", 0.0)
34 # Alternative syntax (same result as above).
35 animation_tree$(D "parameters/Seek/seek_position") = 0.0
36 
37 # Play child animation from 12 second timestamp.
38 animation_tree.set("parameters/Seek/seek_position", 12.0)
39 # Alternative syntax (same result as above).
40 animation_tree$(D "parameters/Seek/seek_position") = 12.0
41 
42 
43 */
44 @GodotBaseClass struct AnimationNodeTimeSeek
45 {
46 	package(godot) enum string _GODOT_internal_name = "AnimationNodeTimeSeek";
47 public:
48 @nogc nothrow:
49 	union { /** */ godot_object _godot_object; /** */ AnimationNode _GODOT_base; }
50 	alias _GODOT_base this;
51 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
52 	package(godot) __gshared bool _classBindingInitialized = false;
53 	package(godot) static struct GDNativeClassBinding
54 	{
55 		__gshared:
56 	}
57 	/// 
58 	pragma(inline, true) bool opEquals(in AnimationNodeTimeSeek other) const
59 	{ return _godot_object.ptr is other._godot_object.ptr; }
60 	/// 
61 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
62 	{ _godot_object.ptr = n; return null; }
63 	/// 
64 	pragma(inline, true) bool opEquals(typeof(null) n) const
65 	{ return _godot_object.ptr is n; }
66 	/// 
67 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
68 	mixin baseCasts;
69 	/// Construct a new instance of AnimationNodeTimeSeek.
70 	/// Note: use `memnew!AnimationNodeTimeSeek` instead.
71 	static AnimationNodeTimeSeek _new()
72 	{
73 		static godot_class_constructor constructor;
74 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AnimationNodeTimeSeek");
75 		if(constructor is null) return typeof(this).init;
76 		return cast(AnimationNodeTimeSeek)(constructor());
77 	}
78 	@disable new(size_t s);
79 }