engage/generated/combat/
actioninvoke.rs1#[cfg(feature = "combat-actioninvoke-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 combat::state::{IState, State},
10 system::object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/combat/actioninvoke/ActionInvoke.md"))]
14 #[::unity::class(namespace = "Combat", name = "ActionInvoke")]
15 #[parent(crate::combat::state::State)]
16 pub struct ActionInvoke {
17 #[offset(24)]
18 #[rename(name = "m_Func")]
19 pub m_func: crate::system::action::Action,
20 }
21}
22
23#[cfg(feature = "combat-actioninvoke-types")]
24pub use __types::*;
25
26#[cfg(feature = "combat-actioninvoke")]
27pub trait IActionInvokeMethods: IActionInvoke {
28 #[doc = "`get_Name()` overload"]
29 fn get_name(self) -> ::unity::Il2CppString {
30 unsafe {
31 let __receiver = <ActionInvoke as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32 {
33 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
34 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
35 panic!(
36 "unity: virtual slot {}
37 out of range (vtable len {}
38) on the runtime class behind {}
39 (method `{}
40`)",
41 5usize,
42 __vt.len(),
43 <ActionInvoke as ::unity::ClassIdentity>::NAME,
44 "get_Name",
45 )
46 });
47 let __inner: extern "C" fn(ActionInvoke, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
48 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49 __inner(__receiver, __mi)
50 }
51 }
52 }
53 #[doc = "`.ctor(crate::system::action::Action)` overload"]
54 fn ctor(self, func: impl ::core::convert::Into<crate::system::action::Action>) -> () {
55 unsafe {
56 let __receiver = <ActionInvoke as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57 ::unity::il2cpp_call!((::unity::module_base()+0x2bc7df0usize)as*mut u8,();
58(ActionInvoke)__receiver,(crate::system::action::Action)::core::convert::Into::into(func))
59 }
60 }
61 #[doc = "`OnEnter()` overload"]
62 fn on_enter(self) -> () {
63 unsafe {
64 let __receiver = <ActionInvoke as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65 {
66 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
67 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
68 panic!(
69 "unity: virtual slot {}
70 out of range (vtable len {}
71) on the runtime class behind {}
72 (method `{}
73`)",
74 6usize,
75 __vt.len(),
76 <ActionInvoke as ::unity::ClassIdentity>::NAME,
77 "OnEnter",
78 )
79 });
80 let __inner: extern "C" fn(ActionInvoke, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
81 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
82 __inner(__receiver, __mi)
83 }
84 }
85 }
86}
87
88#[cfg(feature = "combat-actioninvoke")]
89impl<__T: IActionInvoke> IActionInvokeMethods for __T {}
90
91#[cfg(feature = "combat-actioninvoke")]
92impl ActionInvoke {
93 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
94 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
95 }
96
97 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
98 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
99 }
100
101 pub fn on_enter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
102 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
103 }
104}
105
106#[cfg(feature = "combat-actioninvoke")]
107impl ActionInvoke {
108 #[doc = "Direct (non-virtual) call to `ActionInvoke`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
109 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
110 let __mi = Self::get_name_method_info();
111 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
112 __inner(this.into(), ::core::option::Option::None)
113 }
114
115 #[doc = "Direct (non-virtual) call to `ActionInvoke`'s own `OnEnter`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
116 pub unsafe fn on_enter(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
117 let __mi = Self::on_enter_method_info();
118 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
119 __inner(this.into(), ::core::option::Option::None)
120 }
121}
122
123#[cfg(feature = "combat-actioninvoke")]
124impl ActionInvoke {
125 #[doc = "`.ctor(crate::system::action::Action)` — overload selector"]
126 pub fn new(func: crate::system::action::Action) -> Self {
127 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
128 panic!(
129 "{}
130::{}
131 failed to instantiate",
132 ::core::stringify!(ActionInvoke),
133 ::core::stringify!(new),
134 )
135 });
136 <Self as IActionInvokeMethods>::ctor(this, func);
137 this
138 }
139}
140
141#[cfg(feature = "combat-actioninvoke")]
142#[doc(hidden)]
143pub mod prelude {
144 pub use super::{ActionInvoke, IActionInvoke, IActionInvokeMethods};
145 #[cfg(feature = "combat-state")]
146 pub use crate::combat::state::IStateMethods;
147 #[cfg(feature = "system-object")]
148 pub use crate::system::object::IObjectMethods;
149 pub use crate::{combat::state::IState, system::object::IObject};
150}