Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TCState Class Reference
Inheritance diagram for TCState:
TC EMono

Public Member Functions

void SetSprite (MultiSprite _sprites)
 
void UpdateFrame ()
 
- Public Member Functions inherited from TC
void SetOwner (CardRenderer r)
 
virtual void OnSetOwner ()
 
virtual void OnDraw (ref Vector3 pos)
 
void Kill ()
 
virtual void OnKill ()
 

Public Attributes

SpriteRenderer sr
 
MultiSprite sprites
 
- Public Attributes inherited from TC
CardRenderer render
 

Properties

override Vector3 FixPos [get]
 
- Properties inherited from TC
Card owner [get]
 
virtual bool isUI [get]
 
virtual Vector3 FixPos [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void OnDisable ()
 

Private Attributes

int index
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from TC
static GameSetting.RenderSetting.TCSetting _setting
 
- Static Public Attributes inherited from EMono
static Core core
 

Detailed Description

Definition at line 3 of file TCState.cs.

Member Function Documentation

◆ OnDisable()

void TCState.OnDisable ( )
inlineprivate

Definition at line 28 of file TCState.cs.

29 {
30 CancelInvoke();
31 sprites = null;
32 }
MultiSprite sprites
Definition: TCState.cs:7

References sprites.

◆ SetSprite()

void TCState.SetSprite ( MultiSprite  _sprites)
inline

Definition at line 13 of file TCState.cs.

14 {
15 if (sprites != _sprites)
16 {
17 CancelInvoke();
18 sprites = _sprites;
19 sr.sprite = sprites.frames[0];
20 if (sprites.frames.Length > 1)
21 {
22 index = 0;
23 InvokeRepeating("UpdateFrame", sprites.interval, sprites.interval);
24 }
25 }
26 }
float interval
Definition: MultiSprite.cs:9
Sprite[] frames
Definition: MultiSprite.cs:7
int index
Definition: TCState.cs:9

References MultiSprite.frames, index, MultiSprite.interval, and sprites.

Referenced by CharaRenderer.RefreshStateIcon().

◆ UpdateFrame()

void TCState.UpdateFrame ( )
inline

Definition at line 34 of file TCState.cs.

35 {
36 index++;
37 if (index >= sprites.frames.Length)
38 {
39 index = 0;
40 }
41 sr.sprite = sprites.frames[index];
42 }

References MultiSprite.frames, index, and sprites.

Member Data Documentation

◆ index

int TCState.index
private

Definition at line 9 of file TCState.cs.

Referenced by SetSprite(), and UpdateFrame().

◆ sprites

MultiSprite TCState.sprites

Definition at line 7 of file TCState.cs.

Referenced by OnDisable(), SetSprite(), and UpdateFrame().

◆ sr

SpriteRenderer TCState.sr

Definition at line 5 of file TCState.cs.

Property Documentation

◆ FixPos

override Vector3 TCState.FixPos
get

Definition at line 11 of file TCState.cs.


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