Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TCOrbitThing.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class TCOrbitThing : TCOrbit
4{
5 public GameObject goIcon;
6
7 public SpriteRenderer iconStatus;
8
9 public new Thing owner;
10
11 private float timer;
12
13 public override void OnSetOwner()
14 {
15 owner = base.owner as Thing;
17 goIcon.transform.SetLocalPositionY(data.offset.y + data.size.y + 0.32f);
18 RefreshAll();
19 }
20
21 public override void Refresh()
22 {
23 timer += Time.deltaTime;
24 if (timer > 0.2f)
25 {
26 timer = 0f;
27 RefreshAll();
28 }
30 {
31 if (!base.gameObject.activeSelf)
32 {
33 base.gameObject.SetActive(value: true);
34 }
35 base.transform.position = owner.renderer.position;
36 }
37 else if (base.gameObject.activeSelf)
38 {
39 base.gameObject.SetActive(value: false);
40 }
41 }
42
43 public void RefreshAll()
44 {
46 Emo2 emo = Emo2.none;
48 {
50 {
52 }
54 {
55 emo = Emo2.fur;
56 }
57 }
58 bool flag = emo != Emo2.none;
59 if (flag)
60 {
61 iconStatus.sprite = EMono.core.refs.spritesEmo[(int)emo];
62 }
63 iconStatus.SetActive(flag);
64 }
65}
Emo2
Definition: Emo2.cs:2
Vector3 position
Definition: CardRenderer.cs:21
bool isRestocking
Definition: Card.cs:862
virtual bool IsPCParty
Definition: Card.cs:2025
Trait trait
Definition: Card.cs:49
bool CanBeSheared()
Definition: Card.cs:6996
bool IsInstalled
Definition: Card.cs:2241
bool isHidden
Definition: Card.cs:502
CardRenderer renderer
Definition: Card.cs:57
bool CanSee(Card c)
Definition: Chara.cs:1027
List< Sprite > spritesEmo
Definition: CoreRef.cs:361
OrbitIcons orbitIcons
Definition: CoreRef.cs:331
CoreRef refs
Definition: Core.cs:51
Definition: EMono.cs:4
static Core core
Definition: EMono.cs:5
static Chara pc
Definition: EMono.cs:13
static Player player
Definition: EMono.cs:11
static Zone _zone
Definition: EMono.cs:19
virtual Thing Thing
Definition: HotItem.cs:38
HotItem currentHotItem
Definition: Player.cs:901
Vector3 offset
Definition: RenderData.cs:18
Vector2 size
Definition: RenderData.cs:30
RenderData data
Definition: RenderObject.cs:34
override void Refresh()
Definition: TCOrbitThing.cs:21
SpriteRenderer iconStatus
Definition: TCOrbitThing.cs:7
override void OnSetOwner()
Definition: TCOrbitThing.cs:13
GameObject goIcon
Definition: TCOrbitThing.cs:5
new Thing owner
Definition: TCOrbitThing.cs:9
void RefreshAll()
Definition: TCOrbitThing.cs:43
Definition: Thing.cs:8
Emo2 GetRestockedIcon()
Definition: Trait.cs:1441