Elin Decompiled Documentation EA 23.356.1 Nightly
Loading...
Searching...
No Matches
SkinDecoActor.cs
Go to the documentation of this file.
1using UnityEngine;
2using UnityEngine.UI;
3
4public class SkinDecoActor : MonoBehaviour
5{
6 public SkinDeco owner;
7
8 public Image image;
9
10 public Shadow shadow;
11
12 public void Refresh(bool editing = true)
13 {
14 image.SetNativeSize();
15 Vector2 sizeDelta = this.Rect().sizeDelta;
16 this.Rect().sizeDelta = new Vector2(sizeDelta.x * (float)owner.sx * 0.01f, sizeDelta.y * (float)owner.sy * 0.01f);
17 image.color = owner.color;
18 base.transform.localEulerAngles = new Vector3(0f, 0f, owner.rz * 45);
19 base.transform.localScale = new Vector3((!owner.reverse) ? 1 : (-1), 1f, 1f);
20 shadow.enabled = owner.shadow;
21 shadow.effectDistance = new Vector2(owner.reverse ? (-3) : 3, -3f);
22 if (owner.bottom)
23 {
24 base.transform.SetSiblingIndex(editing ? 1 : 0);
25 }
26 else
27 {
28 base.transform.SetSiblingIndex(base.transform.childCount - 1);
29 }
30 }
31}
void Refresh(bool editing=true)
SkinDeco owner
Definition: SkinDecoActor.cs:6
int sy
Definition: SkinDeco.cs:67
int rz
Definition: SkinDeco.cs:91
Color color
Definition: SkinDeco.cs:79
bool bottom
Definition: SkinDeco.cs:139
bool reverse
Definition: SkinDeco.cs:127
int sx
Definition: SkinDeco.cs:55
bool shadow
Definition: SkinDeco.cs:115