Elin Modding Docs Doc
Loading...
Searching...
No Matches
TransAnime.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000186 RID: 390
5public class TransAnime
6{
7 // Token: 0x06000B31 RID: 2865 RVA: 0x000459CC File Offset: 0x00043BCC
8 public TransAnime Init()
9 {
10 if (this.data.randomFlipX && Rand.rnd(2) == 0)
11 {
12 this.flipX = true;
13 }
14 if (this.data.randomDelay != 0f)
15 {
16 this.timer -= UnityEngine.Random.Range(0f, this.data.randomDelay);
17 }
18 return this;
19 }
20
21 // Token: 0x06000B32 RID: 2866 RVA: 0x00045A2C File Offset: 0x00043C2C
22 public bool Update()
23 {
24 this.timer += RenderObject.gameDelta;
25 if (this.timer > this.data.interval)
26 {
27 this.timer -= this.data.interval;
28 this.frame++;
29 if (this.frame >= this.data.TotalFrame)
30 {
31 if (!this.data.loop)
32 {
33 if (this.point != null && this.point.cell.detail != null)
34 {
35 this.point.cell.detail.anime = null;
36 this.point.cell.TryDespawnDetail();
37 }
38 else if (this.renderer != null)
39 {
40 this.renderer.anime = null;
41 }
42 return true;
43 }
44 this.frame = 0;
45 }
46 }
47 this.v = this.data.vectors[this.frame];
48 if (this.data.randomMtp != 0f)
49 {
50 this.v *= UnityEngine.Random.Range(1f - this.data.randomMtp, 1f + this.data.randomMtp);
51 }
52 if (this.flipX)
53 {
54 this.v.x = this.v.x * -1f;
55 }
56 if (this.data.directional)
57 {
58 this.v.y = this.dest.y * this.v.x;
59 this.v.x = this.dest.x * this.v.x;
60 this.v.z = 0f;
61 }
62 if (this.renderer != null)
63 {
64 RenderObject.currentParam.x += this.v.x;
65 RenderObject.currentParam.y += this.v.y;
66 RenderObject.currentParam.z += this.v.z;
67 }
68 return false;
69 }
70
71 // Token: 0x04000A49 RID: 2633
72 public Vector3 v;
73
74 // Token: 0x04000A4A RID: 2634
75 public Point point;
76
77 // Token: 0x04000A4B RID: 2635
78 public CardRenderer renderer;
79
80 // Token: 0x04000A4C RID: 2636
81 public TransAnimeData data;
82
83 // Token: 0x04000A4D RID: 2637
84 public int frame;
85
86 // Token: 0x04000A4E RID: 2638
87 public int startFrame;
88
89 // Token: 0x04000A4F RID: 2639
90 public float timer;
91
92 // Token: 0x04000A50 RID: 2640
93 public Vector3 dest;
94
95 // Token: 0x04000A51 RID: 2641
96 public bool animeBlock;
97
98 // Token: 0x04000A52 RID: 2642
99 public bool flipX;
100
101 // Token: 0x04000A53 RID: 2643
102 public bool drawBlock;
103}
Definition Point.cs:11