1#[cfg(feature = "root-akevent-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 root::{
10 akdragdroptriggerhandler::{AkDragDropTriggerHandler, IAkDragDropTriggerHandler},
11 aktriggerhandler::{AkTriggerHandler, IAkTriggerHandler},
12 },
13 system::object::{IObject, Object},
14 unity_engine::{
15 behaviour::{Behaviour, IBehaviour},
16 component::{Component, IComponent},
17 monobehaviour::{IMonoBehaviour, MonoBehaviour},
18 object_2::{IObject_2, Object_2},
19 },
20 };
21
22 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/akevent/AkEvent.md"))]
23 #[::unity::class(namespace = "", name = "AkEvent")]
24 #[parent(crate::root::akdragdroptriggerhandler::AkDragDropTriggerHandler)]
25 pub struct AkEvent {
26 #[offset(44)]
27 #[rename(name = "actionOnEventType")]
28 pub action_on_event_type: crate::root::akactiononeventtype::AkActionOnEventType,
29 #[offset(48)]
30 #[rename(name = "curveInterpolation")]
31 pub curve_interpolation: crate::root::akcurveinterpolation::AkCurveInterpolation,
32 #[offset(52)]
33 #[rename(name = "enableActionOnEvent")]
34 pub enable_action_on_event: bool,
35 #[offset(64)]
36 #[rename(name = "useCallbacks")]
37 pub use_callbacks: bool,
38 #[offset(72)]
39 #[rename(name = "Callbacks")]
40 pub callbacks: crate::system::collections::generic::list_1::List_1<crate::root::akevent::AkEvent_CallbackData>,
41 #[offset(80)]
42 #[rename(name = "playingId")]
43 pub playing_id: u32,
44 #[offset(88)]
45 #[rename(name = "soundEmitterObject")]
46 pub sound_emitter_object: crate::unity_engine::gameobject::GameObject,
47 #[offset(96)]
48 #[rename(name = "transitionDuration")]
49 pub transition_duration: f32,
50 #[offset(104)]
51 #[rename(name = "EventCallbackMsg")]
52 pub event_callback_msg: crate::root::akeventcallbackmsg::AkEventCallbackMsg,
53 #[offset(112)]
54 #[rename(name = "eventIdInternal")]
55 pub event_id_internal: i32,
56 #[offset(120)]
57 #[rename(name = "valueGuidInternal")]
58 pub value_guid_internal: ::unity::Array<u8>,
59 #[offset(128)]
60 #[rename(name = "m_callbackDataInternal")]
61 pub m_callback_data_internal: crate::root::akeventcallbackdata::AkEventCallbackData,
62 }
63
64 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/akevent/AkEvent_CallbackData.md"))]
65 #[::unity::class(namespace = "", name = "AkEvent.CallbackData")]
66 #[parent(crate::system::object::Object)]
67 pub struct AkEvent_CallbackData {
68 #[offset(24)]
69 #[rename(name = "FunctionName")]
70 pub function_name: ::unity::Il2CppString,
71 #[offset(32)]
72 #[rename(name = "GameObject")]
73 pub game_object: crate::unity_engine::gameobject::GameObject,
74 }
75}
76
77#[cfg(feature = "root-akevent-types")]
78pub use __types::*;
79
80#[cfg(feature = "root-akevent")]
81pub trait IAkEventMethods: IAkEvent {
82 #[doc = "`Start()` overload"]
83 fn start(self) -> () {
84 unsafe {
85 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86 {
87 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
88 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
89 panic!(
90 "unity: virtual slot {}
91 out of range (vtable len {}
92) on the runtime class behind {}
93 (method `{}
94`)",
95 6usize,
96 __vt.len(),
97 <AkEvent as ::unity::ClassIdentity>::NAME,
98 "Start",
99 )
100 });
101 let __inner: extern "C" fn(AkEvent, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
102 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
103 __inner(__receiver, __mi)
104 }
105 }
106 }
107 #[doc = "`Callback(crate::system::object::Object, crate::root::akcallbacktype::AkCallbackType, crate::root::akcallbackinfo::AkCallbackInfo)` overload"]
108 fn callback(
109 self,
110 in_cookie: impl ::core::convert::Into<crate::system::object::Object>,
111 in_type: impl ::core::convert::Into<crate::root::akcallbacktype::AkCallbackType>,
112 in_info: impl ::core::convert::Into<crate::root::akcallbackinfo::AkCallbackInfo>,
113 ) -> () {
114 unsafe {
115 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116 ::unity::il2cpp_call!((::unity::module_base()+0x2f1a720usize)as*mut u8,();
117(AkEvent)__receiver,(crate::system::object::Object)::core::convert::Into::into(in_cookie),(crate::root::akcallbacktype::AkCallbackType)::core::convert::Into::into(in_type),(crate::root::akcallbackinfo::AkCallbackInfo)::core::convert::Into::into(in_info))
118 }
119 }
120 #[doc = "`HandleEvent(crate::unity_engine::gameobject::GameObject)` overload"]
121 fn handle_event(self, in_game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>) -> () {
122 unsafe {
123 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124 {
125 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
126 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
127 panic!(
128 "unity: virtual slot {}
129 out of range (vtable len {}
130) on the runtime class behind {}
131 (method `{}
132`)",
133 4usize,
134 __vt.len(),
135 <AkEvent as ::unity::ClassIdentity>::NAME,
136 "HandleEvent",
137 )
138 });
139 let __inner: extern "C" fn(AkEvent, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> () =
140 ::core::mem::transmute(__vi.method_ptr);
141 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
142 __inner(__receiver, ::core::convert::Into::into(in_game_object), __mi)
143 }
144 }
145 }
146 #[doc = "`Stop(i32)` overload"]
147 fn stop(self, transition_duration: impl ::core::convert::Into<i32>) -> () {
148 unsafe {
149 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
150 ::unity::il2cpp_call!((::unity::module_base()+0x2f1aa90usize)as*mut u8,();
151(AkEvent)__receiver,(i32)::core::convert::Into::into(transition_duration))
152 }
153 }
154 #[doc = "`Stop(i32, crate::root::akcurveinterpolation::AkCurveInterpolation)` overload"]
155 fn stop_2(
156 self,
157 transition_duration: impl ::core::convert::Into<i32>,
158 curve_interpolation: impl ::core::convert::Into<crate::root::akcurveinterpolation::AkCurveInterpolation>,
159 ) -> () {
160 unsafe {
161 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
162 ::unity::il2cpp_call!((::unity::module_base()+0x2f1aab0usize)as*mut u8,();
163(AkEvent)__receiver,(i32)::core::convert::Into::into(transition_duration),(crate::root::akcurveinterpolation::AkCurveInterpolation)::core::convert::Into::into(curve_interpolation))
164 }
165 }
166 #[doc = "`get_eventID()` overload"]
167 fn get_event_id(self) -> i32 {
168 unsafe {
169 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
170 ::unity::il2cpp_call!((::unity::module_base()+0x2f1aad0usize)as*mut u8,i32;
171(AkEvent)__receiver)
172 }
173 }
174 #[doc = "`get_valueGuid()` overload"]
175 fn get_value_guid(self) -> ::unity::Array<u8> {
176 unsafe {
177 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
178 ::unity::il2cpp_call!((::unity::module_base()+0x2f1aaf0usize)as*mut u8, ::unity::Array<u8> ;
179(AkEvent)__receiver)
180 }
181 }
182 #[doc = "`get_m_callbackData()` overload"]
183 fn get_m_callback_data(self) -> crate::root::akeventcallbackdata::AkEventCallbackData {
184 unsafe {
185 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
186 ::unity::il2cpp_call!((::unity::module_base()+0x2f1abb0usize)as*mut u8,crate::root::akeventcallbackdata::AkEventCallbackData;
187(AkEvent)__receiver)
188 }
189 }
190 #[doc = "`.ctor()` overload"]
191 fn ctor(self) -> () {
192 unsafe {
193 let __receiver = <AkEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
194 ::unity::il2cpp_call!((::unity::module_base()+0x2f1abc0usize)as*mut u8,();
195(AkEvent)__receiver)
196 }
197 }
198}
199
200#[cfg(feature = "root-akevent")]
201impl<__T: IAkEvent> IAkEventMethods for __T {}
202
203#[cfg(feature = "root-akevent")]
204impl AkEvent {
205 pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
207 }
208
209 pub fn callback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
211 }
212
213 pub fn handle_event_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
215 }
216
217 pub fn stop_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
219 }
220
221 pub fn stop_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
223 }
224
225 pub fn get_event_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
227 }
228
229 pub fn get_value_guid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
231 }
232
233 pub fn get_m_callback_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
235 }
236
237 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
239 }
240}
241
242#[cfg(feature = "root-akevent")]
243impl AkEvent {
244 #[doc = "Direct (non-virtual) call to `AkEvent`'s own `Start`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
245 pub unsafe fn start(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
246 let __mi = Self::start_method_info();
247 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
248 __inner(this.into(), ::core::option::Option::None)
249 }
250
251 #[doc = "Direct (non-virtual) call to `AkEvent`'s own `HandleEvent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
252 pub unsafe fn handle_event(
253 this: impl ::core::convert::Into<::unity::IlInstance>,
254 in_game_object: crate::unity_engine::gameobject::GameObject,
255 ) -> () {
256 let __mi = Self::handle_event_method_info();
257 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> () =
258 ::core::mem::transmute(__mi.method_ptr);
259 __inner(this.into(), in_game_object, ::core::option::Option::None)
260 }
261}
262
263#[cfg(feature = "root-akevent")]
264impl AkEvent {
265 #[doc = "`.ctor()` — no args"]
266 pub fn new() -> Self {
267 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
268 panic!(
269 "{}
270::{}
271 failed to instantiate",
272 ::core::stringify!(AkEvent),
273 ::core::stringify!(new),
274 )
275 });
276 <Self as IAkEventMethods>::ctor(this);
277 this
278 }
279}
280
281#[cfg(feature = "root-akevent")]
282pub trait IAkEvent_CallbackDataMethods: IAkEvent_CallbackData {
283 #[doc = "`CallFunction(crate::root::akeventcallbackmsg::AkEventCallbackMsg)` overload"]
284 fn call_function(self, event_callback_msg: impl ::core::convert::Into<crate::root::akeventcallbackmsg::AkEventCallbackMsg>) -> () {
285 unsafe {
286 let __receiver = <AkEvent_CallbackData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
287 ::unity::il2cpp_call!((::unity::module_base()+0x1b9e720usize)as*mut u8,();
288(AkEvent_CallbackData)__receiver,(crate::root::akeventcallbackmsg::AkEventCallbackMsg)::core::convert::Into::into(event_callback_msg))
289 }
290 }
291 #[doc = "`.ctor()` overload"]
292 fn ctor(self) -> () {
293 unsafe {
294 let __receiver = <AkEvent_CallbackData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
295 ::unity::il2cpp_call!((::unity::module_base()+0x1b9e7e0usize)as*mut u8,();
296(AkEvent_CallbackData)__receiver)
297 }
298 }
299}
300
301#[cfg(feature = "root-akevent")]
302impl<__T: IAkEvent_CallbackData> IAkEvent_CallbackDataMethods for __T {}
303
304#[cfg(feature = "root-akevent")]
305impl AkEvent_CallbackData {
306 pub fn call_function_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
308 }
309
310 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
312 }
313}
314
315#[cfg(feature = "root-akevent")]
316impl AkEvent_CallbackData {
317 #[doc = "`.ctor()` — no args"]
318 pub fn new() -> Self {
319 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
320 panic!(
321 "{}
322::{}
323 failed to instantiate",
324 ::core::stringify!(AkEvent_CallbackData),
325 ::core::stringify!(new),
326 )
327 });
328 <Self as IAkEvent_CallbackDataMethods>::ctor(this);
329 this
330 }
331}
332
333#[cfg(feature = "root-akevent")]
334#[doc(hidden)]
335pub mod prelude {
336 pub use super::{AkEvent, AkEvent_CallbackData, IAkEvent, IAkEventMethods, IAkEvent_CallbackData, IAkEvent_CallbackDataMethods};
337 #[cfg(feature = "root-akdragdroptriggerhandler")]
338 pub use crate::root::akdragdroptriggerhandler::IAkDragDropTriggerHandlerMethods;
339 #[cfg(feature = "root-aktriggerhandler")]
340 pub use crate::root::aktriggerhandler::IAkTriggerHandlerMethods;
341 #[cfg(feature = "system-object")]
342 pub use crate::system::object::IObjectMethods;
343 #[cfg(feature = "unity_engine-behaviour")]
344 pub use crate::unity_engine::behaviour::IBehaviourMethods;
345 #[cfg(feature = "unity_engine-component")]
346 pub use crate::unity_engine::component::IComponentMethods;
347 #[cfg(feature = "unity_engine-monobehaviour")]
348 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
349 #[cfg(feature = "unity_engine-object_2")]
350 pub use crate::unity_engine::object_2::IObject_2Methods;
351 pub use crate::{
352 root::{akdragdroptriggerhandler::IAkDragDropTriggerHandler, aktriggerhandler::IAkTriggerHandler},
353 system::object::IObject,
354 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
355 };
356}