1#[cfg(feature = "app-bgmplayer-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/bgmplayer/BgmPlayer.md"))]
11 #[::unity::class(namespace = "App", name = "BgmPlayer")]
12 #[parent(crate::system::object::Object)]
13 pub struct BgmPlayer {}
14}
15
16#[cfg(feature = "app-bgmplayer-types")]
17pub use __types::*;
18
19#[cfg(feature = "app-bgmplayer")]
20impl BgmPlayer {
21 #[doc = "`PlaySound(::unity::Il2CppString)` overload"]
22 pub fn play_sound(event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::app::gamesound::GameSound_Handle {
23 unsafe {
24 ::unity::il2cpp_call!((::unity::module_base()+0x1e952a0usize)as*mut u8,crate::app::gamesound::GameSound_Handle;
25(::unity::Il2CppString)::core::convert::Into::into(event_name))
26 }
27 }
28}
29
30#[cfg(feature = "app-bgmplayer")]
31pub trait IBgmPlayerMethods: IBgmPlayer {
32 #[doc = "`PauseCurrentBgm()` overload"]
33 fn pause_current_bgm(self) -> () {
34 unsafe {
35 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
36 {
37 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
38 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
39 panic!(
40 "unity: virtual slot {}
41 out of range (vtable len {}
42) on the runtime class behind {}
43 (method `{}
44`)",
45 4usize,
46 __vt.len(),
47 <BgmPlayer as ::unity::ClassIdentity>::NAME,
48 "PauseCurrentBgm",
49 )
50 });
51 let __inner: extern "C" fn(BgmPlayer, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
52 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
53 __inner(__receiver, __mi)
54 }
55 }
56 }
57 #[doc = "`IsPlaying()` overload"]
58 fn is_playing(self) -> bool {
59 unsafe {
60 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
61 {
62 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
63 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
64 panic!(
65 "unity: virtual slot {}
66 out of range (vtable len {}
67) on the runtime class behind {}
68 (method `{}
69`)",
70 5usize,
71 __vt.len(),
72 <BgmPlayer as ::unity::ClassIdentity>::NAME,
73 "IsPlaying",
74 )
75 });
76 let __inner: extern "C" fn(BgmPlayer, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
77 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
78 __inner(__receiver, __mi)
79 }
80 }
81 }
82 #[doc = "`IsPlaying(::unity::Il2CppString)` overload"]
83 fn is_playing_2(self, event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
84 unsafe {
85 let __receiver = <BgmPlayer 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 <BgmPlayer as ::unity::ClassIdentity>::NAME,
98 "IsPlaying",
99 )
100 });
101 let __inner: extern "C" fn(BgmPlayer, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
102 ::core::mem::transmute(__vi.method_ptr);
103 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
104 __inner(__receiver, ::core::convert::Into::into(event_name), __mi)
105 }
106 }
107 }
108 #[doc = "`Play(::unity::Il2CppString)` overload"]
109 fn play(self, event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
110 unsafe {
111 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112 {
113 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
114 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
115 panic!(
116 "unity: virtual slot {}
117 out of range (vtable len {}
118) on the runtime class behind {}
119 (method `{}
120`)",
121 7usize,
122 __vt.len(),
123 <BgmPlayer as ::unity::ClassIdentity>::NAME,
124 "Play",
125 )
126 });
127 let __inner: extern "C" fn(BgmPlayer, ::unity::Il2CppString, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
128 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
129 __inner(__receiver, ::core::convert::Into::into(event_name), __mi)
130 }
131 }
132 }
133 #[doc = "`PlaySelect(::unity::Il2CppString)` overload"]
134 fn play_select(self, event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
135 unsafe {
136 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
137 {
138 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
139 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
140 panic!(
141 "unity: virtual slot {}
142 out of range (vtable len {}
143) on the runtime class behind {}
144 (method `{}
145`)",
146 8usize,
147 __vt.len(),
148 <BgmPlayer as ::unity::ClassIdentity>::NAME,
149 "PlaySelect",
150 )
151 });
152 let __inner: extern "C" fn(BgmPlayer, ::unity::Il2CppString, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
153 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
154 __inner(__receiver, ::core::convert::Into::into(event_name), __mi)
155 }
156 }
157 }
158 #[doc = "`Stop()` overload"]
159 fn stop(self) -> () {
160 unsafe {
161 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
162 {
163 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
164 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
165 panic!(
166 "unity: virtual slot {}
167 out of range (vtable len {}
168) on the runtime class behind {}
169 (method `{}
170`)",
171 9usize,
172 __vt.len(),
173 <BgmPlayer as ::unity::ClassIdentity>::NAME,
174 "Stop",
175 )
176 });
177 let __inner: extern "C" fn(BgmPlayer, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
178 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
179 __inner(__receiver, __mi)
180 }
181 }
182 }
183 #[doc = "`Tick(crate::app::myroomsoundmenu::MyRoomSoundMenu)` overload"]
184 fn tick(self, menu: impl ::core::convert::Into<crate::app::myroomsoundmenu::MyRoomSoundMenu>) -> () {
185 unsafe {
186 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187 {
188 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
189 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
190 panic!(
191 "unity: virtual slot {}
192 out of range (vtable len {}
193) on the runtime class behind {}
194 (method `{}
195`)",
196 10usize,
197 __vt.len(),
198 <BgmPlayer as ::unity::ClassIdentity>::NAME,
199 "Tick",
200 )
201 });
202 let __inner: extern "C" fn(BgmPlayer, crate::app::myroomsoundmenu::MyRoomSoundMenu, ::unity::OptionalMethod) -> () =
203 ::core::mem::transmute(__vi.method_ptr);
204 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
205 __inner(__receiver, ::core::convert::Into::into(menu), __mi)
206 }
207 }
208 }
209 #[doc = "`Close()` overload"]
210 fn close(self) -> () {
211 unsafe {
212 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
213 {
214 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
215 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
216 panic!(
217 "unity: virtual slot {}
218 out of range (vtable len {}
219) on the runtime class behind {}
220 (method `{}
221`)",
222 11usize,
223 __vt.len(),
224 <BgmPlayer as ::unity::ClassIdentity>::NAME,
225 "Close",
226 )
227 });
228 let __inner: extern "C" fn(BgmPlayer, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
229 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
230 __inner(__receiver, __mi)
231 }
232 }
233 }
234 #[doc = "`.ctor()` overload"]
235 fn ctor(self) -> () {
236 unsafe {
237 let __receiver = <BgmPlayer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
238 ::unity::il2cpp_call!((::unity::module_base()+0x1e953a0usize)as*mut u8,();
239(BgmPlayer)__receiver)
240 }
241 }
242}
243
244#[cfg(feature = "app-bgmplayer")]
245impl<__T: IBgmPlayer> IBgmPlayerMethods for __T {}
246
247#[cfg(feature = "app-bgmplayer")]
248impl BgmPlayer {
249 pub fn pause_current_bgm_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
251 }
252
253 pub fn is_playing_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
255 }
256
257 pub fn is_playing_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
259 }
260
261 pub fn play_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
263 }
264
265 pub fn play_select_method_info() -> &'static ::unity::il2cpp::MethodInfo {
266 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
267 }
268
269 pub fn stop_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
271 }
272
273 pub fn tick_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
275 }
276
277 pub fn close_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
279 }
280
281 pub fn play_sound_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
283 }
284
285 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
287 }
288}
289
290#[cfg(feature = "app-bgmplayer")]
291impl BgmPlayer {
292 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `PauseCurrentBgm`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
293 pub unsafe fn pause_current_bgm(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
294 let __mi = Self::pause_current_bgm_method_info();
295 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
296 __inner(this.into(), ::core::option::Option::None)
297 }
298
299 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `IsPlaying`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
300 pub unsafe fn is_playing(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
301 let __mi = Self::is_playing_method_info();
302 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
303 __inner(this.into(), ::core::option::Option::None)
304 }
305
306 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `IsPlaying`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
307 pub unsafe fn is_playing_2(this: impl ::core::convert::Into<::unity::IlInstance>, event_name: ::unity::Il2CppString) -> bool {
308 let __mi = Self::is_playing_2_method_info();
309 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
310 ::core::mem::transmute(__mi.method_ptr);
311 __inner(this.into(), event_name, ::core::option::Option::None)
312 }
313
314 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `Play`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
315 pub unsafe fn play(this: impl ::core::convert::Into<::unity::IlInstance>, event_name: ::unity::Il2CppString) -> () {
316 let __mi = Self::play_method_info();
317 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
318 ::core::mem::transmute(__mi.method_ptr);
319 __inner(this.into(), event_name, ::core::option::Option::None)
320 }
321
322 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `PlaySelect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
323 pub unsafe fn play_select(this: impl ::core::convert::Into<::unity::IlInstance>, event_name: ::unity::Il2CppString) -> () {
324 let __mi = Self::play_select_method_info();
325 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
326 ::core::mem::transmute(__mi.method_ptr);
327 __inner(this.into(), event_name, ::core::option::Option::None)
328 }
329
330 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `Stop`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
331 pub unsafe fn stop(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
332 let __mi = Self::stop_method_info();
333 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
334 __inner(this.into(), ::core::option::Option::None)
335 }
336
337 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `Tick`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
338 pub unsafe fn tick(this: impl ::core::convert::Into<::unity::IlInstance>, menu: crate::app::myroomsoundmenu::MyRoomSoundMenu) -> () {
339 let __mi = Self::tick_method_info();
340 let __inner: extern "C" fn(::unity::IlInstance, crate::app::myroomsoundmenu::MyRoomSoundMenu, ::unity::OptionalMethod) -> () =
341 ::core::mem::transmute(__mi.method_ptr);
342 __inner(this.into(), menu, ::core::option::Option::None)
343 }
344
345 #[doc = "Direct (non-virtual) call to `BgmPlayer`'s own `Close`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
346 pub unsafe fn close(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
347 let __mi = Self::close_method_info();
348 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
349 __inner(this.into(), ::core::option::Option::None)
350 }
351}
352
353#[cfg(feature = "app-bgmplayer")]
354impl BgmPlayer {
355 #[doc = "`.ctor()` — no args"]
356 pub fn new() -> Self {
357 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
358 panic!(
359 "{}
360::{}
361 failed to instantiate",
362 ::core::stringify!(BgmPlayer),
363 ::core::stringify!(new),
364 )
365 });
366 <Self as IBgmPlayerMethods>::ctor(this);
367 this
368 }
369}
370
371#[cfg(feature = "app-bgmplayer")]
372#[doc(hidden)]
373pub mod prelude {
374 pub use super::{BgmPlayer, IBgmPlayer, IBgmPlayerMethods};
375 pub use crate::system::object::IObject;
376 #[cfg(feature = "system-object")]
377 pub use crate::system::object::IObjectMethods;
378}