1#[cfg(feature = "root-aktriggerhandler-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::object::{IObject, Object},
10 unity_engine::{
11 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 monobehaviour::{IMonoBehaviour, MonoBehaviour},
14 object_2::{IObject_2, Object_2},
15 },
16 };
17
18 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/aktriggerhandler/AkTriggerHandler.md"))]
19 #[::unity::class(namespace = "", name = "AkTriggerHandler")]
20 #[parent(crate::unity_engine::monobehaviour::MonoBehaviour)]
21 pub struct AkTriggerHandler {
22 #[static_field]
23 #[rename(name = "AWAKE_TRIGGER_ID")]
24 pub awake_trigger_id: i32,
25 #[static_field]
26 #[rename(name = "START_TRIGGER_ID")]
27 pub start_trigger_id: i32,
28 #[static_field]
29 #[rename(name = "DESTROY_TRIGGER_ID")]
30 pub destroy_trigger_id: i32,
31 #[static_field]
32 #[rename(name = "ON_ENABLE_TRIGGER_ID")]
33 pub on_enable_trigger_id: i32,
34 #[static_field]
35 #[rename(name = "MAX_NB_TRIGGERS")]
36 pub max_nb_triggers: i32,
37 #[static_field]
38 #[rename(name = "triggerTypes")]
39 pub trigger_types: crate::system::collections::generic::dictionary_2::Dictionary_2<u32, ::unity::Il2CppString>,
40 #[offset(24)]
41 #[rename(name = "didDestroy")]
42 pub did_destroy: bool,
43 #[offset(32)]
44 #[rename(name = "triggerList")]
45 pub trigger_list: crate::system::collections::generic::list_1::List_1<i32>,
46 #[offset(40)]
47 #[rename(name = "useOtherObject")]
48 pub use_other_object: bool,
49 }
50}
51
52#[cfg(feature = "root-aktriggerhandler-types")]
53pub use __types::*;
54
55#[cfg(feature = "root-aktriggerhandler")]
56impl AkTriggerHandler {
57 #[doc = "`.cctor()` overload"]
58 pub fn cctor() -> () {
59 unsafe {
60 ::unity::il2cpp_call!((::unity::module_base()+0x1d2bcf0usize)as*mut u8,();
61 )
62 }
63 }
64}
65
66#[cfg(feature = "root-aktriggerhandler")]
67pub trait IAkTriggerHandlerMethods: IAkTriggerHandler {
68 #[doc = "`HandleEvent(crate::unity_engine::gameobject::GameObject)` overload"]
69 fn handle_event(self, in_game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>) -> () {
70 unsafe {
71 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
72 {
73 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
74 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
75 panic!(
76 "unity: virtual slot {}
77 out of range (vtable len {}
78) on the runtime class behind {}
79 (method `{}
80`)",
81 4usize,
82 __vt.len(),
83 <AkTriggerHandler as ::unity::ClassIdentity>::NAME,
84 "HandleEvent",
85 )
86 });
87 let __inner: extern "C" fn(AkTriggerHandler, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> () =
88 ::core::mem::transmute(__vi.method_ptr);
89 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
90 __inner(__receiver, ::core::convert::Into::into(in_game_object), __mi)
91 }
92 }
93 }
94 #[doc = "`Awake()` overload"]
95 fn awake(self) -> () {
96 unsafe {
97 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98 {
99 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
100 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
101 panic!(
102 "unity: virtual slot {}
103 out of range (vtable len {}
104) on the runtime class behind {}
105 (method `{}
106`)",
107 5usize,
108 __vt.len(),
109 <AkTriggerHandler as ::unity::ClassIdentity>::NAME,
110 "Awake",
111 )
112 });
113 let __inner: extern "C" fn(AkTriggerHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
114 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
115 __inner(__receiver, __mi)
116 }
117 }
118 }
119 #[doc = "`Start()` overload"]
120 fn start(self) -> () {
121 unsafe {
122 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
123 {
124 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
125 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
126 panic!(
127 "unity: virtual slot {}
128 out of range (vtable len {}
129) on the runtime class behind {}
130 (method `{}
131`)",
132 6usize,
133 __vt.len(),
134 <AkTriggerHandler as ::unity::ClassIdentity>::NAME,
135 "Start",
136 )
137 });
138 let __inner: extern "C" fn(AkTriggerHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
139 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
140 __inner(__receiver, __mi)
141 }
142 }
143 }
144 #[doc = "`OnDestroy()` overload"]
145 fn on_destroy(self) -> () {
146 unsafe {
147 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148 {
149 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
150 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
151 panic!(
152 "unity: virtual slot {}
153 out of range (vtable len {}
154) on the runtime class behind {}
155 (method `{}
156`)",
157 7usize,
158 __vt.len(),
159 <AkTriggerHandler as ::unity::ClassIdentity>::NAME,
160 "OnDestroy",
161 )
162 });
163 let __inner: extern "C" fn(AkTriggerHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
164 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
165 __inner(__receiver, __mi)
166 }
167 }
168 }
169 #[doc = "`DoDestroy()` overload"]
170 fn do_destroy(self) -> () {
171 unsafe {
172 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
173 ::unity::il2cpp_call!((::unity::module_base()+0x1d2b6c0usize)as*mut u8,();
174(AkTriggerHandler)__receiver)
175 }
176 }
177 #[doc = "`OnEnable()` overload"]
178 fn on_enable(self) -> () {
179 unsafe {
180 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
181 {
182 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
183 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
184 panic!(
185 "unity: virtual slot {}
186 out of range (vtable len {}
187) on the runtime class behind {}
188 (method `{}
189`)",
190 8usize,
191 __vt.len(),
192 <AkTriggerHandler as ::unity::ClassIdentity>::NAME,
193 "OnEnable",
194 )
195 });
196 let __inner: extern "C" fn(AkTriggerHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
197 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
198 __inner(__receiver, __mi)
199 }
200 }
201 }
202 #[doc = "`RegisterTriggers(crate::system::collections::generic::list_1::List_1<i32>, crate::root::aktriggerbase::AkTriggerBase_Trigger)` overload"]
203 fn register_triggers(
204 self,
205 in_trigger_list: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<i32>>,
206 in_delegate: impl ::core::convert::Into<crate::root::aktriggerbase::AkTriggerBase_Trigger>,
207 ) -> () {
208 unsafe {
209 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
210 ::unity::il2cpp_call!((::unity::module_base()+0x1d2b100usize)as*mut u8,();
211(AkTriggerHandler)__receiver,(crate::system::collections::generic::list_1::List_1<i32>)::core::convert::Into::into(in_trigger_list),(crate::root::aktriggerbase::AkTriggerBase_Trigger)::core::convert::Into::into(in_delegate))
212 }
213 }
214 #[doc = "`UnregisterTriggers(crate::system::collections::generic::list_1::List_1<i32>, crate::root::aktriggerbase::AkTriggerBase_Trigger)` overload"]
215 fn unregister_triggers(
216 self,
217 in_trigger_list: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<i32>>,
218 in_delegate: impl ::core::convert::Into<crate::root::aktriggerbase::AkTriggerBase_Trigger>,
219 ) -> () {
220 unsafe {
221 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
222 ::unity::il2cpp_call!((::unity::module_base()+0x1d2b750usize)as*mut u8,();
223(AkTriggerHandler)__receiver,(crate::system::collections::generic::list_1::List_1<i32>)::core::convert::Into::into(in_trigger_list),(crate::root::aktriggerbase::AkTriggerBase_Trigger)::core::convert::Into::into(in_delegate))
224 }
225 }
226 #[doc = "`.ctor()` overload"]
227 fn ctor(self) -> () {
228 unsafe {
229 let __receiver = <AkTriggerHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
230 ::unity::il2cpp_call!((::unity::module_base()+0x1d2bc30usize)as*mut u8,();
231(AkTriggerHandler)__receiver)
232 }
233 }
234}
235
236#[cfg(feature = "root-aktriggerhandler")]
237impl<__T: IAkTriggerHandler> IAkTriggerHandlerMethods for __T {}
238
239#[cfg(feature = "root-aktriggerhandler")]
240impl AkTriggerHandler {
241 pub fn handle_event_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
243 }
244
245 pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
247 }
248
249 pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
251 }
252
253 pub fn on_destroy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
255 }
256
257 pub fn do_destroy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
259 }
260
261 pub fn on_enable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
263 }
264
265 pub fn register_triggers_method_info() -> &'static ::unity::il2cpp::MethodInfo {
266 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
267 }
268
269 pub fn unregister_triggers_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
271 }
272
273 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
275 }
276
277 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
279 }
280}
281
282#[cfg(feature = "root-aktriggerhandler")]
283impl AkTriggerHandler {
284 #[doc = "Direct (non-virtual) call to `AkTriggerHandler`'s own `HandleEvent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
285 pub unsafe fn handle_event(
286 this: impl ::core::convert::Into<::unity::IlInstance>,
287 in_game_object: crate::unity_engine::gameobject::GameObject,
288 ) -> () {
289 let __mi = Self::handle_event_method_info();
290 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> () =
291 ::core::mem::transmute(__mi.method_ptr);
292 __inner(this.into(), in_game_object, ::core::option::Option::None)
293 }
294
295 #[doc = "Direct (non-virtual) call to `AkTriggerHandler`'s own `Awake`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
296 pub unsafe fn awake(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
297 let __mi = Self::awake_method_info();
298 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
299 __inner(this.into(), ::core::option::Option::None)
300 }
301
302 #[doc = "Direct (non-virtual) call to `AkTriggerHandler`'s own `Start`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
303 pub unsafe fn start(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
304 let __mi = Self::start_method_info();
305 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
306 __inner(this.into(), ::core::option::Option::None)
307 }
308
309 #[doc = "Direct (non-virtual) call to `AkTriggerHandler`'s own `OnDestroy`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
310 pub unsafe fn on_destroy(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
311 let __mi = Self::on_destroy_method_info();
312 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
313 __inner(this.into(), ::core::option::Option::None)
314 }
315
316 #[doc = "Direct (non-virtual) call to `AkTriggerHandler`'s own `OnEnable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
317 pub unsafe fn on_enable(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
318 let __mi = Self::on_enable_method_info();
319 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
320 __inner(this.into(), ::core::option::Option::None)
321 }
322}
323
324#[cfg(feature = "root-aktriggerhandler")]
325impl AkTriggerHandler {
326 #[doc = "`.ctor()` — no args"]
327 pub fn new() -> Self {
328 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
329 panic!(
330 "{}
331::{}
332 failed to instantiate",
333 ::core::stringify!(AkTriggerHandler),
334 ::core::stringify!(new),
335 )
336 });
337 <Self as IAkTriggerHandlerMethods>::ctor(this);
338 this
339 }
340}
341
342#[cfg(feature = "root-aktriggerhandler")]
343#[doc(hidden)]
344pub mod prelude {
345 pub use super::{AkTriggerHandler, IAkTriggerHandler, IAkTriggerHandlerMethods};
346 #[cfg(feature = "system-object")]
347 pub use crate::system::object::IObjectMethods;
348 #[cfg(feature = "unity_engine-behaviour")]
349 pub use crate::unity_engine::behaviour::IBehaviourMethods;
350 #[cfg(feature = "unity_engine-component")]
351 pub use crate::unity_engine::component::IComponentMethods;
352 #[cfg(feature = "unity_engine-monobehaviour")]
353 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
354 #[cfg(feature = "unity_engine-object_2")]
355 pub use crate::unity_engine::object_2::IObject_2Methods;
356 pub use crate::{
357 system::object::IObject,
358 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
359 };
360}