engage/generated/nn/hid/
analogstickstate.rs1#[cfg(feature = "nn-hid-analogstickstate-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/nn/hid/analogstickstate/AnalogStickState.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct AnalogStickState {
17 pub x: i32,
18 pub y: i32,
19 }
20 impl ::unity::ClassIdentity for AnalogStickState {
21 const NAME: &'static str = "AnalogStickState";
22 const NAMESPACE: &'static str = "nn.hid";
23
24 fn class() -> ::unity::Class {
25 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27 }
28 }
29 impl ::unity::IlType for AnalogStickState {
30 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32 }
33 }
34 impl AnalogStickState {
35 #[inline]
36 pub fn max() -> i32 {
37 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
38 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Max");
39 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
40 }
41
42 #[inline]
43 pub fn set_max(value: i32) {
44 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
45 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Max");
46 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
47 }
48 }
49}
50
51#[cfg(feature = "nn-hid-analogstickstate-types")]
52pub use __types::*;
53
54#[cfg(feature = "nn-hid-analogstickstate")]
55impl AnalogStickState {
56 #[doc = "`get_fx()` overload"]
57 pub fn get_fx(&mut self) -> f32 {
58 unsafe {
59 ::unity::il2cpp_call!((::unity::module_base()+0x1c8d790usize)as*mut u8,f32;
60(*mut AnalogStickState)self as*mut AnalogStickState)
61 }
62 }
63
64 #[doc = "`get_fy()` overload"]
65 pub fn get_fy(&mut self) -> f32 {
66 unsafe {
67 ::unity::il2cpp_call!((::unity::module_base()+0x1c8d7b0usize)as*mut u8,f32;
68(*mut AnalogStickState)self as*mut AnalogStickState)
69 }
70 }
71
72 #[doc = "`Clear()` overload"]
73 pub fn clear(&mut self) -> () {
74 unsafe {
75 ::unity::il2cpp_call!((::unity::module_base()+0x1c8d7d0usize)as*mut u8,();
76(*mut AnalogStickState)self as*mut AnalogStickState)
77 }
78 }
79
80 #[doc = "`ToString()` overload"]
81 pub fn to_string(&mut self) -> ::unity::Il2CppString {
82 unsafe {
83 ::unity::il2cpp_call!((::unity::module_base()+0x1c8d7e0usize)as*mut u8, ::unity::Il2CppString;
84(*mut AnalogStickState)self as*mut AnalogStickState)
85 }
86 }
87}
88
89#[cfg(feature = "nn-hid-analogstickstate")]
90impl AnalogStickState {
91 pub fn get_fx_method_info() -> &'static ::unity::il2cpp::MethodInfo {
92 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
93 }
94
95 pub fn get_fy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
96 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
97 }
98
99 pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
100 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
101 }
102
103 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
104 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
105 }
106}
107
108#[cfg(feature = "nn-hid-analogstickstate")]
109#[doc(hidden)]
110pub mod prelude {
111 pub use super::AnalogStickState;
112 #[cfg(feature = "system-object")]
113 pub use crate::system::object::IObjectMethods;
114 #[cfg(feature = "system-valuetype")]
115 pub use crate::system::valuetype::IValueTypeMethods;
116 pub use crate::system::{object::IObject, valuetype::IValueType};
117}