1#[cfg(feature = "app-unitpool-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/app/unitpool/UnitPool.md"))]
11 #[::unity::class(namespace = "App", name = "UnitPool")]
12 #[parent(crate::system::object::Object)]
13 pub struct UnitPool {
14 #[static_field]
15 #[rename(name = "UnitMax")]
16 pub unit_max: i32,
17 #[static_field]
18 #[rename(name = "MapForceUnitMax")]
19 pub map_force_unit_max: i32,
20 #[static_field]
21 #[rename(name = "GuestMax")]
22 pub guest_max: i32,
23 #[static_field]
24 #[rename(name = "Version")]
25 pub version: i32,
26 #[static_field]
27 #[rename(name = "s_Units")]
28 pub s_units: ::unity::Array<crate::app::unit::Unit>,
29 #[static_field]
30 #[rename(name = "s_Forces")]
31 pub s_forces: ::unity::Array<crate::app::force::Force>,
32 }
33}
34
35#[cfg(feature = "app-unitpool-types")]
36pub use __types::*;
37
38#[cfg(feature = "app-unitpool")]
39impl UnitPool {
40 #[doc = "`Initialize()` overload"]
41 pub fn initialize() -> () {
42 unsafe {
43 ::unity::il2cpp_call!((::unity::module_base()+0x1c53550usize)as*mut u8,();
44 )
45 }
46 }
47
48 #[doc = "`Reset()` overload"]
49 pub fn reset() -> () {
50 unsafe {
51 ::unity::il2cpp_call!((::unity::module_base()+0x1c53990usize)as*mut u8,();
52 )
53 }
54 }
55
56 #[doc = "`GetCount(u32)` overload"]
57 pub fn get_count(force_mask: impl ::core::convert::Into<u32>) -> i32 {
58 unsafe {
59 ::unity::il2cpp_call!((::unity::module_base()+0x1c53ba0usize)as*mut u8,i32;
60(u32)::core::convert::Into::into(force_mask))
61 }
62 }
63
64 #[doc = "`Get(i32)` overload"]
65 pub fn get(index: impl ::core::convert::Into<i32>) -> crate::app::unit::Unit {
66 unsafe {
67 ::unity::il2cpp_call!((::unity::module_base()+0x1c53f80usize)as*mut u8,crate::app::unit::Unit;
68(i32)::core::convert::Into::into(index))
69 }
70 }
71
72 #[doc = "`GetDirect(i32)` overload"]
73 pub fn get_direct(index: impl ::core::convert::Into<i32>) -> crate::app::unit::Unit {
74 unsafe {
75 ::unity::il2cpp_call!((::unity::module_base()+0x1c54010usize)as*mut u8,crate::app::unit::Unit;
76(i32)::core::convert::Into::into(index))
77 }
78 }
79
80 #[doc = "`GetFirst(u32, i32)` overload"]
81 pub fn get_first(force_mask: impl ::core::convert::Into<u32>, start_force_index: impl ::core::convert::Into<i32>) -> crate::app::unit::Unit {
82 unsafe {
83 ::unity::il2cpp_call!((::unity::module_base()+0x1c54090usize)as*mut u8,crate::app::unit::Unit;
84(u32)::core::convert::Into::into(force_mask),(i32)::core::convert::Into::into(start_force_index))
85 }
86 }
87
88 #[doc = "`GetLast(u32, i32)` overload"]
89 pub fn get_last(force_mask: impl ::core::convert::Into<u32>, start_force_index: impl ::core::convert::Into<i32>) -> crate::app::unit::Unit {
90 unsafe {
91 ::unity::il2cpp_call!((::unity::module_base()+0x1c541d0usize)as*mut u8,crate::app::unit::Unit;
92(u32)::core::convert::Into::into(force_mask),(i32)::core::convert::Into::into(start_force_index))
93 }
94 }
95
96 #[doc = "`GetHero(bool)` overload"]
97 pub fn get_hero(consider_relay: impl ::core::convert::Into<bool>) -> crate::app::unit::Unit {
98 unsafe {
99 ::unity::il2cpp_call!((::unity::module_base()+0x1c54280usize)as*mut u8,crate::app::unit::Unit;
100(bool)::core::convert::Into::into(consider_relay))
101 }
102 }
103
104 #[doc = "`GetFromPerson(crate::app::persondata::PersonData, bool)` overload"]
105 pub fn get_from_person(
106 person: impl ::core::convert::Into<crate::app::persondata::PersonData>,
107 consider_relay: impl ::core::convert::Into<bool>,
108 ) -> crate::app::unit::Unit {
109 unsafe {
110 ::unity::il2cpp_call!((::unity::module_base()+0x1c548d0usize)as*mut u8,crate::app::unit::Unit;
111(crate::app::persondata::PersonData)::core::convert::Into::into(person),(bool)::core::convert::Into::into(consider_relay))
112 }
113 }
114
115 #[doc = "`TryGetFromPerson(::unity::Il2CppString, bool)` overload"]
116 pub fn try_get_from_person(
117 pid: impl ::core::convert::Into<::unity::Il2CppString>,
118 consider_relay: impl ::core::convert::Into<bool>,
119 ) -> crate::app::unit::Unit {
120 unsafe {
121 ::unity::il2cpp_call!((::unity::module_base()+0x1c54ef0usize)as*mut u8,crate::app::unit::Unit;
122(::unity::Il2CppString)::core::convert::Into::into(pid),(bool)::core::convert::Into::into(consider_relay))
123 }
124 }
125
126 #[doc = "`GetFromPerson(::unity::Il2CppString, bool)` overload"]
127 pub fn get_from_person_2(
128 pid: impl ::core::convert::Into<::unity::Il2CppString>,
129 consider_relay: impl ::core::convert::Into<bool>,
130 ) -> crate::app::unit::Unit {
131 unsafe {
132 ::unity::il2cpp_call!((::unity::module_base()+0x1c54fa0usize)as*mut u8,crate::app::unit::Unit;
133(::unity::Il2CppString)::core::convert::Into::into(pid),(bool)::core::convert::Into::into(consider_relay))
134 }
135 }
136
137 #[doc = "`GetFromPerson(crate::app::persondata::PersonData, u32)` overload"]
138 pub fn get_from_person_3(
139 person: impl ::core::convert::Into<crate::app::persondata::PersonData>,
140 force_mask: impl ::core::convert::Into<u32>,
141 ) -> crate::app::unit::Unit {
142 unsafe {
143 ::unity::il2cpp_call!((::unity::module_base()+0x1c55030usize)as*mut u8,crate::app::unit::Unit;
144(crate::app::persondata::PersonData)::core::convert::Into::into(person),(u32)::core::convert::Into::into(force_mask))
145 }
146 }
147
148 #[doc = "`GetFromPerson(::unity::Il2CppString, u32)` overload"]
149 pub fn get_from_person_4(
150 pid: impl ::core::convert::Into<::unity::Il2CppString>,
151 force_mask: impl ::core::convert::Into<u32>,
152 ) -> crate::app::unit::Unit {
153 unsafe {
154 ::unity::il2cpp_call!((::unity::module_base()+0x1c552f0usize)as*mut u8,crate::app::unit::Unit;
155(::unity::Il2CppString)::core::convert::Into::into(pid),(u32)::core::convert::Into::into(force_mask))
156 }
157 }
158
159 #[doc = "`GetFromFace(crate::app::persondata::PersonData, bool)` overload"]
160 pub fn get_from_face(
161 person: impl ::core::convert::Into<crate::app::persondata::PersonData>,
162 consider_relay: impl ::core::convert::Into<bool>,
163 ) -> crate::app::unit::Unit {
164 unsafe {
165 ::unity::il2cpp_call!((::unity::module_base()+0x1c55380usize)as*mut u8,crate::app::unit::Unit;
166(crate::app::persondata::PersonData)::core::convert::Into::into(person),(bool)::core::convert::Into::into(consider_relay))
167 }
168 }
169
170 #[doc = "`GetFromFace(::unity::Il2CppString, bool)` overload"]
171 pub fn get_from_face_2(
172 pid: impl ::core::convert::Into<::unity::Il2CppString>,
173 consider_relay: impl ::core::convert::Into<bool>,
174 ) -> crate::app::unit::Unit {
175 unsafe {
176 ::unity::il2cpp_call!((::unity::module_base()+0x1c55610usize)as*mut u8,crate::app::unit::Unit;
177(::unity::Il2CppString)::core::convert::Into::into(pid),(bool)::core::convert::Into::into(consider_relay))
178 }
179 }
180
181 #[doc = "`GetForce(i32)` overload"]
182 pub fn get_force(index: impl ::core::convert::Into<i32>) -> crate::app::force::Force {
183 unsafe {
184 ::unity::il2cpp_call!((::unity::module_base()+0x1c54150usize)as*mut u8,crate::app::force::Force;
185(i32)::core::convert::Into::into(index))
186 }
187 }
188
189 #[doc = "`Serialize(crate::app::stream_2::Stream_2, u32)` overload"]
190 pub fn serialize(stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>, force_mask: impl ::core::convert::Into<u32>) -> () {
191 unsafe {
192 ::unity::il2cpp_call!((::unity::module_base()+0x1c556a0usize)as*mut u8,();
193(crate::app::stream_2::Stream_2)::core::convert::Into::into(stream),(u32)::core::convert::Into::into(force_mask))
194 }
195 }
196
197 #[doc = "`Deserialize(crate::app::stream_2::Stream_2)` overload"]
198 pub fn deserialize(stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>) -> () {
199 unsafe {
200 ::unity::il2cpp_call!((::unity::module_base()+0x1c557e0usize)as*mut u8,();
201(crate::app::stream_2::Stream_2)::core::convert::Into::into(stream))
202 }
203 }
204
205 #[doc = "`DeserializeForOnline(crate::app::stream_2::Stream_2)` overload"]
206 pub fn deserialize_for_online(stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>) -> () {
207 unsafe {
208 ::unity::il2cpp_call!((::unity::module_base()+0x1c55b40usize)as*mut u8,();
209(crate::app::stream_2::Stream_2)::core::convert::Into::into(stream))
210 }
211 }
212
213 #[doc = "`DeserializeImpl(crate::app::stream_2::Stream_2, bool)` overload"]
214 pub fn deserialize_impl(stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>, is_online: impl ::core::convert::Into<bool>) -> () {
215 unsafe {
216 ::unity::il2cpp_call!((::unity::module_base()+0x1c557f0usize)as*mut u8,();
217(crate::app::stream_2::Stream_2)::core::convert::Into::into(stream),(bool)::core::convert::Into::into(is_online))
218 }
219 }
220
221 #[doc = "`CalcIdent(crate::app::unit::Unit)` overload"]
222 pub fn calc_ident(unit: impl ::core::convert::Into<crate::app::unit::Unit>) -> i32 {
223 unsafe {
224 ::unity::il2cpp_call!((::unity::module_base()+0x1c55b50usize)as*mut u8,i32;
225(crate::app::unit::Unit)::core::convert::Into::into(unit))
226 }
227 }
228
229 #[doc = "`GetFromIdent(crate::app::force::Force_Type, i32)` overload"]
230 pub fn get_from_ident(
231 force: impl ::core::convert::Into<crate::app::force::Force_Type>,
232 ident: impl ::core::convert::Into<i32>,
233 ) -> crate::app::unit::Unit {
234 unsafe {
235 ::unity::il2cpp_call!((::unity::module_base()+0x1c55e50usize)as*mut u8,crate::app::unit::Unit;
236(crate::app::force::Force_Type)::core::convert::Into::into(force),(i32)::core::convert::Into::into(ident))
237 }
238 }
239
240 #[doc = "`GetEnemyIdent(crate::app::force::Force_Type, i32)` overload"]
241 pub fn get_enemy_ident(
242 force: impl ::core::convert::Into<crate::app::force::Force_Type>,
243 ident: impl ::core::convert::Into<i32>,
244 ) -> crate::app::unit::Unit {
245 unsafe {
246 ::unity::il2cpp_call!((::unity::module_base()+0x1c56230usize)as*mut u8,crate::app::unit::Unit;
247(crate::app::force::Force_Type)::core::convert::Into::into(force),(i32)::core::convert::Into::into(ident))
248 }
249 }
250
251 #[doc = "`Dump()` overload"]
252 pub fn dump() -> () {
253 unsafe {
254 ::unity::il2cpp_call!((::unity::module_base()+0x1c567d0usize)as*mut u8,();
255 )
256 }
257 }
258}
259
260#[cfg(feature = "app-unitpool")]
261pub trait IUnitPoolMethods: IUnitPool {
262 #[doc = "`.ctor()` overload"]
263 fn ctor(self) -> () {
264 unsafe {
265 let __receiver = <UnitPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
266 ::unity::il2cpp_call!((::unity::module_base()+0x1c567e0usize)as*mut u8,();
267(UnitPool)__receiver)
268 }
269 }
270}
271
272#[cfg(feature = "app-unitpool")]
273impl<__T: IUnitPool> IUnitPoolMethods for __T {}
274
275#[cfg(feature = "app-unitpool")]
276impl UnitPool {
277 pub fn initialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
279 }
280
281 pub fn reset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
283 }
284
285 pub fn get_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
287 }
288
289 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
291 }
292
293 pub fn get_direct_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
295 }
296
297 pub fn get_first_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
299 }
300
301 pub fn get_last_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
303 }
304
305 pub fn get_hero_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
307 }
308
309 pub fn get_from_person_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
311 }
312
313 pub fn try_get_from_person_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
315 }
316
317 pub fn get_from_person_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
319 }
320
321 pub fn get_from_person_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
323 }
324
325 pub fn get_from_person_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
327 }
328
329 pub fn get_from_face_method_info() -> &'static ::unity::il2cpp::MethodInfo {
330 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
331 }
332
333 pub fn get_from_face_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
334 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
335 }
336
337 pub fn get_force_method_info() -> &'static ::unity::il2cpp::MethodInfo {
338 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
339 }
340
341 pub fn serialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
342 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
343 }
344
345 pub fn deserialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
346 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
347 }
348
349 pub fn deserialize_for_online_method_info() -> &'static ::unity::il2cpp::MethodInfo {
350 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
351 }
352
353 pub fn deserialize_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
354 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
355 }
356
357 pub fn calc_ident_method_info() -> &'static ::unity::il2cpp::MethodInfo {
358 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
359 }
360
361 pub fn get_from_ident_method_info() -> &'static ::unity::il2cpp::MethodInfo {
362 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
363 }
364
365 pub fn get_enemy_ident_method_info() -> &'static ::unity::il2cpp::MethodInfo {
366 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
367 }
368
369 pub fn dump_method_info() -> &'static ::unity::il2cpp::MethodInfo {
370 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
371 }
372
373 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
374 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
375 }
376}
377
378#[cfg(feature = "app-unitpool")]
379impl UnitPool {
380 #[doc = "`.ctor()` — no args"]
381 pub fn new() -> Self {
382 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
383 panic!(
384 "{}
385::{}
386 failed to instantiate",
387 ::core::stringify!(UnitPool),
388 ::core::stringify!(new),
389 )
390 });
391 <Self as IUnitPoolMethods>::ctor(this);
392 this
393 }
394}
395
396#[cfg(feature = "app-unitpool")]
397#[doc(hidden)]
398pub mod prelude {
399 pub use super::{IUnitPool, IUnitPoolMethods, UnitPool};
400 pub use crate::system::object::IObject;
401 #[cfg(feature = "system-object")]
402 pub use crate::system::object::IObjectMethods;
403}