Skip to main content

engage/generated/app/
jukeboxplayer.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-jukeboxplayer-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::bgmplayer::{BgmPlayer, IBgmPlayer},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/jukeboxplayer/JukeboxPlayer.md"))]
14    #[::unity::class(namespace = "App", name = "JukeboxPlayer")]
15    #[parent(crate::app::bgmplayer::BgmPlayer)]
16    pub struct JukeboxPlayer {}
17}
18
19#[cfg(feature = "app-jukeboxplayer-types")]
20pub use __types::*;
21
22#[cfg(feature = "app-jukeboxplayer")]
23pub trait IJukeboxPlayerMethods: IJukeboxPlayer {
24    #[doc = "`IsPlaying(::unity::Il2CppString)` overload"]
25    fn is_playing(self, event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
26        unsafe {
27            let __receiver = <JukeboxPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
28            {
29                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
30                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
31                    panic!(
32                        "unity: virtual slot {}
33 out of range (vtable len {}
34) on the runtime class behind {}
35 (method `{}
36`)",
37                        6usize,
38                        __vt.len(),
39                        <JukeboxPlayer as ::unity::ClassIdentity>::NAME,
40                        "IsPlaying",
41                    )
42                });
43                let __inner: extern "C" fn(JukeboxPlayer, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
44                    ::core::mem::transmute(__vi.method_ptr);
45                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
46                __inner(__receiver, ::core::convert::Into::into(event_name), __mi)
47            }
48        }
49    }
50    #[doc = "`Play(::unity::Il2CppString)` overload"]
51    fn play(self, event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
52        unsafe {
53            let __receiver = <JukeboxPlayer 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(7usize).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                        7usize,
64                        __vt.len(),
65                        <JukeboxPlayer as ::unity::ClassIdentity>::NAME,
66                        "Play",
67                    )
68                });
69                let __inner: extern "C" fn(JukeboxPlayer, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
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(event_name), __mi)
73            }
74        }
75    }
76    #[doc = "`Stop()` overload"]
77    fn stop(self) -> () {
78        unsafe {
79            let __receiver = <JukeboxPlayer 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(9usize).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                        9usize,
90                        __vt.len(),
91                        <JukeboxPlayer as ::unity::ClassIdentity>::NAME,
92                        "Stop",
93                    )
94                });
95                let __inner: extern "C" fn(JukeboxPlayer, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
96                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
97                __inner(__receiver, __mi)
98            }
99        }
100    }
101    #[doc = "`.ctor()` overload"]
102    fn ctor(self) -> () {
103        unsafe {
104            let __receiver = <JukeboxPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
105            ::unity::il2cpp_call!((::unity::module_base()+0x205ac60usize)as*mut u8,();
106(JukeboxPlayer)__receiver)
107        }
108    }
109}
110
111#[cfg(feature = "app-jukeboxplayer")]
112impl<__T: IJukeboxPlayer> IJukeboxPlayerMethods for __T {}
113
114#[cfg(feature = "app-jukeboxplayer")]
115impl JukeboxPlayer {
116    pub fn is_playing_method_info() -> &'static ::unity::il2cpp::MethodInfo {
117        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
118    }
119
120    pub fn play_method_info() -> &'static ::unity::il2cpp::MethodInfo {
121        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
122    }
123
124    pub fn stop_method_info() -> &'static ::unity::il2cpp::MethodInfo {
125        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
126    }
127
128    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
129        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
130    }
131}
132
133#[cfg(feature = "app-jukeboxplayer")]
134impl JukeboxPlayer {
135    #[doc = "Direct (non-virtual) call to `JukeboxPlayer`'s own `IsPlaying`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
136    pub unsafe fn is_playing(this: impl ::core::convert::Into<::unity::IlInstance>, event_name: ::unity::Il2CppString) -> bool {
137        let __mi = Self::is_playing_method_info();
138        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
139            ::core::mem::transmute(__mi.method_ptr);
140        __inner(this.into(), event_name, ::core::option::Option::None)
141    }
142
143    #[doc = "Direct (non-virtual) call to `JukeboxPlayer`'s own `Play`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
144    pub unsafe fn play(this: impl ::core::convert::Into<::unity::IlInstance>, event_name: ::unity::Il2CppString) -> () {
145        let __mi = Self::play_method_info();
146        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
147            ::core::mem::transmute(__mi.method_ptr);
148        __inner(this.into(), event_name, ::core::option::Option::None)
149    }
150
151    #[doc = "Direct (non-virtual) call to `JukeboxPlayer`'s own `Stop`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
152    pub unsafe fn stop(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
153        let __mi = Self::stop_method_info();
154        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
155        __inner(this.into(), ::core::option::Option::None)
156    }
157}
158
159#[cfg(feature = "app-jukeboxplayer")]
160impl JukeboxPlayer {
161    #[doc = "`.ctor()` — no args"]
162    pub fn new() -> Self {
163        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
164            panic!(
165                "{}
166::{}
167 failed to instantiate",
168                ::core::stringify!(JukeboxPlayer),
169                ::core::stringify!(new),
170            )
171        });
172        <Self as IJukeboxPlayerMethods>::ctor(this);
173        this
174    }
175}
176
177#[cfg(feature = "app-jukeboxplayer")]
178#[doc(hidden)]
179pub mod prelude {
180    pub use super::{IJukeboxPlayer, IJukeboxPlayerMethods, JukeboxPlayer};
181    #[cfg(feature = "app-bgmplayer")]
182    pub use crate::app::bgmplayer::IBgmPlayerMethods;
183    #[cfg(feature = "system-object")]
184    pub use crate::system::object::IObjectMethods;
185    pub use crate::{app::bgmplayer::IBgmPlayer, system::object::IObject};
186}