Skip to main content

engage/generated/unity_engine/ui/coroutine_tween/
floattween.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::{
10            object::{IObject, Object},
11            valuetype::{IValueType, ValueType},
12        },
13        unity_engine::events::{
14            unityevent_1::{IUnityEvent_1, UnityEvent_1},
15            unityeventbase::{IUnityEventBase, UnityEventBase},
16        },
17    };
18
19    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/coroutine_tween/floattween/FloatTween.md"))]
20    #[repr(C)]
21    #[derive(::core::clone::Clone, ::core::marker::Copy)]
22    pub struct FloatTween {
23        pub m_target: crate::unity_engine::ui::coroutine_tween::floattween::FloatTween_FloatTweenCallback,
24        pub m_start_value: f32,
25        pub m_target_value: f32,
26        pub m_duration: f32,
27        pub m_ignore_time_scale: bool,
28    }
29    impl ::unity::ClassIdentity for FloatTween {
30        const NAME: &'static str = "FloatTween";
31        const NAMESPACE: &'static str = "UnityEngine.UI.CoroutineTween";
32
33        fn class() -> ::unity::Class {
34            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
35            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
36        }
37    }
38    impl ::unity::IlType for FloatTween {
39        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
40            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
41        }
42    }
43
44    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/coroutine_tween/floattween/FloatTween_FloatTweenCallback.md"))]
45    #[::unity::class(namespace = "UnityEngine.UI.CoroutineTween", name = "FloatTween.FloatTweenCallback")]
46    #[parent(crate::unity_engine::events::unityevent_1::UnityEvent_1<f32>)]
47    pub struct FloatTween_FloatTweenCallback {}
48}
49
50#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween-types")]
51pub use __types::*;
52
53#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
54impl FloatTween {
55    #[doc = "`get_startValue()` overload"]
56    pub fn get_start_value(&mut self) -> f32 {
57        unsafe {
58            ::unity::il2cpp_call!((::unity::module_base()+0x318b490usize)as*mut u8,f32;
59(*mut FloatTween)self as*mut FloatTween)
60        }
61    }
62
63    #[doc = "`set_startValue(f32)` overload"]
64    pub fn set_start_value(&mut self, value: impl ::core::convert::Into<f32>) -> () {
65        unsafe {
66            ::unity::il2cpp_call!((::unity::module_base()+0x318b4a0usize)as*mut u8,();
67(*mut FloatTween)self as*mut FloatTween,(f32)::core::convert::Into::into(value))
68        }
69    }
70
71    #[doc = "`get_targetValue()` overload"]
72    pub fn get_target_value(&mut self) -> f32 {
73        unsafe {
74            ::unity::il2cpp_call!((::unity::module_base()+0x318b4b0usize)as*mut u8,f32;
75(*mut FloatTween)self as*mut FloatTween)
76        }
77    }
78
79    #[doc = "`set_targetValue(f32)` overload"]
80    pub fn set_target_value(&mut self, value: impl ::core::convert::Into<f32>) -> () {
81        unsafe {
82            ::unity::il2cpp_call!((::unity::module_base()+0x318b4c0usize)as*mut u8,();
83(*mut FloatTween)self as*mut FloatTween,(f32)::core::convert::Into::into(value))
84        }
85    }
86
87    #[doc = "`get_duration()` overload"]
88    pub fn get_duration(&mut self) -> f32 {
89        unsafe {
90            ::unity::il2cpp_call!((::unity::module_base()+0x318b4d0usize)as*mut u8,f32;
91(*mut FloatTween)self as*mut FloatTween)
92        }
93    }
94
95    #[doc = "`set_duration(f32)` overload"]
96    pub fn set_duration(&mut self, value: impl ::core::convert::Into<f32>) -> () {
97        unsafe {
98            ::unity::il2cpp_call!((::unity::module_base()+0x318b4e0usize)as*mut u8,();
99(*mut FloatTween)self as*mut FloatTween,(f32)::core::convert::Into::into(value))
100        }
101    }
102
103    #[doc = "`get_ignoreTimeScale()` overload"]
104    pub fn get_ignore_time_scale(&mut self) -> bool {
105        unsafe {
106            ::unity::il2cpp_call!((::unity::module_base()+0x318b4f0usize)as*mut u8,bool;
107(*mut FloatTween)self as*mut FloatTween)
108        }
109    }
110
111    #[doc = "`set_ignoreTimeScale(bool)` overload"]
112    pub fn set_ignore_time_scale(&mut self, value: impl ::core::convert::Into<bool>) -> () {
113        unsafe {
114            ::unity::il2cpp_call!((::unity::module_base()+0x318b500usize)as*mut u8,();
115(*mut FloatTween)self as*mut FloatTween,(bool)::core::convert::Into::into(value))
116        }
117    }
118
119    #[doc = "`TweenValue(f32)` overload"]
120    pub fn tween_value(&mut self, float_percentage: impl ::core::convert::Into<f32>) -> () {
121        unsafe {
122            ::unity::il2cpp_call!((::unity::module_base()+0x318b510usize)as*mut u8,();
123(*mut FloatTween)self as*mut FloatTween,(f32)::core::convert::Into::into(float_percentage))
124        }
125    }
126
127    #[doc = "`AddOnChangedCallback(crate::unity_engine::events::unityaction_1::UnityAction_1<f32>)` overload"]
128    pub fn add_on_changed_callback(
129        &mut self,
130        callback: impl ::core::convert::Into<crate::unity_engine::events::unityaction_1::UnityAction_1<f32>>,
131    ) -> () {
132        unsafe {
133            ::unity::il2cpp_call!((::unity::module_base()+0x31875d0usize)as*mut u8,();
134(*mut FloatTween)self as*mut FloatTween,(crate::unity_engine::events::unityaction_1::UnityAction_1<f32>)::core::convert::Into::into(callback))
135        }
136    }
137
138    #[doc = "`GetIgnoreTimescale()` overload"]
139    pub fn get_ignore_timescale(&mut self) -> bool {
140        unsafe {
141            ::unity::il2cpp_call!((::unity::module_base()+0x318b5a0usize)as*mut u8,bool;
142(*mut FloatTween)self as*mut FloatTween)
143        }
144    }
145
146    #[doc = "`ValidTarget()` overload"]
147    pub fn valid_target(&mut self) -> bool {
148        unsafe {
149            ::unity::il2cpp_call!((::unity::module_base()+0x318b590usize)as*mut u8,bool;
150(*mut FloatTween)self as*mut FloatTween)
151        }
152    }
153}
154
155#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
156impl FloatTween {
157    pub fn get_start_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
159    }
160
161    pub fn set_start_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
163    }
164
165    pub fn get_target_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
167    }
168
169    pub fn set_target_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
171    }
172
173    pub fn get_duration_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
175    }
176
177    pub fn set_duration_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
179    }
180
181    pub fn get_ignore_time_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
183    }
184
185    pub fn set_ignore_time_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
187    }
188
189    pub fn tween_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
191    }
192
193    pub fn add_on_changed_callback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
195    }
196
197    pub fn get_ignore_timescale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
199    }
200
201    pub fn valid_target_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
203    }
204}
205
206#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
207pub trait IFloatTween_FloatTweenCallbackMethods: IFloatTween_FloatTweenCallback {
208    #[doc = "`.ctor()` overload"]
209    fn ctor(self) -> () {
210        unsafe {
211            let __receiver =
212                <FloatTween_FloatTweenCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
213            ::unity::il2cpp_call!((::unity::module_base()+0x3c0c730usize)as*mut u8,();
214(FloatTween_FloatTweenCallback)__receiver)
215        }
216    }
217}
218
219#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
220impl<__T: IFloatTween_FloatTweenCallback> IFloatTween_FloatTweenCallbackMethods for __T {}
221
222#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
223impl FloatTween_FloatTweenCallback {
224    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
226    }
227}
228
229#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
230impl FloatTween_FloatTweenCallback {
231    #[doc = "`.ctor()` — no args"]
232    pub fn new() -> Self {
233        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
234            panic!(
235                "{}
236::{}
237 failed to instantiate",
238                ::core::stringify!(FloatTween_FloatTweenCallback),
239                ::core::stringify!(new),
240            )
241        });
242        <Self as IFloatTween_FloatTweenCallbackMethods>::ctor(this);
243        this
244    }
245}
246
247#[cfg(feature = "unity_engine-ui-coroutine_tween-floattween")]
248#[doc(hidden)]
249pub mod prelude {
250    pub use super::{FloatTween, FloatTween_FloatTweenCallback, IFloatTween_FloatTweenCallback, IFloatTween_FloatTweenCallbackMethods};
251    #[cfg(feature = "system-object")]
252    pub use crate::system::object::IObjectMethods;
253    #[cfg(feature = "system-valuetype")]
254    pub use crate::system::valuetype::IValueTypeMethods;
255    #[cfg(feature = "unity_engine-events-unityevent_1")]
256    pub use crate::unity_engine::events::unityevent_1::IUnityEvent_1Methods;
257    #[cfg(feature = "unity_engine-events-unityeventbase")]
258    pub use crate::unity_engine::events::unityeventbase::IUnityEventBaseMethods;
259    pub use crate::{
260        system::{object::IObject, valuetype::IValueType},
261        unity_engine::events::{unityevent_1::IUnityEvent_1, unityeventbase::IUnityEventBase},
262    };
263}