Skip to main content

engage/generated/combat/
actionvoice.rs

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