Elin Modding Docs Doc
Loading...
Searching...
No Matches
CharaActor.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000175 RID: 373
5public class CharaActor : CardActor
6{
7 // Token: 0x06000AD9 RID: 2777 RVA: 0x00043556 File Offset: 0x00041756
8 public void SetOwnerAsChara()
9 {
10 this.owner = (this.owner as Chara);
11 }
12
13 // Token: 0x06000ADA RID: 2778 RVA: 0x0004356C File Offset: 0x0004176C
14 public override void OnSetOwner()
15 {
16 this.SetOwnerAsChara();
17 this.sr.sprite = this.owner.GetSprite(0);
18 this.mpb.SetTexture("_MainTex", this.sr.sprite.texture);
19 this.IdleFrame();
20 }
21
22 // Token: 0x06000ADB RID: 2779 RVA: 0x000435BC File Offset: 0x000417BC
23 public override void NextFrame()
24 {
25 this.RefreshSprite();
26 }
27
28 // Token: 0x06000ADC RID: 2780 RVA: 0x000435C4 File Offset: 0x000417C4
29 public override void RefreshSprite()
30 {
31 Sprite sprite = this.sr.sprite;
32 Texture2D texture = sprite.texture;
33 Rect textureRect = sprite.textureRect;
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 this.mpb.SetVector("_Rect", value);
36 this.mpb.SetFloat("_PixelHeight", sprite.rect.height);
37 }
38
39 // Token: 0x040009F5 RID: 2549
40 public new Chara owner;
41}
Definition Chara.cs:12