Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
CharaActor Class Reference
Inheritance diagram for CharaActor:
CardActor Actor SceneObject EMono CharaActorPCC

Public Member Functions

void SetOwnerAsChara ()
 
override void OnSetOwner ()
 
override void NextFrame ()
 
override void RefreshSprite ()
 
- Public Member Functions inherited from CardActor
void SetOwner (Card t)
 
virtual void OnSetOwner ()
 
virtual void IdleFrame ()
 
virtual void NextFrame ()
 
virtual void NextDir ()
 
virtual int GetFrame ()
 
virtual void OnRender (RenderParam p)
 
virtual void RefreshSprite ()
 
virtual void Kill ()
 

Public Attributes

new Chara owner
 
- Public Attributes inherited from CardActor
Card owner
 
SpriteRenderer sr
 
SpriteRenderer sr2
 
SpriteReplacerAnimation srAnime
 
MaterialPropertyBlock mpb
 
MaterialPropertyBlock mpb2
 
Type type
 

Additional Inherited Members

- Public Types inherited from CardActor
enum  Type { Default , Boat , Canvas , MultiSprite }
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 
- Static Protected Attributes inherited from CardActor
static Vector3 tempV
 
static Vector3 tempV2
 
- Properties inherited from CardActor
virtual bool isPCC [get]
 
virtual int currentDir [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]
 

Detailed Description

Definition at line 3 of file CharaActor.cs.

Member Function Documentation

◆ NextFrame()

override void CharaActor.NextFrame ( )
inlinevirtual

Reimplemented from CardActor.

Reimplemented in CharaActorPCC.

Definition at line 20 of file CharaActor.cs.

21 {
23 }
override void RefreshSprite()
Definition: CharaActor.cs:25

References RefreshSprite().

◆ OnSetOwner()

override void CharaActor.OnSetOwner ( )
inlinevirtual

Reimplemented from CardActor.

Reimplemented in CharaActorPCC.

Definition at line 12 of file CharaActor.cs.

13 {
15 sr.sprite = owner.GetSprite();
16 mpb.SetTexture("_MainTex", sr.sprite.texture);
17 IdleFrame();
18 }
SpriteRenderer sr
Definition: CardActor.cs:15
virtual void IdleFrame()
Definition: CardActor.cs:86
MaterialPropertyBlock mpb
Definition: CardActor.cs:21
void SetOwnerAsChara()
Definition: CharaActor.cs:7
new Chara owner
Definition: CharaActor.cs:5
override Sprite GetSprite(int dir=0)
Definition: Chara.cs:6046

References Chara.GetSprite(), CardActor.IdleFrame(), CardActor.mpb, owner, SetOwnerAsChara(), and CardActor.sr.

◆ RefreshSprite()

override void CharaActor.RefreshSprite ( )
inlinevirtual

Reimplemented from CardActor.

Reimplemented in CharaActorPCC.

Definition at line 25 of file CharaActor.cs.

26 {
27 Sprite sprite = sr.sprite;
28 Texture2D texture = sprite.texture;
29 Rect textureRect = sprite.textureRect;
30 if (!isPCC)
31 {
32 sr.flipX = owner.flipX;
33 }
34 Vector4 value = new Vector4(textureRect.x / (float)texture.width, textureRect.min.y / (float)texture.height, textureRect.max.x / (float)texture.width, textureRect.max.y / (float)texture.height);
35 mpb.SetVector("_Rect", value);
36 mpb.SetFloat("_PixelHeight", sprite.rect.height);
37 }
virtual bool isPCC
Definition: CardActor.cs:39
override bool flipX
Definition: Chara.cs:532

References Chara.flipX, CardActor.isPCC, CardActor.mpb, owner, and CardActor.sr.

Referenced by NextFrame().

◆ SetOwnerAsChara()

void CharaActor.SetOwnerAsChara ( )
inline

Definition at line 7 of file CharaActor.cs.

8 {
9 owner = base.owner as Chara;
10 }
Definition: Chara.cs:10

References owner.

Referenced by OnSetOwner(), and CharaActorPCC.OnSetOwner().

Member Data Documentation

◆ owner


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