engage/generated/root_motion/demos/
navigator.rs1#[cfg(feature = "root_motion-demos-navigator-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 r#enum::{Enum, IEnum},
11 valuetype::{IValueType, ValueType},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/demos/navigator/Navigator_State.md"))]
15 #[repr(C)]
16 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17 pub struct Navigator_State {
18 pub value: i32,
19 }
20 impl ::unity::ClassIdentity for Navigator_State {
21 const NAME: &'static str = "Navigator.State";
22 const NAMESPACE: &'static str = "RootMotion.Demos";
23
24 fn class() -> ::unity::Class {
25 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27 }
28 }
29 impl ::unity::IlType for Navigator_State {
30 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32 }
33 }
34 impl Navigator_State {
35 pub fn idle() -> Self {
36 Self { value: 0 }
37 }
38
39 pub fn seeking() -> Self {
40 Self { value: 1 }
41 }
42
43 pub fn on_path() -> Self {
44 Self { value: 2 }
45 }
46 }
47
48 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/demos/navigator/Navigator.md"))]
49 #[::unity::class(namespace = "RootMotion.Demos", name = "Navigator")]
50 #[parent(crate::system::object::Object)]
51 pub struct Navigator {
52 #[offset(16)]
53 #[rename(name = "activeTargetSeeking")]
54 pub active_target_seeking: bool,
55 #[offset(20)]
56 #[rename(name = "cornerRadius")]
57 pub corner_radius: f32,
58 #[offset(24)]
59 #[rename(name = "recalculateOnPathDistance")]
60 pub recalculate_on_path_distance: f32,
61 #[offset(28)]
62 #[rename(name = "maxSampleDistance")]
63 pub max_sample_distance: f32,
64 #[offset(32)]
65 #[rename(name = "nextPathInterval")]
66 pub next_path_interval: f32,
67 #[offset(56)]
68 #[rename(name = "transform")]
69 pub transform: crate::unity_engine::transform::Transform,
70 #[offset(64)]
71 #[rename(name = "cornerIndex")]
72 pub corner_index: i32,
73 #[offset(72)]
74 #[rename(name = "corners")]
75 pub corners: ::unity::Array<crate::unity_engine::vector3::Vector3>,
76 #[offset(80)]
77 #[rename(name = "path")]
78 pub path: crate::unity_engine::ai::navmeshpath::NavMeshPath,
79 #[offset(88)]
80 #[rename(name = "lastTargetPosition")]
81 pub last_target_position: crate::unity_engine::vector3::Vector3,
82 #[offset(100)]
83 #[rename(name = "initiated")]
84 pub initiated: bool,
85 #[offset(104)]
86 #[rename(name = "nextPathTime")]
87 pub next_path_time: f32,
88 }
89}
90
91#[cfg(feature = "root_motion-demos-navigator-types")]
92pub use __types::*;
93
94#[cfg(feature = "root_motion-demos-navigator")]
95pub trait INavigatorMethods: INavigator {
96 #[doc = "`get_normalizedDeltaPosition()` overload"]
97 fn get_normalized_delta_position(self) -> crate::unity_engine::vector3::Vector3 {
98 unsafe {
99 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100 ::unity::il2cpp_call!((::unity::module_base()+0x1f108c0usize)as*mut u8,crate::unity_engine::vector3::Vector3;
101(Navigator)__receiver)
102 }
103 }
104 #[doc = "`set_normalizedDeltaPosition(crate::unity_engine::vector3::Vector3)` overload"]
105 fn set_normalized_delta_position(self, value: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
106 unsafe {
107 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108 ::unity::il2cpp_call!((::unity::module_base()+0x1f108d0usize)as*mut u8,();
109(Navigator)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(value))
110 }
111 }
112 #[doc = "`get_state()` overload"]
113 fn get_state(self) -> crate::root_motion::demos::navigator::Navigator_State {
114 unsafe {
115 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116 ::unity::il2cpp_call!((::unity::module_base()+0x1f108e0usize)as*mut u8,crate::root_motion::demos::navigator::Navigator_State;
117(Navigator)__receiver)
118 }
119 }
120 #[doc = "`set_state(crate::root_motion::demos::navigator::Navigator_State)` overload"]
121 fn set_state(self, value: impl ::core::convert::Into<crate::root_motion::demos::navigator::Navigator_State>) -> () {
122 unsafe {
123 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124 ::unity::il2cpp_call!((::unity::module_base()+0x1f108f0usize)as*mut u8,();
125(Navigator)__receiver,(crate::root_motion::demos::navigator::Navigator_State)::core::convert::Into::into(value))
126 }
127 }
128 #[doc = "`Initiate(crate::unity_engine::transform::Transform)` overload"]
129 fn initiate(self, transform: impl ::core::convert::Into<crate::unity_engine::transform::Transform>) -> () {
130 unsafe {
131 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132 ::unity::il2cpp_call!((::unity::module_base()+0x1f10900usize)as*mut u8,();
133(Navigator)__receiver,(crate::unity_engine::transform::Transform)::core::convert::Into::into(transform))
134 }
135 }
136 #[doc = "`Update(crate::unity_engine::vector3::Vector3)` overload"]
137 fn update(self, target_position: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
138 unsafe {
139 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 ::unity::il2cpp_call!((::unity::module_base()+0x1f109e0usize)as*mut u8,();
141(Navigator)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(target_position))
142 }
143 }
144 #[doc = "`CalculatePath(crate::unity_engine::vector3::Vector3)` overload"]
145 fn calculate_path(self, target_position: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
146 unsafe {
147 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148 ::unity::il2cpp_call!((::unity::module_base()+0x1f10cd0usize)as*mut u8,();
149(Navigator)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(target_position))
150 }
151 }
152 #[doc = "`Find(crate::unity_engine::vector3::Vector3)` overload"]
153 fn find(self, target_position: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> bool {
154 unsafe {
155 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
156 ::unity::il2cpp_call!((::unity::module_base()+0x1f10d60usize)as*mut u8,bool;
157(Navigator)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(target_position))
158 }
159 }
160 #[doc = "`Stop()` overload"]
161 fn stop(self) -> () {
162 unsafe {
163 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
164 ::unity::il2cpp_call!((::unity::module_base()+0x1f10c70usize)as*mut u8,();
165(Navigator)__receiver)
166 }
167 }
168 #[doc = "`HorDistance(crate::unity_engine::vector3::Vector3, crate::unity_engine::vector3::Vector3)` overload"]
169 fn hor_distance(
170 self,
171 p1: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
172 p2: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
173 ) -> f32 {
174 unsafe {
175 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
176 ::unity::il2cpp_call!((::unity::module_base()+0x1f10cb0usize)as*mut u8,f32;
177(Navigator)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(p1),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(p2))
178 }
179 }
180 #[doc = "`Visualize()` overload"]
181 fn visualize(self) -> () {
182 unsafe {
183 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
184 ::unity::il2cpp_call!((::unity::module_base()+0x1f10ea0usize)as*mut u8,();
185(Navigator)__receiver)
186 }
187 }
188 #[doc = "`.ctor()` overload"]
189 fn ctor(self) -> () {
190 unsafe {
191 let __receiver = <Navigator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
192 ::unity::il2cpp_call!((::unity::module_base()+0x1f11060usize)as*mut u8,();
193(Navigator)__receiver)
194 }
195 }
196}
197
198#[cfg(feature = "root_motion-demos-navigator")]
199impl<__T: INavigator> INavigatorMethods for __T {}
200
201#[cfg(feature = "root_motion-demos-navigator")]
202impl Navigator {
203 pub fn get_normalized_delta_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
205 }
206
207 pub fn set_normalized_delta_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
208 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
209 }
210
211 pub fn get_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
213 }
214
215 pub fn set_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
217 }
218
219 pub fn initiate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
221 }
222
223 pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
225 }
226
227 pub fn calculate_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
228 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
229 }
230
231 pub fn find_method_info() -> &'static ::unity::il2cpp::MethodInfo {
232 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
233 }
234
235 pub fn stop_method_info() -> &'static ::unity::il2cpp::MethodInfo {
236 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
237 }
238
239 pub fn hor_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
240 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
241 }
242
243 pub fn visualize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
244 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
245 }
246
247 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
248 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
249 }
250}
251
252#[cfg(feature = "root_motion-demos-navigator")]
253impl Navigator {
254 #[doc = "`.ctor()` — no args"]
255 pub fn new() -> Self {
256 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
257 panic!(
258 "{}
259::{}
260 failed to instantiate",
261 ::core::stringify!(Navigator),
262 ::core::stringify!(new),
263 )
264 });
265 <Self as INavigatorMethods>::ctor(this);
266 this
267 }
268}
269
270#[cfg(feature = "root_motion-demos-navigator")]
271#[doc(hidden)]
272pub mod prelude {
273 pub use super::{INavigator, INavigatorMethods, Navigator, Navigator_State};
274 #[cfg(feature = "system-object")]
275 pub use crate::system::object::IObjectMethods;
276 #[cfg(feature = "system-enum")]
277 pub use crate::system::r#enum::IEnumMethods;
278 #[cfg(feature = "system-valuetype")]
279 pub use crate::system::valuetype::IValueTypeMethods;
280 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
281}