Skip to main content

engage/generated/app/
procbattlecallback.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-procbattlecallback-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::procinst::{IProcInst, ProcInst},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/procbattlecallback/ProcBattleCallback.md"))]
14    #[::unity::class(namespace = "App", name = "ProcBattleCallback")]
15    #[parent(crate::app::procinst::ProcInst)]
16    pub struct ProcBattleCallback {
17        #[offset(112)]
18        #[rename(name = "m_Calculator")]
19        pub m_calculator: crate::app::battlecalculator::BattleCalculator,
20        #[offset(120)]
21        #[rename(name = "m_Completed")]
22        pub m_completed: crate::system::action::Action,
23        #[offset(128)]
24        #[rename(name = "m_Skipable")]
25        pub m_skipable: bool,
26    }
27}
28
29#[cfg(feature = "app-procbattlecallback-types")]
30pub use __types::*;
31
32#[cfg(feature = "app-procbattlecallback")]
33impl ProcBattleCallback {
34    #[doc = "`GetCurrent(crate::app::procinst::ProcInst)` overload"]
35    pub fn get_current(super_: impl ::core::convert::Into<crate::app::procinst::ProcInst>) -> crate::app::procinst::ProcInst {
36        unsafe {
37            ::unity::il2cpp_call!((::unity::module_base()+0x281c630usize)as*mut u8,crate::app::procinst::ProcInst;
38(crate::app::procinst::ProcInst)::core::convert::Into::into(super_))
39        }
40    }
41}
42
43#[cfg(feature = "app-procbattlecallback")]
44pub trait IProcBattleCallbackMethods: IProcBattleCallback {
45    #[doc = "`.ctor(crate::app::battlecalculator::BattleCalculator, crate::system::action::Action, bool)` overload"]
46    fn ctor(
47        self,
48        calculator: impl ::core::convert::Into<crate::app::battlecalculator::BattleCalculator>,
49        completed: impl ::core::convert::Into<crate::system::action::Action>,
50        skipable: impl ::core::convert::Into<bool>,
51    ) -> () {
52        unsafe {
53            let __receiver = <ProcBattleCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            ::unity::il2cpp_call!((::unity::module_base()+0x281c550usize)as*mut u8,();
55(ProcBattleCallback)__receiver,(crate::app::battlecalculator::BattleCalculator)::core::convert::Into::into(calculator),(crate::system::action::Action)::core::convert::Into::into(completed),(bool)::core::convert::Into::into(skipable))
56        }
57    }
58    #[doc = "`OnCreate()` overload"]
59    fn on_create(self) -> () {
60        unsafe {
61            let __receiver = <ProcBattleCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
62            {
63                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
64                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
65                    panic!(
66                        "unity: virtual slot {}
67 out of range (vtable len {}
68) on the runtime class behind {}
69 (method `{}
70`)",
71                        9usize,
72                        __vt.len(),
73                        <ProcBattleCallback as ::unity::ClassIdentity>::NAME,
74                        "OnCreate",
75                    )
76                });
77                let __inner: extern "C" fn(ProcBattleCallback, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
78                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
79                __inner(__receiver, __mi)
80            }
81        }
82    }
83    #[doc = "`OnDispose()` overload"]
84    fn on_dispose(self) -> () {
85        unsafe {
86            let __receiver = <ProcBattleCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87            {
88                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
89                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
90                    panic!(
91                        "unity: virtual slot {}
92 out of range (vtable len {}
93) on the runtime class behind {}
94 (method `{}
95`)",
96                        10usize,
97                        __vt.len(),
98                        <ProcBattleCallback as ::unity::ClassIdentity>::NAME,
99                        "OnDispose",
100                    )
101                });
102                let __inner: extern "C" fn(ProcBattleCallback, ::unity::OptionalMethod) -> () = ::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, __mi)
105            }
106        }
107    }
108}
109
110#[cfg(feature = "app-procbattlecallback")]
111impl<__T: IProcBattleCallback> IProcBattleCallbackMethods for __T {}
112
113#[cfg(feature = "app-procbattlecallback")]
114impl ProcBattleCallback {
115    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
116        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
117    }
118
119    pub fn on_create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
120        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
121    }
122
123    pub fn on_dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
124        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
125    }
126
127    pub fn get_current_method_info() -> &'static ::unity::il2cpp::MethodInfo {
128        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
129    }
130}
131
132#[cfg(feature = "app-procbattlecallback")]
133impl ProcBattleCallback {
134    #[doc = "Direct (non-virtual) call to `ProcBattleCallback`'s own `OnCreate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
135    pub unsafe fn on_create(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
136        let __mi = Self::on_create_method_info();
137        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
138        __inner(this.into(), ::core::option::Option::None)
139    }
140
141    #[doc = "Direct (non-virtual) call to `ProcBattleCallback`'s own `OnDispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
142    pub unsafe fn on_dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
143        let __mi = Self::on_dispose_method_info();
144        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
145        __inner(this.into(), ::core::option::Option::None)
146    }
147}
148
149#[cfg(feature = "app-procbattlecallback")]
150impl ProcBattleCallback {
151    #[doc = "`.ctor(crate::app::battlecalculator::BattleCalculator, crate::system::action::Action, bool)` — overload selector"]
152    pub fn new(calculator: crate::app::battlecalculator::BattleCalculator, completed: crate::system::action::Action, skipable: bool) -> Self {
153        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
154            panic!(
155                "{}
156::{}
157 failed to instantiate",
158                ::core::stringify!(ProcBattleCallback),
159                ::core::stringify!(new),
160            )
161        });
162        <Self as IProcBattleCallbackMethods>::ctor(this, calculator, completed, skipable);
163        this
164    }
165}
166
167#[cfg(feature = "app-procbattlecallback")]
168#[doc(hidden)]
169pub mod prelude {
170    pub use super::{IProcBattleCallback, IProcBattleCallbackMethods, ProcBattleCallback};
171    #[cfg(feature = "app-procinst")]
172    pub use crate::app::procinst::IProcInstMethods;
173    #[cfg(feature = "system-object")]
174    pub use crate::system::object::IObjectMethods;
175    pub use crate::{app::procinst::IProcInst, system::object::IObject};
176}