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