1#[cfg(feature = "combat-throwing-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 combat::launchbehaviour::{ILaunchBehaviour, LaunchBehaviour},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/combat/throwing/Throwing.md"))]
20 #[::unity::class(namespace = "Combat", name = "Throwing")]
21 #[parent(crate::combat::launchbehaviour::LaunchBehaviour)]
22 pub struct Throwing {
23 #[offset(56)]
24 #[rename(name = "Mass")]
25 pub mass: f32,
26 #[offset(60)]
27 #[rename(name = "FlySpeed")]
28 pub fly_speed: f32,
29 #[offset(64)]
30 #[rename(name = "LocalAngularVelocity")]
31 pub local_angular_velocity: f32,
32 #[offset(72)]
33 #[rename(name = "TrailPrefab")]
34 pub trail_prefab: crate::unity_engine::gameobject::GameObject,
35 #[offset(80)]
36 #[rename(name = "TrailParentNode")]
37 pub trail_parent_node: ::unity::Il2CppString,
38 #[offset(88)]
39 #[rename(name = "HitEffectPrefab")]
40 pub hit_effect_prefab: crate::unity_engine::gameobject::GameObject,
41 #[offset(96)]
42 #[rename(name = "m_ShootPassed")]
43 pub m_shoot_passed: bool,
44 #[offset(97)]
45 #[rename(name = "m_bReached")]
46 pub m_b_reached: bool,
47 #[offset(104)]
48 #[rename(name = "m_WeaponPrefab")]
49 pub m_weapon_prefab: crate::unity_engine::gameobject::GameObject,
50 #[offset(112)]
51 #[rename(name = "m_WeaponLength")]
52 pub m_weapon_length: f32,
53 #[offset(120)]
54 #[rename(name = "m_Parabola")]
55 pub m_parabola: crate::combat::parabola::Parabola,
56 #[offset(128)]
57 #[rename(name = "m_KnockoffAttack")]
58 pub m_knockoff_attack: i32,
59 }
60}
61
62#[cfg(feature = "combat-throwing-types")]
63pub use __types::*;
64
65#[cfg(feature = "combat-throwing")]
66pub trait IThrowingMethods: IThrowing {
67 #[doc = "`OnCharacterSetup(crate::combat::character::Character)` overload"]
68 fn on_character_setup(self, owner: impl ::core::convert::Into<crate::combat::character::Character>) -> () {
69 unsafe {
70 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
71 {
72 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
73 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
74 panic!(
75 "unity: virtual slot {}
76 out of range (vtable len {}
77) on the runtime class behind {}
78 (method `{}
79`)",
80 4usize,
81 __vt.len(),
82 <Throwing as ::unity::ClassIdentity>::NAME,
83 "OnCharacterSetup",
84 )
85 });
86 let __inner: extern "C" fn(Throwing, crate::combat::character::Character, ::unity::OptionalMethod) -> () =
87 ::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, ::core::convert::Into::into(owner), __mi)
90 }
91 }
92 }
93 #[doc = "`OnEnterAttack()` overload"]
94 fn on_enter_attack(self) -> () {
95 unsafe {
96 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
97 {
98 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
99 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
100 panic!(
101 "unity: virtual slot {}
102 out of range (vtable len {}
103) on the runtime class behind {}
104 (method `{}
105`)",
106 5usize,
107 __vt.len(),
108 <Throwing as ::unity::ClassIdentity>::NAME,
109 "OnEnterAttack",
110 )
111 });
112 let __inner: extern "C" fn(Throwing, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
113 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
114 __inner(__receiver, __mi)
115 }
116 }
117 }
118 #[doc = "`OnHitTimePredicted(f32)` overload"]
119 fn on_hit_time_predicted(self, world_hit_time: impl ::core::convert::Into<f32>) -> () {
120 unsafe {
121 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122 {
123 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
125 panic!(
126 "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131 6usize,
132 __vt.len(),
133 <Throwing as ::unity::ClassIdentity>::NAME,
134 "OnHitTimePredicted",
135 )
136 });
137 let __inner: extern "C" fn(Throwing, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
138 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
139 __inner(__receiver, ::core::convert::Into::into(world_hit_time), __mi)
140 }
141 }
142 }
143 #[doc = "`OnReached()` overload"]
144 fn on_reached(self) -> () {
145 unsafe {
146 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
147 ::unity::il2cpp_call!((::unity::module_base()+0x21eafa0usize)as*mut u8,();
148(Throwing)__receiver)
149 }
150 }
151 #[doc = "`FlyingHitReaction(crate::combat::phase::Phase)` overload"]
152 fn flying_hit_reaction(self, phase: impl ::core::convert::Into<crate::combat::phase::Phase>) -> () {
153 unsafe {
154 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
155 ::unity::il2cpp_call!((::unity::module_base()+0x21eb460usize)as*mut u8,();
156(Throwing)__receiver,(crate::combat::phase::Phase)::core::convert::Into::into(phase))
157 }
158 }
159 #[doc = "`OnHit()` overload"]
160 fn on_hit(self) -> () {
161 unsafe {
162 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
163 ::unity::il2cpp_call!((::unity::module_base()+0x21eb500usize)as*mut u8,();
164(Throwing)__receiver)
165 }
166 }
167 #[doc = "`OnMiss()` overload"]
168 fn on_miss(self) -> () {
169 unsafe {
170 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
171 ::unity::il2cpp_call!((::unity::module_base()+0x21eb740usize)as*mut u8,();
172(Throwing)__receiver)
173 }
174 }
175 #[doc = "`OnGuard()` overload"]
176 fn on_guard(self) -> () {
177 unsafe {
178 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
179 ::unity::il2cpp_call!((::unity::module_base()+0x21eb750usize)as*mut u8,();
180(Throwing)__receiver)
181 }
182 }
183 #[doc = "`OnKnockoff()` overload"]
184 fn on_knockoff(self) -> () {
185 unsafe {
186 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187 ::unity::il2cpp_call!((::unity::module_base()+0x21eb840usize)as*mut u8,();
188(Throwing)__receiver)
189 }
190 }
191 #[doc = "`発射()` overload"]
192 fn 発射(self) -> () {
193 unsafe {
194 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
195 ::unity::il2cpp_call!((::unity::module_base()+0x21eb0e0usize)as*mut u8,();
196(Throwing)__receiver)
197 }
198 }
199 #[doc = "`CalcAimPosition(crate::combat::character::Character, i32)` overload"]
200 fn calc_aim_position(
201 self,
202 enemy: impl ::core::convert::Into<crate::combat::character::Character>,
203 knockoff_attack: impl ::core::convert::Into<i32>,
204 ) -> crate::unity_engine::vector3::Vector3 {
205 unsafe {
206 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
207 ::unity::il2cpp_call!((::unity::module_base()+0x21eae40usize)as*mut u8,crate::unity_engine::vector3::Vector3;
208(Throwing)__receiver,(crate::combat::character::Character)::core::convert::Into::into(enemy),(i32)::core::convert::Into::into(knockoff_attack))
209 }
210 }
211 #[doc = "`RecalcFlyingTime()` overload"]
212 fn recalc_flying_time(self) -> () {
213 unsafe {
214 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
215 {
216 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
217 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
218 panic!(
219 "unity: virtual slot {}
220 out of range (vtable len {}
221) on the runtime class behind {}
222 (method `{}
223`)",
224 7usize,
225 __vt.len(),
226 <Throwing as ::unity::ClassIdentity>::NAME,
227 "RecalcFlyingTime",
228 )
229 });
230 let __inner: extern "C" fn(Throwing, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
231 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
232 __inner(__receiver, __mi)
233 }
234 }
235 }
236 #[doc = "`.ctor()` overload"]
237 fn ctor(self) -> () {
238 unsafe {
239 let __receiver = <Throwing as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
240 ::unity::il2cpp_call!((::unity::module_base()+0x21ebc60usize)as*mut u8,();
241(Throwing)__receiver)
242 }
243 }
244}
245
246#[cfg(feature = "combat-throwing")]
247impl<__T: IThrowing> IThrowingMethods for __T {}
248
249#[cfg(feature = "combat-throwing")]
250impl Throwing {
251 pub fn on_character_setup_method_info() -> &'static ::unity::il2cpp::MethodInfo {
252 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
253 }
254
255 pub fn on_enter_attack_method_info() -> &'static ::unity::il2cpp::MethodInfo {
256 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
257 }
258
259 pub fn on_hit_time_predicted_method_info() -> &'static ::unity::il2cpp::MethodInfo {
260 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
261 }
262
263 pub fn on_reached_method_info() -> &'static ::unity::il2cpp::MethodInfo {
264 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
265 }
266
267 pub fn flying_hit_reaction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
268 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
269 }
270
271 pub fn on_hit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
272 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
273 }
274
275 pub fn on_miss_method_info() -> &'static ::unity::il2cpp::MethodInfo {
276 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
277 }
278
279 pub fn on_guard_method_info() -> &'static ::unity::il2cpp::MethodInfo {
280 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
281 }
282
283 pub fn on_knockoff_method_info() -> &'static ::unity::il2cpp::MethodInfo {
284 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
285 }
286
287 pub fn 発射_method_info() -> &'static ::unity::il2cpp::MethodInfo {
288 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
289 }
290
291 pub fn calc_aim_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
292 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
293 }
294
295 pub fn recalc_flying_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
296 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
297 }
298
299 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
300 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
301 }
302}
303
304#[cfg(feature = "combat-throwing")]
305impl Throwing {
306 #[doc = "Direct (non-virtual) call to `Throwing`'s own `OnCharacterSetup`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
307 pub unsafe fn on_character_setup(this: impl ::core::convert::Into<::unity::IlInstance>, owner: crate::combat::character::Character) -> () {
308 let __mi = Self::on_character_setup_method_info();
309 let __inner: extern "C" fn(::unity::IlInstance, crate::combat::character::Character, ::unity::OptionalMethod) -> () =
310 ::core::mem::transmute(__mi.method_ptr);
311 __inner(this.into(), owner, ::core::option::Option::None)
312 }
313
314 #[doc = "Direct (non-virtual) call to `Throwing`'s own `OnEnterAttack`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
315 pub unsafe fn on_enter_attack(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
316 let __mi = Self::on_enter_attack_method_info();
317 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
318 __inner(this.into(), ::core::option::Option::None)
319 }
320
321 #[doc = "Direct (non-virtual) call to `Throwing`'s own `OnHitTimePredicted`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
322 pub unsafe fn on_hit_time_predicted(this: impl ::core::convert::Into<::unity::IlInstance>, world_hit_time: f32) -> () {
323 let __mi = Self::on_hit_time_predicted_method_info();
324 let __inner: extern "C" fn(::unity::IlInstance, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
325 __inner(this.into(), world_hit_time, ::core::option::Option::None)
326 }
327
328 #[doc = "Direct (non-virtual) call to `Throwing`'s own `RecalcFlyingTime`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
329 pub unsafe fn recalc_flying_time(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
330 let __mi = Self::recalc_flying_time_method_info();
331 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
332 __inner(this.into(), ::core::option::Option::None)
333 }
334}
335
336#[cfg(feature = "combat-throwing")]
337impl Throwing {
338 #[doc = "`.ctor()` — no args"]
339 pub fn new() -> Self {
340 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
341 panic!(
342 "{}
343::{}
344 failed to instantiate",
345 ::core::stringify!(Throwing),
346 ::core::stringify!(new),
347 )
348 });
349 <Self as IThrowingMethods>::ctor(this);
350 this
351 }
352}
353
354#[cfg(feature = "combat-throwing")]
355#[doc(hidden)]
356pub mod prelude {
357 pub use super::{IThrowing, IThrowingMethods, Throwing};
358 #[cfg(feature = "combat-launchbehaviour")]
359 pub use crate::combat::launchbehaviour::ILaunchBehaviourMethods;
360 #[cfg(feature = "system-object")]
361 pub use crate::system::object::IObjectMethods;
362 #[cfg(feature = "unity_engine-behaviour")]
363 pub use crate::unity_engine::behaviour::IBehaviourMethods;
364 #[cfg(feature = "unity_engine-component")]
365 pub use crate::unity_engine::component::IComponentMethods;
366 #[cfg(feature = "unity_engine-monobehaviour")]
367 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
368 #[cfg(feature = "unity_engine-object_2")]
369 pub use crate::unity_engine::object_2::IObject_2Methods;
370 pub use crate::{
371 combat::launchbehaviour::ILaunchBehaviour,
372 system::object::IObject,
373 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
374 };
375}