Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TransAnime.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class TransAnime
4{
5 public Vector3 v;
6
7 public Point point;
8
10
12
13 public int frame;
14
15 public int startFrame;
16
17 public float timer;
18
19 public Vector3 dest;
20
21 public bool animeBlock;
22
23 public bool flipX;
24
25 public bool drawBlock;
26
28 {
29 if (data.randomFlipX && Rand.rnd(2) == 0)
30 {
31 flipX = true;
32 }
33 if (data.randomDelay != 0f)
34 {
35 timer -= Random.Range(0f, data.randomDelay);
36 }
37 return this;
38 }
39
40 public bool Update()
41 {
43 if (timer > data.interval)
44 {
46 frame++;
47 if (frame >= data.TotalFrame)
48 {
49 if (!data.loop)
50 {
51 if (point != null && point.cell.detail != null)
52 {
53 point.cell.detail.anime = null;
55 }
56 else if (renderer != null)
57 {
58 renderer.anime = null;
59 }
60 return true;
61 }
62 frame = 0;
63 }
64 }
65 if (frame >= data.vectors.Length)
66 {
67 frame = data.vectors.Length - 1;
68 }
70 if (data.randomMtp != 0f)
71 {
72 v *= Random.Range(1f - data.randomMtp, 1f + data.randomMtp);
73 }
74 if (flipX)
75 {
76 v.x *= -1f;
77 }
78 if (data.directional)
79 {
80 v.y = dest.y * v.x;
81 v.x = dest.x * v.x;
82 v.z = 0f;
83 }
84 if (renderer != null)
85 {
86 RenderObject.currentParam.x += v.x;
87 RenderObject.currentParam.y += v.y;
88 RenderObject.currentParam.z += v.z;
89 }
90 return false;
91 }
92}
CellDetail detail
Definition: Cell.cs:92
void TryDespawnDetail()
Definition: Cell.cs:1538
Definition: Point.cs:9
Cell cell
Definition: Point.cs:51
Definition: Rand.cs:4
static int rnd(int max)
Definition: Rand.cs:52
static float gameDelta
Definition: RenderObject.cs:6
Vector3[] vectors
Point point
Definition: TransAnime.cs:7
CardRenderer renderer
Definition: TransAnime.cs:9
Vector3 dest
Definition: TransAnime.cs:19
TransAnimeData data
Definition: TransAnime.cs:11
int startFrame
Definition: TransAnime.cs:15
Vector3 v
Definition: TransAnime.cs:5
bool animeBlock
Definition: TransAnime.cs:21
bool flipX
Definition: TransAnime.cs:23
float timer
Definition: TransAnime.cs:17
bool drawBlock
Definition: TransAnime.cs:25
TransAnime Init()
Definition: TransAnime.cs:27
bool Update()
Definition: TransAnime.cs:40