Skip to main content

engage/generated/unity_engine/
touch.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-touch-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/unity_engine/touch/Touch.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct Touch {
17        pub m_finger_id: i32,
18        pub m_position: crate::unity_engine::vector2::Vector2,
19        pub m_raw_position: crate::unity_engine::vector2::Vector2,
20        pub m_position_delta: crate::unity_engine::vector2::Vector2,
21        pub m_time_delta: f32,
22        pub m_tap_count: i32,
23        pub m_phase: crate::unity_engine::touchphase::TouchPhase,
24        pub m_type: crate::unity_engine::touchtype::TouchType,
25        pub m_pressure: f32,
26        pub m_maximum_possible_pressure: f32,
27        pub m_radius: f32,
28        pub m_radius_variance: f32,
29        pub m_altitude_angle: f32,
30        pub m_azimuth_angle: f32,
31    }
32    impl ::unity::ClassIdentity for Touch {
33        const NAME: &'static str = "Touch";
34        const NAMESPACE: &'static str = "UnityEngine";
35
36        fn class() -> ::unity::Class {
37            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
38            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
39        }
40    }
41    impl ::unity::IlType for Touch {
42        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
43            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
44        }
45    }
46}
47
48#[cfg(feature = "unity_engine-touch-types")]
49pub use __types::*;
50
51#[cfg(feature = "unity_engine-touch")]
52impl Touch {
53    #[doc = "`get_fingerId()` overload"]
54    pub fn get_finger_id(&mut self) -> i32 {
55        unsafe {
56            ::unity::il2cpp_call!((::unity::module_base()+0x3f3a640usize)as*mut u8,i32;
57(*mut Touch)self as*mut Touch)
58        }
59    }
60
61    #[doc = "`get_position()` overload"]
62    pub fn get_position(&mut self) -> crate::unity_engine::vector2::Vector2 {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x3f3a650usize)as*mut u8,crate::unity_engine::vector2::Vector2;
65(*mut Touch)self as*mut Touch)
66        }
67    }
68
69    #[doc = "`get_deltaPosition()` overload"]
70    pub fn get_delta_position(&mut self) -> crate::unity_engine::vector2::Vector2 {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x3f3a660usize)as*mut u8,crate::unity_engine::vector2::Vector2;
73(*mut Touch)self as*mut Touch)
74        }
75    }
76
77    #[doc = "`get_phase()` overload"]
78    pub fn get_phase(&mut self) -> crate::unity_engine::touchphase::TouchPhase {
79        unsafe {
80            ::unity::il2cpp_call!((::unity::module_base()+0x3f3a670usize)as*mut u8,crate::unity_engine::touchphase::TouchPhase;
81(*mut Touch)self as*mut Touch)
82        }
83    }
84
85    #[doc = "`get_type()` overload"]
86    pub fn get_type(&mut self) -> crate::unity_engine::touchtype::TouchType {
87        unsafe {
88            ::unity::il2cpp_call!((::unity::module_base()+0x3f3a680usize)as*mut u8,crate::unity_engine::touchtype::TouchType;
89(*mut Touch)self as*mut Touch)
90        }
91    }
92}
93
94#[cfg(feature = "unity_engine-touch")]
95impl Touch {
96    pub fn get_finger_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
97        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
98    }
99
100    pub fn get_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
102    }
103
104    pub fn get_delta_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
105        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
106    }
107
108    pub fn get_phase_method_info() -> &'static ::unity::il2cpp::MethodInfo {
109        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
110    }
111
112    pub fn get_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
113        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
114    }
115}
116
117#[cfg(feature = "unity_engine-touch")]
118#[doc(hidden)]
119pub mod prelude {
120    pub use super::Touch;
121    #[cfg(feature = "system-object")]
122    pub use crate::system::object::IObjectMethods;
123    #[cfg(feature = "system-valuetype")]
124    pub use crate::system::valuetype::IValueTypeMethods;
125    pub use crate::system::{object::IObject, valuetype::IValueType};
126}