Elin Decompiled Documentation EA 23.268 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 + owner.Pref.heightFix);
18 timer = 0f;
19 Refresh();
20 RefreshAll();
21 }
22
23 public override void Refresh()
24 {
25 timer += Time.deltaTime;
26 if (timer > 0.2f)
27 {
28 timer = 0f;
29 RefreshAll();
30 }
32 {
33 if (!base.gameObject.activeSelf)
34 {
35 base.gameObject.SetActive(value: true);
36 }
37 base.transform.position = owner.renderer.position;
38 }
39 else if (base.gameObject.activeSelf)
40 {
41 base.gameObject.SetActive(value: false);
42 }
43 }
44
45 public override void RefreshAll()
46 {
48 Emo2 emo = Emo2.none;
50 {
52 {
54 }
56 {
57 emo = Emo2.fur;
58 }
59 }
60 bool flag = emo != Emo2.none;
61 if (flag)
62 {
63 iconStatus.sprite = EMono.core.refs.spritesEmo[(int)emo];
64 }
65 iconStatus.SetActive(flag);
66 }
67}
Emo2
Definition: Emo2.cs:2
Vector3 position
Definition: CardRenderer.cs:21
bool isRestocking
Definition: Card.cs:891
virtual bool IsPCParty
Definition: Card.cs:2152
Trait trait
Definition: Card.cs:54
bool CanBeSheared()
Definition: Card.cs:8062
bool IsInstalled
Definition: Card.cs:2384
bool isHidden
Definition: Card.cs:531
CardRenderer renderer
Definition: Card.cs:62
bool CanSee(Card c)
Definition: Chara.cs:1220
List< Sprite > spritesEmo
Definition: CoreRef.cs:377
OrbitIcons orbitIcons
Definition: CoreRef.cs:347
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:1100
Vector3 offset
Definition: RenderData.cs:18
Vector2 size
Definition: RenderData.cs:30
RenderData data
Definition: RenderObject.cs:34
float heightFix
Definition: SourcePref.cs:303
override void Refresh()
Definition: TCOrbitThing.cs:23
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
override void RefreshAll()
Definition: TCOrbitThing.cs:45
Definition: Thing.cs:8
override SourcePref Pref
Definition: Thing.cs:50
Emo2 GetRestockedIcon()
Definition: Trait.cs:1505