Skip to main content

engage/generated/app/
versusratecalc.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-versusratecalc-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/versusratecalc/VersusRateCalc.md"))]
11    #[::unity::class(namespace = "App", name = "VersusRateCalc")]
12    #[parent(crate::system::object::Object)]
13    pub struct VersusRateCalc {
14        #[static_field]
15        #[rename(name = "K")]
16        pub k: i32,
17        #[static_field]
18        #[rename(name = "RateMin")]
19        pub rate_min: i32,
20        #[static_field]
21        #[rename(name = "RateMax")]
22        pub rate_max: i32,
23    }
24}
25
26#[cfg(feature = "app-versusratecalc-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-versusratecalc")]
30impl VersusRateCalc {
31    #[doc = "`GetRateDataType(i32)` overload"]
32    pub fn get_rate_data_type(rate: impl ::core::convert::Into<i32>) -> u16 {
33        unsafe {
34            ::unity::il2cpp_call!((::unity::module_base()+0x26b1430usize)as*mut u8,u16;
35(i32)::core::convert::Into::into(rate))
36        }
37    }
38
39    #[doc = "`GetWinRate(i32, i32)` overload"]
40    pub fn get_win_rate(rate: impl ::core::convert::Into<i32>, opponent_rate: impl ::core::convert::Into<i32>) -> i32 {
41        unsafe {
42            ::unity::il2cpp_call!((::unity::module_base()+0x26b1470usize)as*mut u8,i32;
43(i32)::core::convert::Into::into(rate),(i32)::core::convert::Into::into(opponent_rate))
44        }
45    }
46
47    #[doc = "`GetLoseRate(i32, i32)` overload"]
48    pub fn get_lose_rate(rate: impl ::core::convert::Into<i32>, opponent_rate: impl ::core::convert::Into<i32>) -> i32 {
49        unsafe {
50            ::unity::il2cpp_call!((::unity::module_base()+0x26b14e0usize)as*mut u8,i32;
51(i32)::core::convert::Into::into(rate),(i32)::core::convert::Into::into(opponent_rate))
52        }
53    }
54}
55
56#[cfg(feature = "app-versusratecalc")]
57pub trait IVersusRateCalcMethods: IVersusRateCalc {
58    #[doc = "`.ctor()` overload"]
59    fn ctor(self) -> () {
60        unsafe {
61            let __receiver = <VersusRateCalc as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
62            ::unity::il2cpp_call!((::unity::module_base()+0x26b1550usize)as*mut u8,();
63(VersusRateCalc)__receiver)
64        }
65    }
66}
67
68#[cfg(feature = "app-versusratecalc")]
69impl<__T: IVersusRateCalc> IVersusRateCalcMethods for __T {}
70
71#[cfg(feature = "app-versusratecalc")]
72impl VersusRateCalc {
73    pub fn get_rate_data_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
74        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
75    }
76
77    pub fn get_win_rate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
78        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
79    }
80
81    pub fn get_lose_rate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
82        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
83    }
84
85    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
86        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
87    }
88}
89
90#[cfg(feature = "app-versusratecalc")]
91impl VersusRateCalc {
92    #[doc = "`.ctor()` — no args"]
93    pub fn new() -> Self {
94        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
95            panic!(
96                "{}
97::{}
98 failed to instantiate",
99                ::core::stringify!(VersusRateCalc),
100                ::core::stringify!(new),
101            )
102        });
103        <Self as IVersusRateCalcMethods>::ctor(this);
104        this
105    }
106}
107
108#[cfg(feature = "app-versusratecalc")]
109#[doc(hidden)]
110pub mod prelude {
111    pub use super::{IVersusRateCalc, IVersusRateCalcMethods, VersusRateCalc};
112    pub use crate::system::object::IObject;
113    #[cfg(feature = "system-object")]
114    pub use crate::system::object::IObjectMethods;
115}