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.skeleton2d;
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.node2d;
24 import godot.bone2d;
25 import godot.canvasitem;
26 import godot.node;
27 /**
28 
29 */
30 @GodotBaseClass struct Skeleton2D
31 {
32 	enum string _GODOT_internal_name = "Skeleton2D";
33 public:
34 @nogc nothrow:
35 	union { godot_object _godot_object; Node2D _GODOT_base; }
36 	alias _GODOT_base this;
37 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
38 	package(godot) __gshared bool _classBindingInitialized = false;
39 	package(godot) static struct _classBinding
40 	{
41 		__gshared:
42 		@GodotName("_update_bone_setup") GodotMethod!(void) _updateBoneSetup;
43 		@GodotName("_update_transform") GodotMethod!(void) _updateTransform;
44 		@GodotName("get_bone_count") GodotMethod!(long) getBoneCount;
45 		@GodotName("get_bone") GodotMethod!(Bone2D, long) getBone;
46 		@GodotName("get_skeleton") GodotMethod!(RID) getSkeleton;
47 	}
48 	bool opEquals(in Skeleton2D other) const { return _godot_object.ptr is other._godot_object.ptr; }
49 	Skeleton2D opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
50 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
51 	mixin baseCasts;
52 	static Skeleton2D _new()
53 	{
54 		static godot_class_constructor constructor;
55 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Skeleton2D");
56 		if(constructor is null) return typeof(this).init;
57 		return cast(Skeleton2D)(constructor());
58 	}
59 	@disable new(size_t s);
60 	/**
61 	
62 	*/
63 	void _updateBoneSetup()
64 	{
65 		Array _GODOT_args = Array.empty_array;
66 		String _GODOT_method_name = String("_update_bone_setup");
67 		this.callv(_GODOT_method_name, _GODOT_args);
68 	}
69 	/**
70 	
71 	*/
72 	void _updateTransform()
73 	{
74 		Array _GODOT_args = Array.empty_array;
75 		String _GODOT_method_name = String("_update_transform");
76 		this.callv(_GODOT_method_name, _GODOT_args);
77 	}
78 	/**
79 	
80 	*/
81 	long getBoneCount() const
82 	{
83 		checkClassBinding!(typeof(this))();
84 		return ptrcall!(long)(_classBinding.getBoneCount, _godot_object);
85 	}
86 	/**
87 	
88 	*/
89 	Bone2D getBone(in long idx)
90 	{
91 		checkClassBinding!(typeof(this))();
92 		return ptrcall!(Bone2D)(_classBinding.getBone, _godot_object, idx);
93 	}
94 	/**
95 	
96 	*/
97 	RID getSkeleton() const
98 	{
99 		checkClassBinding!(typeof(this))();
100 		return ptrcall!(RID)(_classBinding.getSkeleton, _godot_object);
101 	}
102 }