Skip to main content

engage/generated/root/
akgameobjlistenerlist.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "root-akgameobjlistenerlist-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        root::akaudiolistener::{AkAudioListener_BaseListenerList, IAkAudioListener_BaseListenerList},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/akgameobjlistenerlist/AkGameObjListenerList.md"))]
14    #[::unity::class(namespace = "", name = "AkGameObjListenerList")]
15    #[parent(crate::root::akaudiolistener::AkAudioListener_BaseListenerList)]
16    pub struct AkGameObjListenerList {
17        #[offset(32)]
18        #[rename(name = "akGameObj")]
19        pub ak_game_obj: crate::root::akgameobj::AkGameObj,
20        #[offset(40)]
21        #[rename(name = "initialListenerList")]
22        pub initial_listener_list: crate::system::collections::generic::list_1::List_1<crate::root::akaudiolistener::AkAudioListener>,
23        #[offset(48)]
24        #[rename(name = "useDefaultListeners")]
25        pub use_default_listeners_field: bool,
26    }
27}
28
29#[cfg(feature = "root-akgameobjlistenerlist-types")]
30pub use __types::*;
31
32#[cfg(feature = "root-akgameobjlistenerlist")]
33pub trait IAkGameObjListenerListMethods: IAkGameObjListenerList {
34    #[doc = "`SetUseDefaultListeners(bool)` overload"]
35    fn set_use_default_listeners(self, use_default: impl ::core::convert::Into<bool>) -> () {
36        unsafe {
37            let __receiver = <AkGameObjListenerList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
38            ::unity::il2cpp_call!((::unity::module_base()+0x2f1f310usize)as*mut u8,();
39(AkGameObjListenerList)__receiver,(bool)::core::convert::Into::into(use_default))
40        }
41    }
42    #[doc = "`Init(crate::root::akgameobj::AkGameObj)` overload"]
43    fn init(self, ak_game_obj: impl ::core::convert::Into<crate::root::akgameobj::AkGameObj>) -> () {
44        unsafe {
45            let __receiver = <AkGameObjListenerList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
46            ::unity::il2cpp_call!((::unity::module_base()+0x2f1e160usize)as*mut u8,();
47(AkGameObjListenerList)__receiver,(crate::root::akgameobj::AkGameObj)::core::convert::Into::into(ak_game_obj))
48        }
49    }
50    #[doc = "`Add(crate::root::akaudiolistener::AkAudioListener)` overload"]
51    fn add(self, listener: impl ::core::convert::Into<crate::root::akaudiolistener::AkAudioListener>) -> bool {
52        unsafe {
53            let __receiver = <AkGameObjListenerList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            {
55                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
56                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
57                    panic!(
58                        "unity: virtual slot {}
59 out of range (vtable len {}
60) on the runtime class behind {}
61 (method `{}
62`)",
63                        4usize,
64                        __vt.len(),
65                        <AkGameObjListenerList as ::unity::ClassIdentity>::NAME,
66                        "Add",
67                    )
68                });
69                let __inner: extern "C" fn(AkGameObjListenerList, crate::root::akaudiolistener::AkAudioListener, ::unity::OptionalMethod) -> bool =
70                    ::core::mem::transmute(__vi.method_ptr);
71                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
72                __inner(__receiver, ::core::convert::Into::into(listener), __mi)
73            }
74        }
75    }
76    #[doc = "`Remove(crate::root::akaudiolistener::AkAudioListener)` overload"]
77    fn remove(self, listener: impl ::core::convert::Into<crate::root::akaudiolistener::AkAudioListener>) -> bool {
78        unsafe {
79            let __receiver = <AkGameObjListenerList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
80            {
81                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
82                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
83                    panic!(
84                        "unity: virtual slot {}
85 out of range (vtable len {}
86) on the runtime class behind {}
87 (method `{}
88`)",
89                        5usize,
90                        __vt.len(),
91                        <AkGameObjListenerList as ::unity::ClassIdentity>::NAME,
92                        "Remove",
93                    )
94                });
95                let __inner: extern "C" fn(AkGameObjListenerList, crate::root::akaudiolistener::AkAudioListener, ::unity::OptionalMethod) -> bool =
96                    ::core::mem::transmute(__vi.method_ptr);
97                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
98                __inner(__receiver, ::core::convert::Into::into(listener), __mi)
99            }
100        }
101    }
102    #[doc = "`.ctor()` overload"]
103    fn ctor(self) -> () {
104        unsafe {
105            let __receiver = <AkGameObjListenerList as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
106            ::unity::il2cpp_call!((::unity::module_base()+0x2f1ea60usize)as*mut u8,();
107(AkGameObjListenerList)__receiver)
108        }
109    }
110}
111
112#[cfg(feature = "root-akgameobjlistenerlist")]
113impl<__T: IAkGameObjListenerList> IAkGameObjListenerListMethods for __T {}
114
115#[cfg(feature = "root-akgameobjlistenerlist")]
116impl AkGameObjListenerList {
117    pub fn set_use_default_listeners_method_info() -> &'static ::unity::il2cpp::MethodInfo {
118        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
119    }
120
121    pub fn init_method_info() -> &'static ::unity::il2cpp::MethodInfo {
122        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
123    }
124
125    pub fn add_method_info() -> &'static ::unity::il2cpp::MethodInfo {
126        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
127    }
128
129    pub fn remove_method_info() -> &'static ::unity::il2cpp::MethodInfo {
130        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
131    }
132
133    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
134        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
135    }
136}
137
138#[cfg(feature = "root-akgameobjlistenerlist")]
139impl AkGameObjListenerList {
140    #[doc = "Direct (non-virtual) call to `AkGameObjListenerList`'s own `Add`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
141    pub unsafe fn add(this: impl ::core::convert::Into<::unity::IlInstance>, listener: crate::root::akaudiolistener::AkAudioListener) -> bool {
142        let __mi = Self::add_method_info();
143        let __inner: extern "C" fn(::unity::IlInstance, crate::root::akaudiolistener::AkAudioListener, ::unity::OptionalMethod) -> bool =
144            ::core::mem::transmute(__mi.method_ptr);
145        __inner(this.into(), listener, ::core::option::Option::None)
146    }
147
148    #[doc = "Direct (non-virtual) call to `AkGameObjListenerList`'s own `Remove`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
149    pub unsafe fn remove(this: impl ::core::convert::Into<::unity::IlInstance>, listener: crate::root::akaudiolistener::AkAudioListener) -> bool {
150        let __mi = Self::remove_method_info();
151        let __inner: extern "C" fn(::unity::IlInstance, crate::root::akaudiolistener::AkAudioListener, ::unity::OptionalMethod) -> bool =
152            ::core::mem::transmute(__mi.method_ptr);
153        __inner(this.into(), listener, ::core::option::Option::None)
154    }
155}
156
157#[cfg(feature = "root-akgameobjlistenerlist")]
158impl AkGameObjListenerList {
159    #[doc = "`.ctor()` — no args"]
160    pub fn new() -> Self {
161        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
162            panic!(
163                "{}
164::{}
165 failed to instantiate",
166                ::core::stringify!(AkGameObjListenerList),
167                ::core::stringify!(new),
168            )
169        });
170        <Self as IAkGameObjListenerListMethods>::ctor(this);
171        this
172    }
173}
174
175#[cfg(feature = "root-akgameobjlistenerlist")]
176#[doc(hidden)]
177pub mod prelude {
178    pub use super::{AkGameObjListenerList, IAkGameObjListenerList, IAkGameObjListenerListMethods};
179    #[cfg(feature = "root-akaudiolistener")]
180    pub use crate::root::akaudiolistener::IAkAudioListener_BaseListenerListMethods;
181    #[cfg(feature = "system-object")]
182    pub use crate::system::object::IObjectMethods;
183    pub use crate::{root::akaudiolistener::IAkAudioListener_BaseListenerList, system::object::IObject};
184}