engage/generated/app/
dir_2.rs1#[cfg(feature = "app-dir_2-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/app/dir_2/Dir_2.md"))]
15 #[::unity::class(namespace = "App", name = "Dir")]
16 #[parent(crate::system::object::Object)]
17 pub struct Dir_2 {}
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/dir_2/Dir_Type.md"))]
20 #[repr(C)]
21 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
22 pub struct Dir_Type {
23 pub value: u8,
24 }
25 impl ::unity::ClassIdentity for Dir_Type {
26 const NAME: &'static str = "Dir.Type";
27 const NAMESPACE: &'static str = "App";
28
29 fn class() -> ::unity::Class {
30 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
31 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
32 }
33 }
34 impl ::unity::IlType for Dir_Type {
35 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
36 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
37 }
38 }
39 impl Dir_Type {
40 pub fn left() -> Self {
41 Self { value: 1 }
42 }
43
44 pub fn right() -> Self {
45 Self { value: 2 }
46 }
47
48 pub fn down() -> Self {
49 Self { value: 4 }
50 }
51
52 pub fn up() -> Self {
53 Self { value: 8 }
54 }
55
56 pub fn center() -> Self {
57 Self { value: 32 }
58 }
59
60 pub fn terminate() -> Self {
61 Self { value: 128 }
62 }
63
64 pub fn none() -> Self {
65 Self { value: 0 }
66 }
67
68 pub fn up_left() -> Self {
69 Self { value: 9 }
70 }
71
72 pub fn up_right() -> Self {
73 Self { value: 10 }
74 }
75
76 pub fn down_left() -> Self {
77 Self { value: 5 }
78 }
79
80 pub fn down_right() -> Self {
81 Self { value: 6 }
82 }
83 }
84}
85
86#[cfg(feature = "app-dir_2-types")]
87pub use __types::*;
88
89#[cfg(feature = "app-dir_2")]
90impl Dir_2 {
91 #[doc = "`GetDir(i32, i32, i32, i32)` overload"]
92 pub fn get_dir(
93 sx: impl ::core::convert::Into<i32>,
94 sz: impl ::core::convert::Into<i32>,
95 tx: impl ::core::convert::Into<i32>,
96 tz: impl ::core::convert::Into<i32>,
97 ) -> crate::app::dir_2::Dir_Type {
98 unsafe {
99 ::unity::il2cpp_call!((::unity::module_base()+0x1cee110usize)as*mut u8,crate::app::dir_2::Dir_Type;
100(i32)::core::convert::Into::into(sx),(i32)::core::convert::Into::into(sz),(i32)::core::convert::Into::into(tx),(i32)::core::convert::Into::into(tz))
101 }
102 }
103
104 #[doc = "`GetReverse(crate::app::dir_2::Dir_Type)` overload"]
105 pub fn get_reverse(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> crate::app::dir_2::Dir_Type {
106 unsafe {
107 ::unity::il2cpp_call!((::unity::module_base()+0x1cee150usize)as*mut u8,crate::app::dir_2::Dir_Type;
108(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
109 }
110 }
111
112 #[doc = "`GetX(crate::app::dir_2::Dir_Type)` overload"]
113 pub fn get_x(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> i32 {
114 unsafe {
115 ::unity::il2cpp_call!((::unity::module_base()+0x1cee180usize)as*mut u8,i32;
116(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
117 }
118 }
119
120 #[doc = "`GetZ(crate::app::dir_2::Dir_Type)` overload"]
121 pub fn get_z(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> i32 {
122 unsafe {
123 ::unity::il2cpp_call!((::unity::module_base()+0x1cee1a0usize)as*mut u8,i32;
124(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
125 }
126 }
127
128 #[doc = "`IsTerminate(crate::app::dir_2::Dir_Type)` overload"]
129 pub fn is_terminate(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> bool {
130 unsafe {
131 ::unity::il2cpp_call!((::unity::module_base()+0x1cee1c0usize)as*mut u8,bool;
132(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
133 }
134 }
135
136 #[doc = "`GetAngle(crate::app::dir_2::Dir_Type)` overload"]
137 pub fn get_angle(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> i32 {
138 unsafe {
139 ::unity::il2cpp_call!((::unity::module_base()+0x1cee1d0usize)as*mut u8,i32;
140(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
141 }
142 }
143
144 #[doc = "`GetRotateL90(crate::app::dir_2::Dir_Type)` overload"]
145 pub fn get_rotate_l90(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> crate::app::dir_2::Dir_Type {
146 unsafe {
147 ::unity::il2cpp_call!((::unity::module_base()+0x1cee200usize)as*mut u8,crate::app::dir_2::Dir_Type;
148(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
149 }
150 }
151
152 #[doc = "`GetRotateR90(crate::app::dir_2::Dir_Type)` overload"]
153 pub fn get_rotate_r90(dir: impl ::core::convert::Into<crate::app::dir_2::Dir_Type>) -> crate::app::dir_2::Dir_Type {
154 unsafe {
155 ::unity::il2cpp_call!((::unity::module_base()+0x1cee240usize)as*mut u8,crate::app::dir_2::Dir_Type;
156(crate::app::dir_2::Dir_Type)::core::convert::Into::into(dir))
157 }
158 }
159}
160
161#[cfg(feature = "app-dir_2")]
162pub trait IDir_2Methods: IDir_2 {
163 #[doc = "`.ctor()` overload"]
164 fn ctor(self) -> () {
165 unsafe {
166 let __receiver = <Dir_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
167 ::unity::il2cpp_call!((::unity::module_base()+0x1cee280usize)as*mut u8,();
168(Dir_2)__receiver)
169 }
170 }
171}
172
173#[cfg(feature = "app-dir_2")]
174impl<__T: IDir_2> IDir_2Methods for __T {}
175
176#[cfg(feature = "app-dir_2")]
177impl Dir_2 {
178 pub fn get_dir_method_info() -> &'static ::unity::il2cpp::MethodInfo {
179 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
180 }
181
182 pub fn get_reverse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
183 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
184 }
185
186 pub fn get_x_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
188 }
189
190 pub fn get_z_method_info() -> &'static ::unity::il2cpp::MethodInfo {
191 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
192 }
193
194 pub fn is_terminate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
195 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
196 }
197
198 pub fn get_angle_method_info() -> &'static ::unity::il2cpp::MethodInfo {
199 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
200 }
201
202 pub fn get_rotate_l90_method_info() -> &'static ::unity::il2cpp::MethodInfo {
203 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
204 }
205
206 pub fn get_rotate_r90_method_info() -> &'static ::unity::il2cpp::MethodInfo {
207 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
208 }
209
210 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
211 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
212 }
213}
214
215#[cfg(feature = "app-dir_2")]
216impl Dir_2 {
217 #[doc = "`.ctor()` — no args"]
218 pub fn new() -> Self {
219 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
220 panic!(
221 "{}
222::{}
223 failed to instantiate",
224 ::core::stringify!(Dir_2),
225 ::core::stringify!(new),
226 )
227 });
228 <Self as IDir_2Methods>::ctor(this);
229 this
230 }
231}
232
233#[cfg(feature = "app-dir_2")]
234#[doc(hidden)]
235pub mod prelude {
236 pub use super::{Dir_2, Dir_Type, IDir_2, IDir_2Methods};
237 #[cfg(feature = "system-object")]
238 pub use crate::system::object::IObjectMethods;
239 #[cfg(feature = "system-enum")]
240 pub use crate::system::r#enum::IEnumMethods;
241 #[cfg(feature = "system-valuetype")]
242 pub use crate::system::valuetype::IValueTypeMethods;
243 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
244}