engage/generated/combat/
hitstop.rs1#[cfg(feature = "combat-hitstop-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/combat/hitstop/HitStop.md"))]
11 #[::unity::class(namespace = "Combat", name = "HitStop")]
12 #[parent(crate::system::object::Object)]
13 pub struct HitStop {
14 #[offset(16)]
15 #[rename(name = "m_HitStopSpeedCurve")]
16 pub m_hit_stop_speed_curve: crate::unity_engine::animationcurve::AnimationCurve,
17 #[offset(32)]
18 #[rename(name = "m_NormalizedScale")]
19 pub m_normalized_scale: f32,
20 #[offset(36)]
21 #[rename(name = "m_LastSpeed")]
22 pub m_last_speed: f32,
23 #[offset(40)]
24 #[rename(name = "m_bHitStopEndCalled")]
25 pub m_b_hit_stop_end_called: bool,
26 #[offset(44)]
27 #[rename(name = "m_HitStopStart")]
28 pub m_hit_stop_start: f32,
29 }
30}
31
32#[cfg(feature = "combat-hitstop-types")]
33pub use __types::*;
34
35#[cfg(feature = "combat-hitstop")]
36pub trait IHitStopMethods: IHitStop {
37 #[doc = "`.ctor(crate::unity_engine::animationcurve::AnimationCurve)` overload"]
38 fn ctor(self, hit_stop_speed_curve: impl ::core::convert::Into<crate::unity_engine::animationcurve::AnimationCurve>) -> () {
39 unsafe {
40 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
41 ::unity::il2cpp_call!((::unity::module_base()+0x2167190usize)as*mut u8,();
42(HitStop)__receiver,(crate::unity_engine::animationcurve::AnimationCurve)::core::convert::Into::into(hit_stop_speed_curve))
43 }
44 }
45 #[doc = "`Dispose()` overload"]
46 fn dispose(self) -> () {
47 unsafe {
48 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49 {
50 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
51 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
52 panic!(
53 "unity: virtual slot {}
54 out of range (vtable len {}
55) on the runtime class behind {}
56 (method `{}
57`)",
58 4usize,
59 __vt.len(),
60 <HitStop as ::unity::ClassIdentity>::NAME,
61 "Dispose",
62 )
63 });
64 let __inner: extern "C" fn(HitStop, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
65 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
66 __inner(__receiver, __mi)
67 }
68 }
69 }
70 #[doc = "`Reset()` overload"]
71 fn reset(self) -> () {
72 unsafe {
73 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 ::unity::il2cpp_call!((::unity::module_base()+0x21671e0usize)as*mut u8,();
75(HitStop)__receiver)
76 }
77 }
78 #[doc = "`get_RemainingTime()` overload"]
79 fn get_remaining_time(self) -> f32 {
80 unsafe {
81 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82 ::unity::il2cpp_call!((::unity::module_base()+0x2167220usize)as*mut u8,f32;
83(HitStop)__receiver)
84 }
85 }
86 #[doc = "`set_RemainingTime(f32)` overload"]
87 fn set_remaining_time(self, value: impl ::core::convert::Into<f32>) -> () {
88 unsafe {
89 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 ::unity::il2cpp_call!((::unity::module_base()+0x2167230usize)as*mut u8,();
91(HitStop)__receiver,(f32)::core::convert::Into::into(value))
92 }
93 }
94 #[doc = "`get_IsRunning()` overload"]
95 fn get_is_running(self) -> bool {
96 unsafe {
97 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98 ::unity::il2cpp_call!((::unity::module_base()+0x2167240usize)as*mut u8,bool;
99(HitStop)__receiver)
100 }
101 }
102 #[doc = "`get_Speed()` overload"]
103 fn get_speed(self) -> f32 {
104 unsafe {
105 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
106 ::unity::il2cpp_call!((::unity::module_base()+0x2167250usize)as*mut u8,f32;
107(HitStop)__receiver)
108 }
109 }
110 #[doc = "`set_Speed(f32)` overload"]
111 fn set_speed(self, value: impl ::core::convert::Into<f32>) -> () {
112 unsafe {
113 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114 ::unity::il2cpp_call!((::unity::module_base()+0x2167260usize)as*mut u8,();
115(HitStop)__receiver,(f32)::core::convert::Into::into(value))
116 }
117 }
118 #[doc = "`get_NormalizedTime()` overload"]
119 fn get_normalized_time(self) -> f32 {
120 unsafe {
121 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122 ::unity::il2cpp_call!((::unity::module_base()+0x2167270usize)as*mut u8,f32;
123(HitStop)__receiver)
124 }
125 }
126 #[doc = "`Start(f32)` overload"]
127 fn start(self, time: impl ::core::convert::Into<f32>) -> () {
128 unsafe {
129 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130 ::unity::il2cpp_call!((::unity::module_base()+0x2167290usize)as*mut u8,();
131(HitStop)__receiver,(f32)::core::convert::Into::into(time))
132 }
133 }
134 #[doc = "`Update()` overload"]
135 fn update(self) -> () {
136 unsafe {
137 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
138 ::unity::il2cpp_call!((::unity::module_base()+0x21673f0usize)as*mut u8,();
139(HitStop)__receiver)
140 }
141 }
142 #[doc = "`Resume()` overload"]
143 fn resume(self) -> () {
144 unsafe {
145 let __receiver = <HitStop as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146 ::unity::il2cpp_call!((::unity::module_base()+0x21674c0usize)as*mut u8,();
147(HitStop)__receiver)
148 }
149 }
150}
151
152#[cfg(feature = "combat-hitstop")]
153impl<__T: IHitStop> IHitStopMethods for __T {}
154
155#[cfg(feature = "combat-hitstop")]
156impl HitStop {
157 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
159 }
160
161 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
163 }
164
165 pub fn reset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
167 }
168
169 pub fn get_remaining_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
171 }
172
173 pub fn set_remaining_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
175 }
176
177 pub fn get_is_running_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
179 }
180
181 pub fn get_speed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
183 }
184
185 pub fn set_speed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
187 }
188
189 pub fn get_normalized_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
191 }
192
193 pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
195 }
196
197 pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
199 }
200
201 pub fn resume_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
203 }
204}
205
206#[cfg(feature = "combat-hitstop")]
207impl HitStop {
208 #[doc = "Direct (non-virtual) call to `HitStop`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
209 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
210 let __mi = Self::dispose_method_info();
211 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
212 __inner(this.into(), ::core::option::Option::None)
213 }
214}
215
216#[cfg(feature = "combat-hitstop")]
217impl HitStop {
218 #[doc = "`.ctor(crate::unity_engine::animationcurve::AnimationCurve)` — overload selector"]
219 pub fn new(hit_stop_speed_curve: crate::unity_engine::animationcurve::AnimationCurve) -> Self {
220 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
221 panic!(
222 "{}
223::{}
224 failed to instantiate",
225 ::core::stringify!(HitStop),
226 ::core::stringify!(new),
227 )
228 });
229 <Self as IHitStopMethods>::ctor(this, hit_stop_speed_curve);
230 this
231 }
232}
233
234#[cfg(feature = "combat-hitstop")]
235#[doc(hidden)]
236pub mod prelude {
237 pub use super::{HitStop, IHitStop, IHitStopMethods};
238 pub use crate::system::object::IObject;
239 #[cfg(feature = "system-object")]
240 pub use crate::system::object::IObjectMethods;
241}