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.navigationpolygoninstance; 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.navigationpolygon; 25 import godot.canvasitem; 26 import godot.node; 27 /** 28 29 */ 30 @GodotBaseClass struct NavigationPolygonInstance 31 { 32 enum string _GODOT_internal_name = "NavigationPolygonInstance"; 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("set_navigation_polygon") GodotMethod!(void, NavigationPolygon) setNavigationPolygon; 43 @GodotName("get_navigation_polygon") GodotMethod!(NavigationPolygon) getNavigationPolygon; 44 @GodotName("set_enabled") GodotMethod!(void, bool) setEnabled; 45 @GodotName("is_enabled") GodotMethod!(bool) isEnabled; 46 @GodotName("_navpoly_changed") GodotMethod!(void) _navpolyChanged; 47 } 48 bool opEquals(in NavigationPolygonInstance other) const { return _godot_object.ptr is other._godot_object.ptr; } 49 NavigationPolygonInstance 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 NavigationPolygonInstance _new() 53 { 54 static godot_class_constructor constructor; 55 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("NavigationPolygonInstance"); 56 if(constructor is null) return typeof(this).init; 57 return cast(NavigationPolygonInstance)(constructor()); 58 } 59 @disable new(size_t s); 60 /** 61 62 */ 63 void setNavigationPolygon(NavigationPolygon navpoly) 64 { 65 checkClassBinding!(typeof(this))(); 66 ptrcall!(void)(_classBinding.setNavigationPolygon, _godot_object, navpoly); 67 } 68 /** 69 70 */ 71 Ref!NavigationPolygon getNavigationPolygon() const 72 { 73 checkClassBinding!(typeof(this))(); 74 return ptrcall!(NavigationPolygon)(_classBinding.getNavigationPolygon, _godot_object); 75 } 76 /** 77 78 */ 79 void setEnabled(in bool enabled) 80 { 81 checkClassBinding!(typeof(this))(); 82 ptrcall!(void)(_classBinding.setEnabled, _godot_object, enabled); 83 } 84 /** 85 86 */ 87 bool isEnabled() const 88 { 89 checkClassBinding!(typeof(this))(); 90 return ptrcall!(bool)(_classBinding.isEnabled, _godot_object); 91 } 92 /** 93 94 */ 95 void _navpolyChanged() 96 { 97 Array _GODOT_args = Array.empty_array; 98 String _GODOT_method_name = String("_navpoly_changed"); 99 this.callv(_GODOT_method_name, _GODOT_args); 100 } 101 /** 102 103 */ 104 @property NavigationPolygon navpoly() 105 { 106 return getNavigationPolygon(); 107 } 108 /// ditto 109 @property void navpoly(NavigationPolygon v) 110 { 111 setNavigationPolygon(v); 112 } 113 /** 114 115 */ 116 @property bool enabled() 117 { 118 return isEnabled(); 119 } 120 /// ditto 121 @property void enabled(bool v) 122 { 123 setEnabled(v); 124 } 125 }