2
0

ModAnimation.cs 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Runtime.CompilerServices;
  6. using System.Text;
  7. using System.Threading;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Media;
  11. using Microsoft.VisualBasic;
  12. using Microsoft.VisualBasic.CompilerServices;
  13. namespace PCL
  14. {
  15. // Token: 0x02000027 RID: 39
  16. [StandardModule]
  17. public sealed class ModAnimation
  18. {
  19. // Token: 0x060000F3 RID: 243 RVA: 0x0000FFC4 File Offset: 0x0000E1C4
  20. public static void AniDispose(MyCard Control, bool RemoveFromChildren, ParameterizedThreadStart CallBack = null)
  21. {
  22. if (Control.IsHitTestVisible)
  23. {
  24. Control.IsHitTestVisible = false;
  25. ModAnimation.AniStart(new ModAnimation.AniData[]
  26. {
  27. ModAnimation.AaScaleTransform(Control, -0.08, 200, 0, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false),
  28. ModAnimation.AaOpacity(Control, -1.0, 200, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  29. ModAnimation.AaHeight(Control, -Control.ActualHeight, 150, 100, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  30. ModAnimation.AaCode(delegate
  31. {
  32. if (RemoveFromChildren)
  33. {
  34. if (Control.Parent == null)
  35. {
  36. return;
  37. }
  38. object[] array3;
  39. bool[] array4;
  40. NewLateBinding.LateCall(NewLateBinding.LateGet(Control.Parent, null, "Children", new object[0], null, null, null), null, "Remove", array3 = new object[]
  41. {
  42. Control
  43. }, null, null, array4 = new bool[]
  44. {
  45. true
  46. }, true);
  47. if (array4[0])
  48. {
  49. Control = (MyCard)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array3[0]), typeof(MyCard));
  50. }
  51. }
  52. else
  53. {
  54. Control.Visibility = Visibility.Collapsed;
  55. }
  56. if (CallBack != null)
  57. {
  58. CallBack(Control);
  59. }
  60. }, 0, true)
  61. }, "MyCard Dispose " + Conversions.ToString(Control.indexer), false);
  62. return;
  63. }
  64. if (RemoveFromChildren)
  65. {
  66. if (Control.Parent == null)
  67. {
  68. return;
  69. }
  70. object[] array;
  71. bool[] array2;
  72. NewLateBinding.LateCall(NewLateBinding.LateGet(Control.Parent, null, "Children", new object[0], null, null, null), null, "Remove", array = new object[]
  73. {
  74. Control
  75. }, null, null, array2 = new bool[]
  76. {
  77. true
  78. }, true);
  79. if (array2[0])
  80. {
  81. Control = (MyCard)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array[0]), typeof(MyCard));
  82. }
  83. }
  84. else
  85. {
  86. Control.Visibility = Visibility.Collapsed;
  87. }
  88. if (CallBack != null)
  89. {
  90. CallBack(Control);
  91. }
  92. }
  93. // Token: 0x060000F4 RID: 244 RVA: 0x0001017C File Offset: 0x0000E37C
  94. public static void AniDispose(MyHint Control, bool RemoveFromChildren, ParameterizedThreadStart CallBack = null)
  95. {
  96. if (Control.IsHitTestVisible)
  97. {
  98. Control.IsHitTestVisible = false;
  99. ModAnimation.AniStart(new ModAnimation.AniData[]
  100. {
  101. ModAnimation.AaScaleTransform(Control, -0.08, 200, 0, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false),
  102. ModAnimation.AaOpacity(Control, -1.0, 200, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  103. ModAnimation.AaHeight(Control, -Control.ActualHeight, 150, 100, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  104. ModAnimation.AaCode(delegate
  105. {
  106. if (RemoveFromChildren)
  107. {
  108. object[] array;
  109. bool[] array2;
  110. NewLateBinding.LateCall(NewLateBinding.LateGet(Control.Parent, null, "Children", new object[0], null, null, null), null, "Remove", array = new object[]
  111. {
  112. Control
  113. }, null, null, array2 = new bool[]
  114. {
  115. true
  116. }, true);
  117. if (array2[0])
  118. {
  119. Control = (MyHint)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array[0]), typeof(MyHint));
  120. }
  121. }
  122. else
  123. {
  124. Control.Visibility = Visibility.Collapsed;
  125. }
  126. if (CallBack != null)
  127. {
  128. CallBack(Control);
  129. }
  130. }, 0, true)
  131. }, "MyCard Dispose " + Conversions.ToString(Control.m_ParamBroadcaster), false);
  132. }
  133. }
  134. // Token: 0x060000F5 RID: 245 RVA: 0x0001027C File Offset: 0x0000E47C
  135. public static void AniDispose(MyIconButton Control, bool RemoveFromChildren, ParameterizedThreadStart CallBack = null)
  136. {
  137. if (Control.IsHitTestVisible)
  138. {
  139. Control.IsHitTestVisible = false;
  140. ModAnimation.AniStart(new ModAnimation.AniData[]
  141. {
  142. ModAnimation.AaScaleTransform(Control, -1.5, 200, 0, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false),
  143. ModAnimation.AaCode(delegate
  144. {
  145. if (RemoveFromChildren)
  146. {
  147. object[] array;
  148. bool[] array2;
  149. NewLateBinding.LateCall(NewLateBinding.LateGet(Control.Parent, null, "Children", new object[0], null, null, null), null, "Remove", array = new object[]
  150. {
  151. Control
  152. }, null, null, array2 = new bool[]
  153. {
  154. true
  155. }, true);
  156. if (array2[0])
  157. {
  158. Control = (MyIconButton)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array[0]), typeof(MyIconButton));
  159. }
  160. }
  161. else
  162. {
  163. Control.Visibility = Visibility.Collapsed;
  164. }
  165. if (CallBack != null)
  166. {
  167. CallBack(Control);
  168. }
  169. }, 0, true)
  170. }, "MyIconButton Dispose " + Conversions.ToString(Control.authenticationComposer), false);
  171. }
  172. }
  173. // Token: 0x060000F6 RID: 246 RVA: 0x00002A66 File Offset: 0x00000C66
  174. public static int CalcParser()
  175. {
  176. return ModAnimation._Token;
  177. }
  178. // Token: 0x060000F7 RID: 247 RVA: 0x00010328 File Offset: 0x0000E528
  179. public static void AssetParser(int value)
  180. {
  181. object writer = ModAnimation._Writer;
  182. ObjectFlowControl.CheckForSyncLockOnValueType(writer);
  183. lock (writer)
  184. {
  185. ModAnimation._Token = value;
  186. }
  187. }
  188. // Token: 0x060000F8 RID: 248 RVA: 0x00010370 File Offset: 0x0000E570
  189. public static ModAnimation.AniData AaX(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  190. {
  191. return new ModAnimation.AniData
  192. {
  193. serverRepository = ModAnimation.AniType.Number,
  194. m_ResolverRepository = ModAnimation.AniTypeSub.X,
  195. statusRepository = Time,
  196. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  197. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  198. Value = Value,
  199. printerRepository = After,
  200. roleRepository = checked(0 - Delay)
  201. };
  202. }
  203. // Token: 0x060000F9 RID: 249 RVA: 0x000103E0 File Offset: 0x0000E5E0
  204. public static ModAnimation.AniData AaY(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  205. {
  206. return new ModAnimation.AniData
  207. {
  208. serverRepository = ModAnimation.AniType.Number,
  209. m_ResolverRepository = ModAnimation.AniTypeSub.Y,
  210. statusRepository = Time,
  211. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  212. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  213. Value = Value,
  214. printerRepository = After,
  215. roleRepository = checked(0 - Delay)
  216. };
  217. }
  218. // Token: 0x060000FA RID: 250 RVA: 0x00010450 File Offset: 0x0000E650
  219. public static ModAnimation.AniData AaWidth(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  220. {
  221. return new ModAnimation.AniData
  222. {
  223. serverRepository = ModAnimation.AniType.Number,
  224. m_ResolverRepository = ModAnimation.AniTypeSub.Width,
  225. statusRepository = Time,
  226. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  227. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  228. Value = Value,
  229. printerRepository = After,
  230. roleRepository = checked(0 - Delay)
  231. };
  232. }
  233. // Token: 0x060000FB RID: 251 RVA: 0x000104C0 File Offset: 0x0000E6C0
  234. public static ModAnimation.AniData AaHeight(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  235. {
  236. return new ModAnimation.AniData
  237. {
  238. serverRepository = ModAnimation.AniType.Number,
  239. m_ResolverRepository = ModAnimation.AniTypeSub.Height,
  240. statusRepository = Time,
  241. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  242. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  243. Value = Value,
  244. printerRepository = After,
  245. roleRepository = checked(0 - Delay)
  246. };
  247. }
  248. // Token: 0x060000FC RID: 252 RVA: 0x00010530 File Offset: 0x0000E730
  249. public static ModAnimation.AniData AaOpacity(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  250. {
  251. return new ModAnimation.AniData
  252. {
  253. serverRepository = ModAnimation.AniType.Number,
  254. m_ResolverRepository = ModAnimation.AniTypeSub.Opacity,
  255. statusRepository = Time,
  256. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  257. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  258. Value = Value,
  259. printerRepository = After,
  260. roleRepository = checked(0 - Delay)
  261. };
  262. }
  263. // Token: 0x060000FD RID: 253 RVA: 0x000105A0 File Offset: 0x0000E7A0
  264. public static ModAnimation.AniData AaValue(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  265. {
  266. return new ModAnimation.AniData
  267. {
  268. serverRepository = ModAnimation.AniType.Number,
  269. m_ResolverRepository = ModAnimation.AniTypeSub.Value,
  270. statusRepository = Time,
  271. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  272. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  273. Value = Value,
  274. printerRepository = After,
  275. roleRepository = checked(0 - Delay)
  276. };
  277. }
  278. // Token: 0x060000FE RID: 254 RVA: 0x00010610 File Offset: 0x0000E810
  279. public static ModAnimation.AniData AaRadius(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  280. {
  281. return new ModAnimation.AniData
  282. {
  283. serverRepository = ModAnimation.AniType.Number,
  284. m_ResolverRepository = ModAnimation.AniTypeSub.Radius,
  285. statusRepository = Time,
  286. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  287. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  288. Value = Value,
  289. printerRepository = After,
  290. roleRepository = checked(0 - Delay)
  291. };
  292. }
  293. // Token: 0x060000FF RID: 255 RVA: 0x00010680 File Offset: 0x0000E880
  294. public static ModAnimation.AniData AaBorderThickness(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  295. {
  296. return new ModAnimation.AniData
  297. {
  298. serverRepository = ModAnimation.AniType.Number,
  299. m_ResolverRepository = ModAnimation.AniTypeSub.BorderThickness,
  300. statusRepository = Time,
  301. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  302. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  303. Value = Value,
  304. printerRepository = After,
  305. roleRepository = checked(0 - Delay)
  306. };
  307. }
  308. // Token: 0x06000100 RID: 256 RVA: 0x000106F0 File Offset: 0x0000E8F0
  309. public static ModAnimation.AniData AaStrokeThickness(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  310. {
  311. return new ModAnimation.AniData
  312. {
  313. serverRepository = ModAnimation.AniType.Number,
  314. m_ResolverRepository = ModAnimation.AniTypeSub.StrokeThickness,
  315. statusRepository = Time,
  316. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  317. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  318. Value = Value,
  319. printerRepository = After,
  320. roleRepository = checked(0 - Delay)
  321. };
  322. }
  323. // Token: 0x06000101 RID: 257 RVA: 0x00010760 File Offset: 0x0000E960
  324. public static ModAnimation.AniData AaGridLengthWidth(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  325. {
  326. return new ModAnimation.AniData
  327. {
  328. serverRepository = ModAnimation.AniType.Number,
  329. m_ResolverRepository = ModAnimation.AniTypeSub.GridLengthWidth,
  330. statusRepository = Time,
  331. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  332. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  333. Value = Value,
  334. printerRepository = After,
  335. roleRepository = checked(0 - Delay)
  336. };
  337. }
  338. // Token: 0x06000102 RID: 258 RVA: 0x000107D0 File Offset: 0x0000E9D0
  339. public static ModAnimation.AniData AaDouble(object Obj, DependencyProperty Prop, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  340. {
  341. return new ModAnimation.AniData
  342. {
  343. serverRepository = ModAnimation.AniType.Number,
  344. m_ResolverRepository = ModAnimation.AniTypeSub.Double,
  345. statusRepository = Time,
  346. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  347. _AttrRepository = new object[]
  348. {
  349. Obj,
  350. Prop,
  351. ""
  352. },
  353. Value = Value,
  354. printerRepository = After,
  355. roleRepository = checked(0 - Delay)
  356. };
  357. }
  358. // Token: 0x06000103 RID: 259 RVA: 0x00010850 File Offset: 0x0000EA50
  359. public static ModAnimation.AniData AaDouble(ParameterizedThreadStart Lambda, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  360. {
  361. return new ModAnimation.AniData
  362. {
  363. serverRepository = ModAnimation.AniType.Number,
  364. m_ResolverRepository = ModAnimation.AniTypeSub.DoubleParam,
  365. statusRepository = Time,
  366. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  367. _AttrRepository = Lambda,
  368. Value = Value,
  369. printerRepository = After,
  370. roleRepository = checked(0 - Delay)
  371. };
  372. }
  373. // Token: 0x06000104 RID: 260 RVA: 0x000108BC File Offset: 0x0000EABC
  374. public static ModAnimation.AniData AaColor(FrameworkElement Obj, DependencyProperty Prop, ModBase.MyColor Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  375. {
  376. return new ModAnimation.AniData
  377. {
  378. serverRepository = ModAnimation.AniType.Color,
  379. statusRepository = Time,
  380. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  381. _AttrRepository = new object[]
  382. {
  383. Obj,
  384. Prop,
  385. ""
  386. },
  387. Value = Value,
  388. printerRepository = After,
  389. roleRepository = checked(0 - Delay),
  390. _CandidateRepository = new ModBase.MyColor(0.0, 0.0, 0.0, 0.0)
  391. };
  392. }
  393. // Token: 0x06000105 RID: 261 RVA: 0x00010960 File Offset: 0x0000EB60
  394. public static ModAnimation.AniData AaColor(FrameworkElement Obj, DependencyProperty Prop, string Res, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  395. {
  396. return new ModAnimation.AniData
  397. {
  398. serverRepository = ModAnimation.AniType.Color,
  399. statusRepository = Time,
  400. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  401. _AttrRepository = new object[]
  402. {
  403. Obj,
  404. Prop,
  405. Res
  406. },
  407. Value = new ModBase.MyColor(RuntimeHelpers.GetObjectValue(Application.Current.FindResource(Res))) - new ModBase.MyColor(RuntimeHelpers.GetObjectValue(Obj.GetValue(Prop))),
  408. printerRepository = After,
  409. roleRepository = checked(0 - Delay),
  410. _CandidateRepository = new ModBase.MyColor(0.0, 0.0, 0.0, 0.0)
  411. };
  412. }
  413. // Token: 0x06000106 RID: 262 RVA: 0x00010A28 File Offset: 0x0000EC28
  414. public static ModAnimation.AniData AaScale(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false, bool Absolute = false)
  415. {
  416. ModBase.MyRect value;
  417. if (Absolute)
  418. {
  419. value = new ModBase.MyRect(-0.5 * Value, -0.5 * Value, Value, Value);
  420. }
  421. else
  422. {
  423. value = new ModBase.MyRect(Conversions.ToDouble(Operators.MultiplyObject(Operators.MultiplyObject(-0.5, NewLateBinding.LateGet(Obj, null, "ActualWidth", new object[0], null, null, null)), Value)), Conversions.ToDouble(Operators.MultiplyObject(Operators.MultiplyObject(-0.5, NewLateBinding.LateGet(Obj, null, "ActualHeight", new object[0], null, null, null)), Value)), Conversions.ToDouble(Operators.MultiplyObject(NewLateBinding.LateGet(Obj, null, "ActualWidth", new object[0], null, null, null), Value)), Conversions.ToDouble(Operators.MultiplyObject(NewLateBinding.LateGet(Obj, null, "ActualHeight", new object[0], null, null, null), Value)));
  424. }
  425. return new ModAnimation.AniData
  426. {
  427. serverRepository = ModAnimation.AniType.Scale,
  428. statusRepository = Time,
  429. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  430. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  431. Value = value,
  432. printerRepository = After,
  433. roleRepository = checked(0 - Delay)
  434. };
  435. }
  436. // Token: 0x06000107 RID: 263 RVA: 0x00010B70 File Offset: 0x0000ED70
  437. public static ModAnimation.AniData AaTextAppear(object Obj, bool Hide = false, bool TimePerText = true, int Time = 70, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  438. {
  439. return checked(new ModAnimation.AniData
  440. {
  441. serverRepository = ModAnimation.AniType.TextAppear,
  442. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  443. statusRepository = (TimePerText ? (Time * ((Obj is TextBlock) ? NewLateBinding.LateGet(Obj, null, "Text", new object[0], null, null, null) : NewLateBinding.LateGet(Obj, null, "Context", new object[0], null, null, null).ToString()).ToString().Length) : Time),
  444. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  445. Value = new object[]
  446. {
  447. (Obj is TextBlock) ? NewLateBinding.LateGet(Obj, null, "Text", new object[0], null, null, null) : NewLateBinding.LateGet(Obj, null, "Context", new object[0], null, null, null).ToString(),
  448. Hide
  449. },
  450. printerRepository = After,
  451. roleRepository = 0 - Delay
  452. });
  453. }
  454. // Token: 0x06000108 RID: 264 RVA: 0x00010C68 File Offset: 0x0000EE68
  455. public static ModAnimation.AniData AaCode(ThreadStart Code, int Delay = 0, bool After = false)
  456. {
  457. return new ModAnimation.AniData
  458. {
  459. serverRepository = ModAnimation.AniType.Code,
  460. statusRepository = 1,
  461. Value = Code,
  462. printerRepository = After,
  463. roleRepository = checked(0 - Delay)
  464. };
  465. }
  466. // Token: 0x06000109 RID: 265 RVA: 0x00010CA8 File Offset: 0x0000EEA8
  467. public static ModAnimation.AniData AaScaleTransform(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  468. {
  469. return new ModAnimation.AniData
  470. {
  471. serverRepository = ModAnimation.AniType.ScaleTransform,
  472. statusRepository = Time,
  473. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  474. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  475. Value = Value,
  476. printerRepository = After,
  477. roleRepository = checked(0 - Delay)
  478. };
  479. }
  480. // Token: 0x0600010A RID: 266 RVA: 0x00010D10 File Offset: 0x0000EF10
  481. public static ModAnimation.AniData AaRotateTransform(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  482. {
  483. return new ModAnimation.AniData
  484. {
  485. serverRepository = ModAnimation.AniType.RotateTransform,
  486. statusRepository = Time,
  487. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  488. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  489. Value = Value,
  490. printerRepository = After,
  491. roleRepository = checked(0 - Delay)
  492. };
  493. }
  494. // Token: 0x0600010B RID: 267 RVA: 0x00010D78 File Offset: 0x0000EF78
  495. public static ModAnimation.AniData AaTranslateX(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  496. {
  497. return new ModAnimation.AniData
  498. {
  499. serverRepository = ModAnimation.AniType.Number,
  500. m_ResolverRepository = ModAnimation.AniTypeSub.TranslateX,
  501. statusRepository = Time,
  502. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  503. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  504. Value = Value,
  505. printerRepository = After,
  506. roleRepository = checked(0 - Delay)
  507. };
  508. }
  509. // Token: 0x0600010C RID: 268 RVA: 0x00010DE8 File Offset: 0x0000EFE8
  510. public static ModAnimation.AniData AaTranslateY(object Obj, double Value, int Time = 400, int Delay = 0, ModAnimation.AniEase Ease = null, bool After = false)
  511. {
  512. return new ModAnimation.AniData
  513. {
  514. serverRepository = ModAnimation.AniType.Number,
  515. m_ResolverRepository = ModAnimation.AniTypeSub.TranslateY,
  516. statusRepository = Time,
  517. _ValRepository = (Ease ?? new ModAnimation.AniEaseLinear()),
  518. _AttrRepository = RuntimeHelpers.GetObjectValue(Obj),
  519. Value = Value,
  520. printerRepository = After,
  521. roleRepository = checked(0 - Delay)
  522. };
  523. }
  524. // Token: 0x0600010D RID: 269 RVA: 0x00010E58 File Offset: 0x0000F058
  525. public static List<ModAnimation.AniData> AaStack(StackPanel Stack, int Time = 100, int Delay = 25)
  526. {
  527. List<ModAnimation.AniData> list = new List<ModAnimation.AniData>();
  528. int num = 0;
  529. checked
  530. {
  531. try
  532. {
  533. foreach (object obj in Stack.Children)
  534. {
  535. object objectValue = RuntimeHelpers.GetObjectValue(obj);
  536. NewLateBinding.LateSet(objectValue, null, "Opacity", new object[]
  537. {
  538. 0
  539. }, null, null);
  540. list.Add(ModAnimation.AaOpacity(RuntimeHelpers.GetObjectValue(objectValue), 1.0, Time, num, null, false));
  541. num += Delay;
  542. }
  543. }
  544. finally
  545. {
  546. IEnumerator enumerator;
  547. if (enumerator is IDisposable)
  548. {
  549. (enumerator as IDisposable).Dispose();
  550. }
  551. }
  552. return list;
  553. }
  554. }
  555. // Token: 0x0600010E RID: 270 RVA: 0x00010EF8 File Offset: 0x0000F0F8
  556. public static void AniStart(IList AniGroup, string Name = "", bool RefreshTime = false)
  557. {
  558. if (RefreshTime)
  559. {
  560. ModAnimation.configuration = ModBase.GetTimeTick();
  561. }
  562. ModAnimation.AniGroupEntry aniGroupEntry = new ModAnimation.AniGroupEntry
  563. {
  564. importerRepository = ModBase.GetFullList<ModAnimation.AniData>(AniGroup),
  565. m_WorkerRepository = ModBase.GetTimeTick()
  566. };
  567. if (Operators.CompareString(Name, "", false) == 0)
  568. {
  569. Name = Conversions.ToString(aniGroupEntry.m_ConnectionRepository);
  570. }
  571. else
  572. {
  573. ModAnimation.AniStop(Name);
  574. }
  575. ModAnimation._Consumer.Add(Name, aniGroupEntry);
  576. }
  577. // Token: 0x0600010F RID: 271 RVA: 0x00002A6D File Offset: 0x00000C6D
  578. public static void AniStart(ModAnimation.AniData AniGroup, string Name = "", bool RefreshTime = false)
  579. {
  580. ModAnimation.AniStart(new List<ModAnimation.AniData>
  581. {
  582. AniGroup
  583. }, Name, RefreshTime);
  584. }
  585. // Token: 0x06000110 RID: 272 RVA: 0x00002A82 File Offset: 0x00000C82
  586. public static void AniStop(string Name)
  587. {
  588. ModAnimation._Consumer.Remove(Name);
  589. }
  590. // Token: 0x06000111 RID: 273 RVA: 0x00002A90 File Offset: 0x00000C90
  591. public static bool AniIsRun(string Name)
  592. {
  593. return ModAnimation._Consumer.ContainsKey(Name);
  594. }
  595. // Token: 0x06000112 RID: 274 RVA: 0x00010F60 File Offset: 0x0000F160
  596. public static void AniStart()
  597. {
  598. ModAnimation.configuration = ModBase.GetTimeTick();
  599. ModAnimation._Setter = ModAnimation.configuration;
  600. ModAnimation._Getter = true;
  601. ModBase.RunInNewThread((ModAnimation._Closure$__.$I60-0 == null) ? (ModAnimation._Closure$__.$I60-0 = checked(delegate()
  602. {
  603. try
  604. {
  605. ModBase.Log("[Animation] 动画线程开始", ModBase.LogLevel.Normal, "出现错误");
  606. for (;;)
  607. {
  608. ModAnimation._Closure$__60-0 CS$<>8__locals1 = new ModAnimation._Closure$__60-0(CS$<>8__locals1);
  609. CS$<>8__locals1.$VB$Local_DeltaTime = (long)Math.Round(ModBase.MathClamp((double)(ModBase.GetTimeTick() - ModAnimation.configuration), 0.0, 100000.0));
  610. if (CS$<>8__locals1.$VB$Local_DeltaTime >= 3L)
  611. {
  612. ModAnimation.configuration = ModBase.GetTimeTick();
  613. if (ModBase._TokenRepository)
  614. {
  615. if (ModBase.MathClamp((double)(ModAnimation.configuration - ModAnimation._Setter), 0.0, 100000.0) >= 500.0)
  616. {
  617. ModAnimation.factory = ModAnimation._Proccesor;
  618. ModAnimation._Proccesor = 0;
  619. ModAnimation._Setter = ModAnimation.configuration;
  620. }
  621. ModAnimation._Proccesor += 2;
  622. }
  623. ModBase.RunInUiWait(delegate()
  624. {
  625. ModAnimation.m_Registry = 0;
  626. ModAnimation.AniTimer((int)Math.Round(unchecked((double)CS$<>8__locals1.$VB$Local_DeltaTime * ModAnimation.m_Task)));
  627. if (ModBase.RandomInteger(0, 64 * (ModBase._TokenRepository ? 5 : 30)) == 0 && ((ModAnimation.factory < 62 && ModAnimation.factory > 0) || ModAnimation.m_Registry > 4 || ModNet.tokenTests._CollectionTest != 0))
  628. {
  629. ModBase.Log(string.Concat(new string[]
  630. {
  631. "[Report] FPS ",
  632. Conversions.ToString(ModAnimation.factory),
  633. ", 动画 ",
  634. Conversions.ToString(ModAnimation.m_Registry),
  635. ", 下载中 ",
  636. Conversions.ToString(ModNet.tokenTests._CollectionTest),
  637. "(",
  638. ModBase.GetString(ModNet.tokenTests.m_BridgeTest),
  639. "/s)"
  640. }), ModBase.LogLevel.Normal, "出现错误");
  641. }
  642. });
  643. }
  644. Thread.Sleep(1);
  645. }
  646. }
  647. catch (Exception ex)
  648. {
  649. ModBase.Log(ex, "动画帧执行失败", ModBase.LogLevel.Assert, "出现错误");
  650. }
  651. })) : ModAnimation._Closure$__.$I60-0, "Animation", ThreadPriority.AboveNormal);
  652. }
  653. // Token: 0x06000113 RID: 275 RVA: 0x00010FB8 File Offset: 0x0000F1B8
  654. public static void AniTimer(int DeltaTick)
  655. {
  656. checked
  657. {
  658. try
  659. {
  660. if ((double)DeltaTick / ModAnimation.m_Task > 200.0)
  661. {
  662. ModBase.Log("[Animation] 两个动画帧间隔 " + Conversions.ToString(DeltaTick) + " ms", ModBase.LogLevel.Developer, "出现错误");
  663. }
  664. int num = -1;
  665. IL_2AE:
  666. while (num + 1 < ModAnimation._Consumer.Count)
  667. {
  668. num++;
  669. ModAnimation.AniGroupEntry aniGroupEntry = Enumerable.ElementAtOrDefault<ModAnimation.AniGroupEntry>(ModAnimation._Consumer.Values, num);
  670. if (aniGroupEntry.m_WorkerRepository <= ModAnimation.configuration)
  671. {
  672. bool flag = true;
  673. int i = 0;
  674. while (i < aniGroupEntry.importerRepository.Count)
  675. {
  676. ModAnimation.AniData aniData = aniGroupEntry.importerRepository[i];
  677. if (!aniData.printerRepository)
  678. {
  679. flag = false;
  680. ref int ptr = ref aniData.roleRepository;
  681. aniData.roleRepository = ptr + DeltaTick;
  682. if (aniData.roleRepository > 0)
  683. {
  684. aniData = ModAnimation.AniRun(aniData);
  685. ModAnimation.m_Registry++;
  686. }
  687. if (aniData.roleRepository >= aniData.statusRepository)
  688. {
  689. if (Conversions.ToBoolean(aniData.serverRepository == ModAnimation.AniType.Color && Conversions.ToBoolean(Operators.NotObject(Operators.CompareObjectEqual(NewLateBinding.LateIndexGet(aniData._AttrRepository, new object[]
  690. {
  691. 2
  692. }, null), "", false)))))
  693. {
  694. object instance = NewLateBinding.LateIndexGet(aniData._AttrRepository, new object[]
  695. {
  696. 0
  697. }, null);
  698. Type type = null;
  699. string memberName = "SetResourceReference";
  700. object[] array = new object[2];
  701. int num2 = 0;
  702. object attrRepository = aniData._AttrRepository;
  703. object instance2 = attrRepository;
  704. object[] array2 = new object[1];
  705. object obj = array2[0] = 1;
  706. array[num2] = NewLateBinding.LateIndexGet(instance2, array2, null);
  707. int num3 = 1;
  708. object attrRepository2 = aniData._AttrRepository;
  709. object instance3 = attrRepository2;
  710. object[] array3 = new object[1];
  711. object obj2 = array3[0] = 2;
  712. array[num3] = NewLateBinding.LateIndexGet(instance3, array3, null);
  713. object[] array4 = array;
  714. bool[] array5;
  715. NewLateBinding.LateCall(instance, type, memberName, array, null, null, array5 = new bool[]
  716. {
  717. true,
  718. true
  719. }, true);
  720. if (array5[0])
  721. {
  722. NewLateBinding.LateIndexSetComplex(attrRepository, new object[]
  723. {
  724. obj,
  725. array4[0]
  726. }, null, true, false);
  727. }
  728. if (array5[1])
  729. {
  730. NewLateBinding.LateIndexSetComplex(attrRepository2, new object[]
  731. {
  732. obj2,
  733. array4[1]
  734. }, null, true, false);
  735. }
  736. }
  737. aniGroupEntry.importerRepository.RemoveAt(i);
  738. }
  739. else
  740. {
  741. aniGroupEntry.importerRepository[i] = aniData;
  742. i++;
  743. }
  744. }
  745. else
  746. {
  747. if (!flag)
  748. {
  749. break;
  750. }
  751. flag = false;
  752. aniData.printerRepository = false;
  753. aniGroupEntry.importerRepository[i] = aniData;
  754. }
  755. }
  756. if (!Enumerable.Any<ModAnimation.AniData>(aniGroupEntry.importerRepository))
  757. {
  758. int num4 = ModAnimation._Consumer.Count - 1;
  759. for (int j = 0; j <= num4; j++)
  760. {
  761. if (Enumerable.ElementAt<KeyValuePair<string, ModAnimation.AniGroupEntry>>(ModAnimation._Consumer, j).Value.m_ConnectionRepository == aniGroupEntry.m_ConnectionRepository)
  762. {
  763. ModAnimation._Consumer.Remove(Enumerable.ElementAt<KeyValuePair<string, ModAnimation.AniGroupEntry>>(ModAnimation._Consumer, j).Key);
  764. IL_2AA:
  765. num--;
  766. goto IL_2AE;
  767. }
  768. }
  769. goto IL_2AA;
  770. }
  771. }
  772. }
  773. }
  774. catch (Exception ex)
  775. {
  776. ModBase.Log(ex, "动画刻执行失败", ModBase.LogLevel.Hint, "出现错误");
  777. }
  778. }
  779. }
  780. // Token: 0x06000114 RID: 276 RVA: 0x000112C4 File Offset: 0x0000F4C4
  781. private static ModAnimation.AniData AniRun(ModAnimation.AniData Ani)
  782. {
  783. try
  784. {
  785. switch (Ani.serverRepository)
  786. {
  787. case ModAnimation.AniType.Number:
  788. {
  789. double num = ModBase.MathPercent(0.0, Conversions.ToDouble(Ani.Value), Ani._ValRepository.GetDelta((double)Ani.roleRepository / (double)Ani.statusRepository, Ani.m_StructRepository));
  790. if (num != 0.0)
  791. {
  792. switch (Ani.m_ResolverRepository)
  793. {
  794. case ModAnimation.AniTypeSub.X:
  795. ModBase.DeltaLeft((FrameworkElement)Ani._AttrRepository, num);
  796. break;
  797. case ModAnimation.AniTypeSub.Y:
  798. ModBase.DeltaTop((FrameworkElement)Ani._AttrRepository, num);
  799. break;
  800. case ModAnimation.AniTypeSub.Width:
  801. {
  802. FrameworkElement frameworkElement = (FrameworkElement)Ani._AttrRepository;
  803. frameworkElement.Width = Math.Max((double.IsNaN(frameworkElement.Width) ? frameworkElement.ActualWidth : frameworkElement.Width) + num, 0.0);
  804. break;
  805. }
  806. case ModAnimation.AniTypeSub.Height:
  807. {
  808. FrameworkElement frameworkElement2 = (FrameworkElement)Ani._AttrRepository;
  809. frameworkElement2.Height = Math.Max((double.IsNaN(frameworkElement2.Height) ? frameworkElement2.ActualHeight : frameworkElement2.Height) + num, 0.0);
  810. break;
  811. }
  812. case ModAnimation.AniTypeSub.Opacity:
  813. NewLateBinding.LateSet(Ani._AttrRepository, null, "Opacity", new object[]
  814. {
  815. ModBase.MathClamp(Conversions.ToDouble(Operators.AddObject(NewLateBinding.LateGet(Ani._AttrRepository, null, "Opacity", new object[0], null, null, null), num)), 0.0, 1.0)
  816. }, null, null);
  817. break;
  818. case ModAnimation.AniTypeSub.Value:
  819. {
  820. object attrRepository = Ani._AttrRepository;
  821. NewLateBinding.LateSet(attrRepository, null, "Value", new object[]
  822. {
  823. Operators.AddObject(NewLateBinding.LateGet(attrRepository, null, "Value", new object[0], null, null, null), num)
  824. }, null, null);
  825. break;
  826. }
  827. case ModAnimation.AniTypeSub.Radius:
  828. {
  829. object attrRepository = Ani._AttrRepository;
  830. NewLateBinding.LateSet(attrRepository, null, "Radius", new object[]
  831. {
  832. Operators.AddObject(NewLateBinding.LateGet(attrRepository, null, "Radius", new object[0], null, null, null), num)
  833. }, null, null);
  834. break;
  835. }
  836. case ModAnimation.AniTypeSub.BorderThickness:
  837. {
  838. object attrRepository2 = Ani._AttrRepository;
  839. Type type = null;
  840. string memberName = "BorderThickness";
  841. object[] array = new object[1];
  842. int num2 = 0;
  843. object obj = NewLateBinding.LateGet(Ani._AttrRepository, null, "BorderThickness", new object[0], null, null, null);
  844. array[num2] = new Thickness(((obj != null) ? ((Thickness)obj) : default(Thickness)).Bottom + num);
  845. NewLateBinding.LateSet(attrRepository2, type, memberName, array, null, null);
  846. break;
  847. }
  848. case ModAnimation.AniTypeSub.StrokeThickness:
  849. NewLateBinding.LateSet(Ani._AttrRepository, null, "StrokeThickness", new object[]
  850. {
  851. NewLateBinding.LateGet(null, typeof(Math), "Max", new object[]
  852. {
  853. Operators.AddObject(NewLateBinding.LateGet(Ani._AttrRepository, null, "StrokeThickness", new object[0], null, null, null), num),
  854. 0
  855. }, null, null, null)
  856. }, null, null);
  857. break;
  858. case ModAnimation.AniTypeSub.TranslateX:
  859. {
  860. if (Information.IsNothing(RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(Ani._AttrRepository, null, "RenderTransform", new object[0], null, null, null))) || !(NewLateBinding.LateGet(Ani._AttrRepository, null, "RenderTransform", new object[0], null, null, null) is TranslateTransform))
  861. {
  862. NewLateBinding.LateSet(Ani._AttrRepository, null, "RenderTransform", new object[]
  863. {
  864. new TranslateTransform(0.0, 0.0)
  865. }, null, null);
  866. }
  867. TranslateTransform translateTransform;
  868. (translateTransform = (TranslateTransform)NewLateBinding.LateGet(Ani._AttrRepository, null, "RenderTransform", new object[0], null, null, null)).X = translateTransform.X + num;
  869. break;
  870. }
  871. case ModAnimation.AniTypeSub.TranslateY:
  872. {
  873. if (Information.IsNothing(RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(Ani._AttrRepository, null, "RenderTransform", new object[0], null, null, null))) || !(NewLateBinding.LateGet(Ani._AttrRepository, null, "RenderTransform", new object[0], null, null, null) is TranslateTransform))
  874. {
  875. NewLateBinding.LateSet(Ani._AttrRepository, null, "RenderTransform", new object[]
  876. {
  877. new TranslateTransform(0.0, 0.0)
  878. }, null, null);
  879. }
  880. TranslateTransform translateTransform;
  881. (translateTransform = (TranslateTransform)NewLateBinding.LateGet(Ani._AttrRepository, null, "RenderTransform", new object[0], null, null, null)).Y = translateTransform.Y + num;
  882. break;
  883. }
  884. case ModAnimation.AniTypeSub.Double:
  885. {
  886. object instance = NewLateBinding.LateIndexGet(Ani._AttrRepository, new object[]
  887. {
  888. 0
  889. }, null);
  890. Type type2 = null;
  891. string memberName2 = "SetValue";
  892. object[] array2 = new object[2];
  893. int num3 = 0;
  894. object attrRepository = Ani._AttrRepository;
  895. object instance2 = attrRepository;
  896. object[] array3 = new object[1];
  897. object obj2 = array3[0] = 1;
  898. array2[num3] = NewLateBinding.LateIndexGet(instance2, array3, null);
  899. int num4 = 1;
  900. object instance3 = NewLateBinding.LateIndexGet(Ani._AttrRepository, new object[]
  901. {
  902. 0
  903. }, null);
  904. Type type3 = null;
  905. string memberName3 = "GetValue";
  906. object[] array4 = new object[1];
  907. int num5 = 0;
  908. object attrRepository3 = Ani._AttrRepository;
  909. object instance4 = attrRepository3;
  910. object[] array5 = new object[1];
  911. object obj3 = array5[0] = 1;
  912. array4[num5] = NewLateBinding.LateIndexGet(instance4, array5, null);
  913. object[] array6 = array4;
  914. bool[] array7;
  915. object left = NewLateBinding.LateGet(instance3, type3, memberName3, array4, null, null, array7 = new bool[]
  916. {
  917. true
  918. });
  919. if (array7[0])
  920. {
  921. NewLateBinding.LateIndexSetComplex(attrRepository3, new object[]
  922. {
  923. obj3,
  924. array6[0]
  925. }, null, true, false);
  926. }
  927. array2[num4] = Operators.AddObject(left, num);
  928. object[] array8 = array2;
  929. string[] argumentNames = null;
  930. Type[] typeArguments = null;
  931. bool[] array9 = new bool[2];
  932. array9[0] = true;
  933. bool[] array10 = array9;
  934. NewLateBinding.LateCall(instance, type2, memberName2, array2, argumentNames, typeArguments, array9, true);
  935. if (array10[0])
  936. {
  937. NewLateBinding.LateIndexSetComplex(attrRepository, new object[]
  938. {
  939. obj2,
  940. array8[0]
  941. }, null, true, false);
  942. }
  943. break;
  944. }
  945. case ModAnimation.AniTypeSub.DoubleParam:
  946. ((ParameterizedThreadStart)Ani._AttrRepository)(num);
  947. break;
  948. case ModAnimation.AniTypeSub.GridLengthWidth:
  949. NewLateBinding.LateSet(Ani._AttrRepository, null, "Width", new object[]
  950. {
  951. new GridLength(Conversions.ToDouble(NewLateBinding.LateGet(null, typeof(Math), "Max", new object[]
  952. {
  953. Operators.AddObject(NewLateBinding.LateGet(NewLateBinding.LateGet(Ani._AttrRepository, null, "Width", new object[0], null, null, null), null, "Value", new object[0], null, null, null), num),
  954. 0
  955. }, null, null, null)), GridUnitType.Star)
  956. }, null, null);
  957. break;
  958. }
  959. }
  960. break;
  961. }
  962. case ModAnimation.AniType.Color:
  963. {
  964. ModBase.MyColor b = ModBase.MathPercent(new ModBase.MyColor(0.0, 0.0, 0.0, 0.0), (ModBase.MyColor)Ani.Value, Ani._ValRepository.GetDelta((double)Ani.roleRepository / (double)Ani.statusRepository, Ani.m_StructRepository)) + (ModBase.MyColor)Ani._CandidateRepository;
  965. FrameworkElement frameworkElement3 = (FrameworkElement)NewLateBinding.LateIndexGet(Ani._AttrRepository, new object[]
  966. {
  967. 0
  968. }, null);
  969. DependencyProperty dependencyProperty = (DependencyProperty)NewLateBinding.LateIndexGet(Ani._AttrRepository, new object[]
  970. {
  971. 1
  972. }, null);
  973. ModBase.MyColor myColor = new ModBase.MyColor(RuntimeHelpers.GetObjectValue(frameworkElement3.GetValue(dependencyProperty))) + b;
  974. frameworkElement3.SetValue(dependencyProperty, RuntimeHelpers.GetObjectValue((Operators.CompareString(dependencyProperty.PropertyType.Name, "Color", false) == 0) ? myColor : myColor));
  975. Ani._CandidateRepository = myColor - new ModBase.MyColor(RuntimeHelpers.GetObjectValue(frameworkElement3.GetValue(dependencyProperty)));
  976. break;
  977. }
  978. case ModAnimation.AniType.Scale:
  979. {
  980. FrameworkElement frameworkElement4 = (FrameworkElement)Ani._AttrRepository;
  981. double delta = Ani._ValRepository.GetDelta((double)Ani.roleRepository / (double)Ani.statusRepository, Ani.m_StructRepository);
  982. frameworkElement4.Margin = new Thickness(frameworkElement4.Margin.Left + ModBase.MathPercent(0.0, Conversions.ToDouble(NewLateBinding.LateGet(Ani.Value, null, "Left", new object[0], null, null, null)), delta), frameworkElement4.Margin.Top + ModBase.MathPercent(0.0, Conversions.ToDouble(NewLateBinding.LateGet(Ani.Value, null, "Top", new object[0], null, null, null)), delta), frameworkElement4.Margin.Right + ModBase.MathPercent(0.0, Conversions.ToDouble(NewLateBinding.LateGet(Ani.Value, null, "Left", new object[0], null, null, null)), delta), frameworkElement4.Margin.Bottom + ModBase.MathPercent(0.0, Conversions.ToDouble(NewLateBinding.LateGet(Ani.Value, null, "Top", new object[0], null, null, null)), delta));
  983. frameworkElement4.Width = Math.Max(frameworkElement4.Width + ModBase.MathPercent(0.0, Conversions.ToDouble(NewLateBinding.LateGet(Ani.Value, null, "Width", new object[0], null, null, null)), delta), 0.0);
  984. frameworkElement4.Height = Math.Max(frameworkElement4.Height + ModBase.MathPercent(0.0, Conversions.ToDouble(NewLateBinding.LateGet(Ani.Value, null, "Height", new object[0], null, null, null)), delta), 0.0);
  985. break;
  986. }
  987. case ModAnimation.AniType.TextAppear:
  988. checked
  989. {
  990. int num6 = (int)Math.Round(unchecked((double)(Conversions.ToBoolean(NewLateBinding.LateIndexGet(Ani.Value, new object[]
  991. {
  992. 1
  993. }, null)) ? NewLateBinding.LateIndexGet(Ani.Value, new object[]
  994. {
  995. 0
  996. }, null).ToString().Length : 0) + Math.Round((double)(checked(NewLateBinding.LateIndexGet(Ani.Value, new object[]
  997. {
  998. 0
  999. }, null).ToString().Length * (Conversions.ToBoolean(NewLateBinding.LateIndexGet(Ani.Value, new object[]
  1000. {
  1001. 1
  1002. }, null)) ? -1 : 1))) * Ani._ValRepository.GetDelta((double)Ani.roleRepository / (double)Ani.statusRepository, 0.0))));
  1003. string text = Strings.Mid(Conversions.ToString(NewLateBinding.LateIndexGet(Ani.Value, new object[]
  1004. {
  1005. 0
  1006. }, null)), 1, num6);
  1007. if (num6 < NewLateBinding.LateIndexGet(Ani.Value, new object[]
  1008. {
  1009. 0
  1010. }, null).ToString().Length)
  1011. {
  1012. if (Convert.ToInt32(Convert.ToChar(Strings.Mid(Conversions.ToString(NewLateBinding.LateIndexGet(Ani.Value, new object[]
  1013. {
  1014. 0
  1015. }, null)), num6 + 1, 1))) >= Convert.ToInt32(Convert.ToChar(128)))
  1016. {
  1017. text += Encoding.GetEncoding("GB18030").GetString(new byte[]
  1018. {
  1019. (byte)ModBase.RandomInteger(176, 247),
  1020. (byte)ModBase.RandomInteger(161, 249)
  1021. });
  1022. }
  1023. else
  1024. {
  1025. text += Conversions.ToString(ModBase.RandomOne<char>("0123456789./*-+\\[]{};':/?,!@#$%^&*()_+-=qwwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM".ToCharArray()));
  1026. }
  1027. }
  1028. if (Ani._AttrRepository is TextBlock)
  1029. {
  1030. NewLateBinding.LateSet(Ani._AttrRepository, null, "Text", new object[]
  1031. {
  1032. text
  1033. }, null, null);
  1034. }
  1035. else
  1036. {
  1037. NewLateBinding.LateSet(Ani._AttrRepository, null, "Context", new object[]
  1038. {
  1039. text
  1040. }, null, null);
  1041. }
  1042. break;
  1043. }
  1044. case ModAnimation.AniType.Code:
  1045. ((ThreadStart)Ani.Value)();
  1046. break;
  1047. case ModAnimation.AniType.ScaleTransform:
  1048. {
  1049. FrameworkElement frameworkElement5 = (FrameworkElement)Ani._AttrRepository;
  1050. if (!(frameworkElement5.RenderTransform is ScaleTransform))
  1051. {
  1052. frameworkElement5.RenderTransformOrigin = new Point(0.5, 0.5);
  1053. frameworkElement5.RenderTransform = new ScaleTransform(1.0, 1.0);
  1054. }
  1055. double num7 = ModBase.MathPercent(0.0, Conversions.ToDouble(Ani.Value), Ani._ValRepository.GetDelta((double)Ani.roleRepository / (double)Ani.statusRepository, Ani.m_StructRepository));
  1056. ((ScaleTransform)frameworkElement5.RenderTransform).ScaleX = Math.Max(((ScaleTransform)frameworkElement5.RenderTransform).ScaleX + num7, 0.0);
  1057. ((ScaleTransform)frameworkElement5.RenderTransform).ScaleY = Math.Max(((ScaleTransform)frameworkElement5.RenderTransform).ScaleY + num7, 0.0);
  1058. break;
  1059. }
  1060. case ModAnimation.AniType.RotateTransform:
  1061. {
  1062. FrameworkElement frameworkElement6 = (FrameworkElement)Ani._AttrRepository;
  1063. if (!(frameworkElement6.RenderTransform is RotateTransform))
  1064. {
  1065. frameworkElement6.RenderTransformOrigin = new Point(0.5, 0.5);
  1066. frameworkElement6.RenderTransform = new RotateTransform(0.0);
  1067. }
  1068. double num8 = ModBase.MathPercent(0.0, Conversions.ToDouble(Ani.Value), Ani._ValRepository.GetDelta((double)Ani.roleRepository / (double)Ani.statusRepository, Ani.m_StructRepository));
  1069. ((RotateTransform)frameworkElement6.RenderTransform).Angle = ((RotateTransform)frameworkElement6.RenderTransform).Angle + num8;
  1070. break;
  1071. }
  1072. }
  1073. Ani.m_StructRepository = (double)Ani.roleRepository / (double)Ani.statusRepository;
  1074. }
  1075. catch (Exception ex)
  1076. {
  1077. ModBase.Log(ex, "执行动画失败:" + Ani.ToString(), ModBase.LogLevel.Hint, "出现错误");
  1078. }
  1079. return Ani;
  1080. }
  1081. // Token: 0x04000039 RID: 57
  1082. public static double m_Task = 1.0;
  1083. // Token: 0x0400003A RID: 58
  1084. public static Dictionary<string, ModAnimation.AniGroupEntry> _Consumer = new Dictionary<string, ModAnimation.AniGroupEntry>();
  1085. // Token: 0x0400003B RID: 59
  1086. private static long configuration;
  1087. // Token: 0x0400003C RID: 60
  1088. public static bool _Getter = false;
  1089. // Token: 0x0400003D RID: 61
  1090. private static int _Token = 0;
  1091. // Token: 0x0400003E RID: 62
  1092. private static readonly object _Writer = RuntimeHelpers.GetObjectValue(new object());
  1093. // Token: 0x0400003F RID: 63
  1094. private static int m_Registry = 0;
  1095. // Token: 0x04000040 RID: 64
  1096. private static int _Proccesor = 0;
  1097. // Token: 0x04000041 RID: 65
  1098. private static long _Setter = 0L;
  1099. // Token: 0x04000042 RID: 66
  1100. public static int factory = 0;
  1101. // Token: 0x02000028 RID: 40
  1102. public class AniGroupEntry
  1103. {
  1104. // Token: 0x06000115 RID: 277 RVA: 0x00002A9D File Offset: 0x00000C9D
  1105. public AniGroupEntry()
  1106. {
  1107. this.m_ConnectionRepository = ModBase.GetUuid();
  1108. }
  1109. // Token: 0x04000043 RID: 67
  1110. public List<ModAnimation.AniData> importerRepository;
  1111. // Token: 0x04000044 RID: 68
  1112. public long m_WorkerRepository;
  1113. // Token: 0x04000045 RID: 69
  1114. public int m_ConnectionRepository;
  1115. }
  1116. // Token: 0x02000029 RID: 41
  1117. public struct AniData
  1118. {
  1119. // Token: 0x06000117 RID: 279 RVA: 0x00012090 File Offset: 0x00010290
  1120. public override string ToString()
  1121. {
  1122. return string.Concat(new string[]
  1123. {
  1124. ModBase.GetStringFromEnum(this.serverRepository),
  1125. " | ",
  1126. Conversions.ToString(this.roleRepository),
  1127. "/",
  1128. Conversions.ToString(this.statusRepository),
  1129. "(",
  1130. Conversions.ToString(Math.Round(this.m_StructRepository * 100.0)),
  1131. "%)",
  1132. (this._AttrRepository == null) ? "" : string.Concat(new string[]
  1133. {
  1134. " | ",
  1135. this._AttrRepository.ToString(),
  1136. "(",
  1137. this._AttrRepository.GetType().Name,
  1138. ")"
  1139. })
  1140. });
  1141. }
  1142. // Token: 0x04000046 RID: 70
  1143. public ModAnimation.AniType serverRepository;
  1144. // Token: 0x04000047 RID: 71
  1145. public ModAnimation.AniTypeSub m_ResolverRepository;
  1146. // Token: 0x04000048 RID: 72
  1147. public int statusRepository;
  1148. // Token: 0x04000049 RID: 73
  1149. public int roleRepository;
  1150. // Token: 0x0400004A RID: 74
  1151. public double m_StructRepository;
  1152. // Token: 0x0400004B RID: 75
  1153. public bool printerRepository;
  1154. // Token: 0x0400004C RID: 76
  1155. public ModAnimation.AniEase _ValRepository;
  1156. // Token: 0x0400004D RID: 77
  1157. public object[] _AttrRepository;
  1158. // Token: 0x0400004E RID: 78
  1159. public object[] Value;
  1160. // Token: 0x0400004F RID: 79
  1161. public ModBase.MyColor _CandidateRepository;
  1162. }
  1163. // Token: 0x0200002A RID: 42
  1164. public enum AniType
  1165. {
  1166. // Token: 0x04000051 RID: 81
  1167. Number,
  1168. // Token: 0x04000052 RID: 82
  1169. Color,
  1170. // Token: 0x04000053 RID: 83
  1171. Scale,
  1172. // Token: 0x04000054 RID: 84
  1173. TextAppear,
  1174. // Token: 0x04000055 RID: 85
  1175. Code,
  1176. // Token: 0x04000056 RID: 86
  1177. ScaleTransform,
  1178. // Token: 0x04000057 RID: 87
  1179. RotateTransform
  1180. }
  1181. // Token: 0x0200002B RID: 43
  1182. public enum AniTypeSub
  1183. {
  1184. // Token: 0x04000059 RID: 89
  1185. X,
  1186. // Token: 0x0400005A RID: 90
  1187. Y,
  1188. // Token: 0x0400005B RID: 91
  1189. Width,
  1190. // Token: 0x0400005C RID: 92
  1191. Height,
  1192. // Token: 0x0400005D RID: 93
  1193. Opacity,
  1194. // Token: 0x0400005E RID: 94
  1195. Value,
  1196. // Token: 0x0400005F RID: 95
  1197. Radius,
  1198. // Token: 0x04000060 RID: 96
  1199. BorderThickness,
  1200. // Token: 0x04000061 RID: 97
  1201. StrokeThickness,
  1202. // Token: 0x04000062 RID: 98
  1203. TranslateX,
  1204. // Token: 0x04000063 RID: 99
  1205. TranslateY,
  1206. // Token: 0x04000064 RID: 100
  1207. Double,
  1208. // Token: 0x04000065 RID: 101
  1209. DoubleParam,
  1210. // Token: 0x04000066 RID: 102
  1211. GridLengthWidth
  1212. }
  1213. // Token: 0x0200002C RID: 44
  1214. public enum AniEasePower
  1215. {
  1216. // Token: 0x04000068 RID: 104
  1217. Weak = 2,
  1218. // Token: 0x04000069 RID: 105
  1219. Middle,
  1220. // Token: 0x0400006A RID: 106
  1221. Strong,
  1222. // Token: 0x0400006B RID: 107
  1223. ExtraStrong
  1224. }
  1225. // Token: 0x0200002D RID: 45
  1226. public abstract class AniEase
  1227. {
  1228. // Token: 0x0600011A RID: 282
  1229. public abstract double GetValue(double t);
  1230. // Token: 0x0600011B RID: 283 RVA: 0x00002AB1 File Offset: 0x00000CB1
  1231. public virtual double GetDelta(double t1, double t0)
  1232. {
  1233. return this.GetValue(t1) - this.GetValue(t0);
  1234. }
  1235. }
  1236. // Token: 0x0200002E RID: 46
  1237. public class AniEaseInout : ModAnimation.AniEase
  1238. {
  1239. // Token: 0x0600011D RID: 285 RVA: 0x00002AC2 File Offset: 0x00000CC2
  1240. public AniEaseInout(ModAnimation.AniEase EaseIn, ModAnimation.AniEase EaseOut, double EaseInPercent = 0.5)
  1241. {
  1242. this.advisorRepository = EaseIn;
  1243. this.EaseOut = EaseOut;
  1244. this.accountRepository = EaseInPercent;
  1245. }
  1246. // Token: 0x0600011E RID: 286 RVA: 0x0001216C File Offset: 0x0001036C
  1247. public override double GetValue(double t)
  1248. {
  1249. double result;
  1250. if (t < this.accountRepository)
  1251. {
  1252. result = this.accountRepository * this.advisorRepository.GetValue(t / this.accountRepository);
  1253. }
  1254. else
  1255. {
  1256. result = (1.0 - this.accountRepository) * this.EaseOut.GetValue((t - this.accountRepository) / (1.0 - this.accountRepository)) + this.accountRepository;
  1257. }
  1258. return result;
  1259. }
  1260. // Token: 0x0400006C RID: 108
  1261. private readonly ModAnimation.AniEase advisorRepository;
  1262. // Token: 0x0400006D RID: 109
  1263. private readonly ModAnimation.AniEase EaseOut;
  1264. // Token: 0x0400006E RID: 110
  1265. private readonly double accountRepository;
  1266. }
  1267. // Token: 0x0200002F RID: 47
  1268. public class AniEaseLinear : ModAnimation.AniEase
  1269. {
  1270. // Token: 0x06000121 RID: 289 RVA: 0x00002AE9 File Offset: 0x00000CE9
  1271. public override double GetValue(double t)
  1272. {
  1273. return ModBase.MathClamp(t, 0.0, 1.0);
  1274. }
  1275. // Token: 0x06000122 RID: 290 RVA: 0x00002B03 File Offset: 0x00000D03
  1276. public override double GetDelta(double t1, double t0)
  1277. {
  1278. return ModBase.MathClamp(t1, 0.0, 1.0) - ModBase.MathClamp(t0, 0.0, 1.0);
  1279. }
  1280. }
  1281. // Token: 0x02000030 RID: 48
  1282. public class AniEaseInFluent : ModAnimation.AniEase
  1283. {
  1284. // Token: 0x06000124 RID: 292 RVA: 0x00002B36 File Offset: 0x00000D36
  1285. public AniEaseInFluent(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1286. {
  1287. this.queueRepository = Power;
  1288. }
  1289. // Token: 0x06000125 RID: 293 RVA: 0x00002B46 File Offset: 0x00000D46
  1290. public override double GetValue(double t)
  1291. {
  1292. return Math.Pow(ModBase.MathClamp(t, 0.0, 1.0), (double)this.queueRepository);
  1293. }
  1294. // Token: 0x0400006F RID: 111
  1295. private readonly ModAnimation.AniEasePower queueRepository;
  1296. }
  1297. // Token: 0x02000031 RID: 49
  1298. public class AniEaseOutFluent : ModAnimation.AniEase
  1299. {
  1300. // Token: 0x06000127 RID: 295 RVA: 0x00002B6C File Offset: 0x00000D6C
  1301. public AniEaseOutFluent(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1302. {
  1303. this.eventRepository = Power;
  1304. }
  1305. // Token: 0x06000128 RID: 296 RVA: 0x00002B7C File Offset: 0x00000D7C
  1306. public override double GetValue(double t)
  1307. {
  1308. return 1.0 - Math.Pow(ModBase.MathClamp(1.0 - t, 0.0, 1.0), (double)this.eventRepository);
  1309. }
  1310. // Token: 0x04000070 RID: 112
  1311. private readonly ModAnimation.AniEasePower eventRepository;
  1312. }
  1313. // Token: 0x02000032 RID: 50
  1314. public class AniEaseInoutFluent : ModAnimation.AniEase
  1315. {
  1316. // Token: 0x0600012A RID: 298 RVA: 0x00002BB6 File Offset: 0x00000DB6
  1317. public AniEaseInoutFluent(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle, double Middle = 0.5)
  1318. {
  1319. this.m_ManagerRepository = new ModAnimation.AniEaseInout(new ModAnimation.AniEaseInFluent(Power), new ModAnimation.AniEaseOutFluent(Power), Middle);
  1320. }
  1321. // Token: 0x0600012B RID: 299 RVA: 0x00002BD7 File Offset: 0x00000DD7
  1322. public override double GetValue(double t)
  1323. {
  1324. return this.m_ManagerRepository.GetValue(t);
  1325. }
  1326. // Token: 0x04000071 RID: 113
  1327. private ModAnimation.AniEaseInout m_ManagerRepository;
  1328. }
  1329. // Token: 0x02000033 RID: 51
  1330. public class AniEaseInBack : ModAnimation.AniEase
  1331. {
  1332. // Token: 0x0600012D RID: 301 RVA: 0x00002BE5 File Offset: 0x00000DE5
  1333. public AniEaseInBack(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1334. {
  1335. this._ModelRepository = 3.0 - (double)Power * 0.5;
  1336. }
  1337. // Token: 0x0600012E RID: 302 RVA: 0x000121E0 File Offset: 0x000103E0
  1338. public override double GetValue(double t)
  1339. {
  1340. t = ModBase.MathClamp(t, 0.0, 1.0);
  1341. return Math.Pow(t, this._ModelRepository) * Math.Cos(4.71238898038469 * (1.0 - t));
  1342. }
  1343. // Token: 0x04000072 RID: 114
  1344. private readonly double _ModelRepository;
  1345. }
  1346. // Token: 0x02000034 RID: 52
  1347. public class AniEaseOutBack : ModAnimation.AniEase
  1348. {
  1349. // Token: 0x06000130 RID: 304 RVA: 0x00002C0A File Offset: 0x00000E0A
  1350. public AniEaseOutBack(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1351. {
  1352. this.wrapperRepository = 3.0 - (double)Power * 0.5;
  1353. }
  1354. // Token: 0x06000131 RID: 305 RVA: 0x00012230 File Offset: 0x00010430
  1355. public override double GetValue(double t)
  1356. {
  1357. t = ModBase.MathClamp(t, 0.0, 1.0);
  1358. return 1.0 - Math.Pow(1.0 - t, this.wrapperRepository) * Math.Cos(4.71238898038469 * t);
  1359. }
  1360. // Token: 0x04000073 RID: 115
  1361. private readonly double wrapperRepository;
  1362. }
  1363. // Token: 0x02000035 RID: 53
  1364. public class AniEaseInCar : ModAnimation.AniEase
  1365. {
  1366. // Token: 0x06000133 RID: 307 RVA: 0x00002C2F File Offset: 0x00000E2F
  1367. public AniEaseInCar(double Middle = 0.7, ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1368. {
  1369. this.baseRepository = new ModAnimation.AniEaseInout(new ModAnimation.AniEaseInBack(Power), new ModAnimation.AniEaseOutFluent(Power), Middle);
  1370. }
  1371. // Token: 0x06000134 RID: 308 RVA: 0x00002C50 File Offset: 0x00000E50
  1372. public override double GetValue(double t)
  1373. {
  1374. return this.baseRepository.GetValue(t);
  1375. }
  1376. // Token: 0x04000074 RID: 116
  1377. private ModAnimation.AniEaseInout baseRepository;
  1378. }
  1379. // Token: 0x02000036 RID: 54
  1380. public class AniEaseOutCar : ModAnimation.AniEase
  1381. {
  1382. // Token: 0x06000136 RID: 310 RVA: 0x00002C5E File Offset: 0x00000E5E
  1383. public AniEaseOutCar(double Middle = 0.3, ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1384. {
  1385. this.attributeRepository = new ModAnimation.AniEaseInout(new ModAnimation.AniEaseInFluent(Power), new ModAnimation.AniEaseOutBack(Power), Middle);
  1386. }
  1387. // Token: 0x06000137 RID: 311 RVA: 0x00002C7F File Offset: 0x00000E7F
  1388. public override double GetValue(double t)
  1389. {
  1390. return this.attributeRepository.GetValue(t);
  1391. }
  1392. // Token: 0x04000075 RID: 117
  1393. private ModAnimation.AniEaseInout attributeRepository;
  1394. }
  1395. // Token: 0x02000037 RID: 55
  1396. public class AniEaseInElastic : ModAnimation.AniEase
  1397. {
  1398. // Token: 0x06000139 RID: 313 RVA: 0x00002C8D File Offset: 0x00000E8D
  1399. public AniEaseInElastic(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1400. {
  1401. this.codeRepository = (int)(checked(Power + 4));
  1402. }
  1403. // Token: 0x0600013A RID: 314 RVA: 0x00012288 File Offset: 0x00010488
  1404. public override double GetValue(double t)
  1405. {
  1406. t = ModBase.MathClamp(t, 0.0, 1.0);
  1407. return Math.Pow(t, (double)(checked(this.codeRepository - 1)) * 0.25) * Math.Cos(((double)this.codeRepository - 3.5) * 3.141592653589793 * Math.Pow(1.0 - t, 1.5));
  1408. }
  1409. // Token: 0x04000076 RID: 118
  1410. private readonly int codeRepository;
  1411. }
  1412. // Token: 0x02000038 RID: 56
  1413. public class AniEaseOutElastic : ModAnimation.AniEase
  1414. {
  1415. // Token: 0x0600013C RID: 316 RVA: 0x00002C9F File Offset: 0x00000E9F
  1416. public AniEaseOutElastic(ModAnimation.AniEasePower Power = ModAnimation.AniEasePower.Middle)
  1417. {
  1418. this.prototypeRepository = (int)(checked(Power + 4));
  1419. }
  1420. // Token: 0x0600013D RID: 317 RVA: 0x00012304 File Offset: 0x00010504
  1421. public override double GetValue(double t)
  1422. {
  1423. t = 1.0 - ModBase.MathClamp(t, 0.0, 1.0);
  1424. return 1.0 - Math.Pow(t, (double)(checked(this.prototypeRepository - 1)) * 0.25) * Math.Cos(((double)this.prototypeRepository - 3.5) * 3.141592653589793 * Math.Pow(1.0 - t, 1.5));
  1425. }
  1426. // Token: 0x04000077 RID: 119
  1427. private readonly int prototypeRepository;
  1428. }
  1429. }
  1430. }