Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TransAnime Class Reference

Public Member Functions

TransAnime Init ()
 
bool Update ()
 

Public Attributes

Vector3 v
 
Point point
 
CardRenderer renderer
 
TransAnimeData data
 
int frame
 
int startFrame
 
float timer
 
Vector3 dest
 
bool animeBlock
 
bool flipX
 
bool drawBlock
 

Detailed Description

Definition at line 3 of file TransAnime.cs.

Member Function Documentation

◆ Init()

TransAnime TransAnime.Init ( )
inline

Definition at line 27 of file TransAnime.cs.

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 }
Definition: Rand.cs:4
static int rnd(int max)
Definition: Rand.cs:52
TransAnimeData data
Definition: TransAnime.cs:11
bool flipX
Definition: TransAnime.cs:23
float timer
Definition: TransAnime.cs:17

References data, flipX, Random, TransAnimeData.randomDelay, TransAnimeData.randomFlipX, Rand.rnd(), and timer.

◆ Update()

bool TransAnime.Update ( )
inline

Definition at line 40 of file TransAnime.cs.

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 }
CellDetail detail
Definition: Cell.cs:92
void TryDespawnDetail()
Definition: Cell.cs:1538
Cell cell
Definition: Point.cs:51
static float gameDelta
Definition: RenderObject.cs:6
Vector3[] vectors
Point point
Definition: TransAnime.cs:7
CardRenderer renderer
Definition: TransAnime.cs:9
Vector3 v
Definition: TransAnime.cs:5

References Point.cell, data, Cell.detail, TransAnimeData.directional, flipX, frame, RenderObject.gameDelta, TransAnimeData.interval, TransAnimeData.loop, point, Random, TransAnimeData.randomMtp, renderer, timer, TransAnimeData.TotalFrame, Cell.TryDespawnDetail(), v, and TransAnimeData.vectors.

Referenced by CardRenderer.Draw(), and EffectIRenderer.OnUpdate().

Member Data Documentation

◆ animeBlock

bool TransAnime.animeBlock

Definition at line 21 of file TransAnime.cs.

Referenced by BaseTileMap.DrawTile(), and TileMapElona.DrawTile().

◆ data

TransAnimeData TransAnime.data

Definition at line 11 of file TransAnime.cs.

Referenced by Init(), and Update().

◆ dest

Vector3 TransAnime.dest

Definition at line 19 of file TransAnime.cs.

◆ drawBlock

bool TransAnime.drawBlock

Definition at line 25 of file TransAnime.cs.

Referenced by BaseTileMap.DrawTile().

◆ flipX

bool TransAnime.flipX

Definition at line 23 of file TransAnime.cs.

Referenced by Init(), and Update().

◆ frame

int TransAnime.frame

Definition at line 13 of file TransAnime.cs.

Referenced by Update().

◆ point

Point TransAnime.point

Definition at line 7 of file TransAnime.cs.

Referenced by Update().

◆ renderer

CardRenderer TransAnime.renderer

Definition at line 9 of file TransAnime.cs.

Referenced by Update().

◆ startFrame

int TransAnime.startFrame

Definition at line 15 of file TransAnime.cs.

◆ timer

float TransAnime.timer

Definition at line 17 of file TransAnime.cs.

Referenced by Init(), and Update().

◆ v

Vector3 TransAnime.v

The documentation for this class was generated from the following file: