Skip to main content

engage/generated/combat/
vcamshaker.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "combat-vcamshaker-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        r#enum::{Enum, IEnum},
11        valuetype::{IValueType, ValueType},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/combat/vcamshaker/VCamShaker_ShakeType.md"))]
15    #[repr(C)]
16    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17    pub struct VCamShaker_ShakeType {
18        pub value: i32,
19    }
20    impl ::unity::ClassIdentity for VCamShaker_ShakeType {
21        const NAME: &'static str = "VCamShaker.ShakeType";
22        const NAMESPACE: &'static str = "Combat";
23
24        fn class() -> ::unity::Class {
25            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27        }
28    }
29    impl ::unity::IlType for VCamShaker_ShakeType {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34    impl VCamShaker_ShakeType {
35        pub fn waiting() -> Self {
36            Self { value: 0 }
37        }
38
39        pub fn impact() -> Self {
40            Self { value: 1 }
41        }
42
43        pub fn armor_step() -> Self {
44            Self { value: 2 }
45        }
46    }
47
48    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/combat/vcamshaker/VCamShaker.md"))]
49    #[::unity::class(namespace = "Combat", name = "VCamShaker")]
50    pub struct VCamShaker {
51        #[offset(80)]
52        #[rename(name = "m_Setting")]
53        pub m_setting: crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings,
54        #[offset(88)]
55        #[rename(name = "m_ShakeType")]
56        pub m_shake_type: crate::combat::vcamshaker::VCamShaker_ShakeType,
57        #[offset(92)]
58        #[rename(name = "m_Life")]
59        pub m_life: i32,
60        #[offset(96)]
61        #[rename(name = "m_Magnitude")]
62        pub m_magnitude: f32,
63    }
64}
65
66#[cfg(feature = "combat-vcamshaker-types")]
67pub use __types::*;
68
69#[cfg(feature = "combat-vcamshaker")]
70pub trait IVCamShakerMethods: IVCamShaker {
71    #[doc = "`get_IsValid()` overload"]
72    fn get_is_valid(self) -> bool {
73        unsafe {
74            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75            {
76                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
77                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
78                    panic!(
79                        "unity: virtual slot {}
80 out of range (vtable len {}
81) on the runtime class behind {}
82 (method `{}
83`)",
84                        4usize,
85                        __vt.len(),
86                        <VCamShaker as ::unity::ClassIdentity>::NAME,
87                        "get_IsValid",
88                    )
89                });
90                let __inner: extern "C" fn(VCamShaker, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
91                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
92                __inner(__receiver, __mi)
93            }
94        }
95    }
96    #[doc = "`Awake()` overload"]
97    fn awake(self) -> () {
98        unsafe {
99            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100            ::unity::il2cpp_call!((::unity::module_base()+0x26a14a0usize)as*mut u8,();
101(VCamShaker)__receiver)
102        }
103    }
104    #[doc = "`CalcImpact()` overload"]
105    fn calc_impact(self) -> crate::unity_engine::vector3::Vector3 {
106        unsafe {
107            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            ::unity::il2cpp_call!((::unity::module_base()+0x26a1590usize)as*mut u8,crate::unity_engine::vector3::Vector3;
109(VCamShaker)__receiver)
110        }
111    }
112    #[doc = "`CalcArmorStep()` overload"]
113    fn calc_armor_step(self) -> crate::unity_engine::vector3::Vector3 {
114        unsafe {
115            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116            ::unity::il2cpp_call!((::unity::module_base()+0x26a1600usize)as*mut u8,crate::unity_engine::vector3::Vector3;
117(VCamShaker)__receiver)
118        }
119    }
120    #[doc = "`StartShake(crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings, f32, f32, bool)` overload"]
121    fn start_shake(
122        self,
123        setting: impl ::core::convert::Into<crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings>,
124        magnitude: impl ::core::convert::Into<f32>,
125        distance: impl ::core::convert::Into<f32>,
126        is_critical: impl ::core::convert::Into<bool>,
127    ) -> () {
128        unsafe {
129            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130            ::unity::il2cpp_call!((::unity::module_base()+0x26a1650usize)as*mut u8,();
131(VCamShaker)__receiver,(crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings)::core::convert::Into::into(setting),(f32)::core::convert::Into::into(magnitude),(f32)::core::convert::Into::into(distance),(bool)::core::convert::Into::into(is_critical))
132        }
133    }
134    #[doc = "`ArmorShake(crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings, f32, f32)` overload"]
135    fn armor_shake(
136        self,
137        setting: impl ::core::convert::Into<crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings>,
138        magnitude: impl ::core::convert::Into<f32>,
139        distance: impl ::core::convert::Into<f32>,
140    ) -> () {
141        unsafe {
142            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
143            ::unity::il2cpp_call!((::unity::module_base()+0x26a16c0usize)as*mut u8,();
144(VCamShaker)__receiver,(crate::combat::camerapositiondata::CameraPositionData_CameraShakeSettings)::core::convert::Into::into(setting),(f32)::core::convert::Into::into(magnitude),(f32)::core::convert::Into::into(distance))
145        }
146    }
147    #[doc = "`.ctor()` overload"]
148    fn ctor(self) -> () {
149        unsafe {
150            let __receiver = <VCamShaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
151            ::unity::il2cpp_call!((::unity::module_base()+0x26a1740usize)as*mut u8,();
152(VCamShaker)__receiver)
153        }
154    }
155}
156
157#[cfg(feature = "combat-vcamshaker")]
158impl<__T: IVCamShaker> IVCamShakerMethods for __T {}
159
160#[cfg(feature = "combat-vcamshaker")]
161impl VCamShaker {
162    pub fn get_is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
163        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
164    }
165
166    pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
167        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
168    }
169
170    pub fn calc_impact_method_info() -> &'static ::unity::il2cpp::MethodInfo {
171        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
172    }
173
174    pub fn calc_armor_step_method_info() -> &'static ::unity::il2cpp::MethodInfo {
175        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
176    }
177
178    pub fn start_shake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
179        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
180    }
181
182    pub fn armor_shake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
183        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
184    }
185
186    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
188    }
189}
190
191#[cfg(feature = "combat-vcamshaker")]
192impl VCamShaker {
193    #[doc = "Direct (non-virtual) call to `VCamShaker`'s own `get_IsValid`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
194    pub unsafe fn get_is_valid(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
195        let __mi = Self::get_is_valid_method_info();
196        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
197        __inner(this.into(), ::core::option::Option::None)
198    }
199}
200
201#[cfg(feature = "combat-vcamshaker")]
202impl VCamShaker {
203    #[doc = "`.ctor()` — no args"]
204    pub fn new() -> Self {
205        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
206            panic!(
207                "{}
208::{}
209 failed to instantiate",
210                ::core::stringify!(VCamShaker),
211                ::core::stringify!(new),
212            )
213        });
214        <Self as IVCamShakerMethods>::ctor(this);
215        this
216    }
217}
218
219#[cfg(feature = "combat-vcamshaker")]
220#[doc(hidden)]
221pub mod prelude {
222    pub use super::{IVCamShaker, IVCamShakerMethods, VCamShaker, VCamShaker_ShakeType};
223    #[cfg(feature = "system-object")]
224    pub use crate::system::object::IObjectMethods;
225    #[cfg(feature = "system-enum")]
226    pub use crate::system::r#enum::IEnumMethods;
227    #[cfg(feature = "system-valuetype")]
228    pub use crate::system::valuetype::IValueTypeMethods;
229    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
230}