Skip to main content

engage/generated/tm_pro/
colortween_2.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "tm_pro-colortween_2-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::{
10            object::{IObject, Object},
11            r#enum::{Enum, IEnum},
12            valuetype::{IValueType, ValueType},
13        },
14        unity_engine::events::{
15            unityevent_1::{IUnityEvent_1, UnityEvent_1},
16            unityeventbase::{IUnityEventBase, UnityEventBase},
17        },
18    };
19
20    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/tm_pro/colortween_2/ColorTween_ColorTweenMode_2.md"))]
21    #[repr(C)]
22    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
23    pub struct ColorTween_ColorTweenMode_2 {
24        pub value: i32,
25    }
26    impl ::unity::ClassIdentity for ColorTween_ColorTweenMode_2 {
27        const NAME: &'static str = "ColorTween.ColorTweenMode";
28        const NAMESPACE: &'static str = "TMPro";
29
30        fn class() -> ::unity::Class {
31            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
32            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
33        }
34    }
35    impl ::unity::IlType for ColorTween_ColorTweenMode_2 {
36        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
37            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
38        }
39    }
40    impl ColorTween_ColorTweenMode_2 {
41        pub fn all() -> Self {
42            Self { value: 0 }
43        }
44
45        pub fn rgb() -> Self {
46            Self { value: 1 }
47        }
48
49        pub fn alpha() -> Self {
50            Self { value: 2 }
51        }
52    }
53
54    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/tm_pro/colortween_2/ColorTween_2.md"))]
55    #[repr(C)]
56    #[derive(::core::clone::Clone, ::core::marker::Copy)]
57    pub struct ColorTween_2 {
58        pub m_target: crate::tm_pro::colortween_2::ColorTween_ColorTweenCallback_2,
59        pub m_start_color: crate::unity_engine::color::Color,
60        pub m_target_color: crate::unity_engine::color::Color,
61        pub m_tween_mode: crate::tm_pro::colortween_2::ColorTween_ColorTweenMode_2,
62        pub m_duration: f32,
63        pub m_ignore_time_scale: bool,
64    }
65    impl ::unity::ClassIdentity for ColorTween_2 {
66        const NAME: &'static str = "ColorTween";
67        const NAMESPACE: &'static str = "TMPro";
68
69        fn class() -> ::unity::Class {
70            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
71            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
72        }
73    }
74    impl ::unity::IlType for ColorTween_2 {
75        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
76            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
77        }
78    }
79
80    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/tm_pro/colortween_2/ColorTween_ColorTweenCallback_2.md"))]
81    #[::unity::class(namespace = "TMPro", name = "ColorTween.ColorTweenCallback")]
82    #[parent(crate::unity_engine::events::unityevent_1::UnityEvent_1<crate::unity_engine::color::Color>)]
83    pub struct ColorTween_ColorTweenCallback_2 {}
84}
85
86#[cfg(feature = "tm_pro-colortween_2-types")]
87pub use __types::*;
88
89#[cfg(feature = "tm_pro-colortween_2")]
90impl ColorTween_2 {
91    #[doc = "`get_startColor()` overload"]
92    pub fn get_start_color(&mut self) -> crate::unity_engine::color::Color {
93        unsafe {
94            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b310usize)as*mut u8,crate::unity_engine::color::Color;
95(*mut ColorTween_2)self as*mut ColorTween_2)
96        }
97    }
98
99    #[doc = "`set_startColor(crate::unity_engine::color::Color)` overload"]
100    pub fn set_start_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
101        unsafe {
102            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b320usize)as*mut u8,();
103(*mut ColorTween_2)self as*mut ColorTween_2,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
104        }
105    }
106
107    #[doc = "`get_targetColor()` overload"]
108    pub fn get_target_color(&mut self) -> crate::unity_engine::color::Color {
109        unsafe {
110            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b340usize)as*mut u8,crate::unity_engine::color::Color;
111(*mut ColorTween_2)self as*mut ColorTween_2)
112        }
113    }
114
115    #[doc = "`set_targetColor(crate::unity_engine::color::Color)` overload"]
116    pub fn set_target_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
117        unsafe {
118            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b350usize)as*mut u8,();
119(*mut ColorTween_2)self as*mut ColorTween_2,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
120        }
121    }
122
123    #[doc = "`get_tweenMode()` overload"]
124    pub fn get_tween_mode(&mut self) -> crate::tm_pro::colortween_2::ColorTween_ColorTweenMode_2 {
125        unsafe {
126            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b370usize)as*mut u8,crate::tm_pro::colortween_2::ColorTween_ColorTweenMode_2;
127(*mut ColorTween_2)self as*mut ColorTween_2)
128        }
129    }
130
131    #[doc = "`set_tweenMode(crate::tm_pro::colortween_2::ColorTween_ColorTweenMode_2)` overload"]
132    pub fn set_tween_mode(&mut self, value: impl ::core::convert::Into<crate::tm_pro::colortween_2::ColorTween_ColorTweenMode_2>) -> () {
133        unsafe {
134            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b380usize)as*mut u8,();
135(*mut ColorTween_2)self as*mut ColorTween_2,(crate::tm_pro::colortween_2::ColorTween_ColorTweenMode_2)::core::convert::Into::into(value))
136        }
137    }
138
139    #[doc = "`get_duration()` overload"]
140    pub fn get_duration(&mut self) -> f32 {
141        unsafe {
142            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b390usize)as*mut u8,f32;
143(*mut ColorTween_2)self as*mut ColorTween_2)
144        }
145    }
146
147    #[doc = "`set_duration(f32)` overload"]
148    pub fn set_duration(&mut self, value: impl ::core::convert::Into<f32>) -> () {
149        unsafe {
150            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b3a0usize)as*mut u8,();
151(*mut ColorTween_2)self as*mut ColorTween_2,(f32)::core::convert::Into::into(value))
152        }
153    }
154
155    #[doc = "`get_ignoreTimeScale()` overload"]
156    pub fn get_ignore_time_scale(&mut self) -> bool {
157        unsafe {
158            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b3b0usize)as*mut u8,bool;
159(*mut ColorTween_2)self as*mut ColorTween_2)
160        }
161    }
162
163    #[doc = "`set_ignoreTimeScale(bool)` overload"]
164    pub fn set_ignore_time_scale(&mut self, value: impl ::core::convert::Into<bool>) -> () {
165        unsafe {
166            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b3c0usize)as*mut u8,();
167(*mut ColorTween_2)self as*mut ColorTween_2,(bool)::core::convert::Into::into(value))
168        }
169    }
170
171    #[doc = "`TweenValue(f32)` overload"]
172    pub fn tween_value(&mut self, float_percentage: impl ::core::convert::Into<f32>) -> () {
173        unsafe {
174            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b3d0usize)as*mut u8,();
175(*mut ColorTween_2)self as*mut ColorTween_2,(f32)::core::convert::Into::into(float_percentage))
176        }
177    }
178
179    #[doc = "`AddOnChangedCallback(crate::unity_engine::events::unityaction_1::UnityAction_1<crate::unity_engine::color::Color>)` overload"]
180    pub fn add_on_changed_callback(
181        &mut self,
182        callback: impl ::core::convert::Into<crate::unity_engine::events::unityaction_1::UnityAction_1<crate::unity_engine::color::Color>>,
183    ) -> () {
184        unsafe {
185            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b4a0usize)as*mut u8,();
186(*mut ColorTween_2)self as*mut ColorTween_2,(crate::unity_engine::events::unityaction_1::UnityAction_1<crate::unity_engine::color::Color>)::core::convert::Into::into(callback))
187        }
188    }
189
190    #[doc = "`GetIgnoreTimescale()` overload"]
191    pub fn get_ignore_timescale(&mut self) -> bool {
192        unsafe {
193            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b540usize)as*mut u8,bool;
194(*mut ColorTween_2)self as*mut ColorTween_2)
195        }
196    }
197
198    #[doc = "`ValidTarget()` overload"]
199    pub fn valid_target(&mut self) -> bool {
200        unsafe {
201            ::unity::il2cpp_call!((::unity::module_base()+0x2d8b490usize)as*mut u8,bool;
202(*mut ColorTween_2)self as*mut ColorTween_2)
203        }
204    }
205}
206
207#[cfg(feature = "tm_pro-colortween_2")]
208impl ColorTween_2 {
209    pub fn get_start_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
211    }
212
213    pub fn set_start_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
215    }
216
217    pub fn get_target_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
219    }
220
221    pub fn set_target_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
223    }
224
225    pub fn get_tween_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
227    }
228
229    pub fn set_tween_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
231    }
232
233    pub fn get_duration_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
235    }
236
237    pub fn set_duration_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
239    }
240
241    pub fn get_ignore_time_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
243    }
244
245    pub fn set_ignore_time_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
247    }
248
249    pub fn tween_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
251    }
252
253    pub fn add_on_changed_callback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
255    }
256
257    pub fn get_ignore_timescale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
259    }
260
261    pub fn valid_target_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
263    }
264}
265
266#[cfg(feature = "tm_pro-colortween_2")]
267pub trait IColorTween_ColorTweenCallback_2Methods: IColorTween_ColorTweenCallback_2 {
268    #[doc = "`.ctor()` overload"]
269    fn ctor(self) -> () {
270        unsafe {
271            let __receiver =
272                <ColorTween_ColorTweenCallback_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
273            ::unity::il2cpp_call!((::unity::module_base()+0x3ea81d0usize)as*mut u8,();
274(ColorTween_ColorTweenCallback_2)__receiver)
275        }
276    }
277}
278
279#[cfg(feature = "tm_pro-colortween_2")]
280impl<__T: IColorTween_ColorTweenCallback_2> IColorTween_ColorTweenCallback_2Methods for __T {}
281
282#[cfg(feature = "tm_pro-colortween_2")]
283impl ColorTween_ColorTweenCallback_2 {
284    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
286    }
287}
288
289#[cfg(feature = "tm_pro-colortween_2")]
290impl ColorTween_ColorTweenCallback_2 {
291    #[doc = "`.ctor()` — no args"]
292    pub fn new() -> Self {
293        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
294            panic!(
295                "{}
296::{}
297 failed to instantiate",
298                ::core::stringify!(ColorTween_ColorTweenCallback_2),
299                ::core::stringify!(new),
300            )
301        });
302        <Self as IColorTween_ColorTweenCallback_2Methods>::ctor(this);
303        this
304    }
305}
306
307#[cfg(feature = "tm_pro-colortween_2")]
308#[doc(hidden)]
309pub mod prelude {
310    pub use super::{
311        ColorTween_2, ColorTween_ColorTweenCallback_2, ColorTween_ColorTweenMode_2, IColorTween_ColorTweenCallback_2,
312        IColorTween_ColorTweenCallback_2Methods,
313    };
314    #[cfg(feature = "system-object")]
315    pub use crate::system::object::IObjectMethods;
316    #[cfg(feature = "system-enum")]
317    pub use crate::system::r#enum::IEnumMethods;
318    #[cfg(feature = "system-valuetype")]
319    pub use crate::system::valuetype::IValueTypeMethods;
320    #[cfg(feature = "unity_engine-events-unityevent_1")]
321    pub use crate::unity_engine::events::unityevent_1::IUnityEvent_1Methods;
322    #[cfg(feature = "unity_engine-events-unityeventbase")]
323    pub use crate::unity_engine::events::unityeventbase::IUnityEventBaseMethods;
324    pub use crate::{
325        system::{object::IObject, r#enum::IEnum, valuetype::IValueType},
326        unity_engine::events::{unityevent_1::IUnityEvent_1, unityeventbase::IUnityEventBase},
327    };
328}