Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIAutoTurn Class Reference
Inheritance diagram for UIAutoTurn:
EMono

Public Attributes

Image icon
 
Sprite[] iconSprites
 
Gauge gauge
 
string hint
 

Private Member Functions

void Awake ()
 
void _Update ()
 

Private Attributes

int count
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 
- 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 4 of file UIAutoTurn.cs.

Member Function Documentation

◆ _Update()

void UIAutoTurn._Update ( )
inlineprivate

Definition at line 21 of file UIAutoTurn.cs.

22 {
23 float now = 0f;
24 float num = 0f;
25 hint = null;
27 {
29 {
30 num = 1f;
31 for (int num2 = EMono.pc.conditions.Count - 1; num2 >= 0; num2--)
32 {
33 if (EMono.pc.conditions[num2].ConsumeTurn)
34 {
35 hint = EMono.pc.conditions[num2].GetText().ToTitleCase();
36 }
37 }
38 }
39 else if (!EMono.pc.HasNoGoal)
40 {
41 AIProgress progress = EMono.pc.ai.GetProgress();
42 if (EMono.pc.ai.IsAutoTurn || progress != null)
43 {
44 if (progress != null)
45 {
46 hint = progress.TextHint;
47 num = (progress.ShowProgress ? progress.MaxProgress : 0);
48 now = (progress.ShowProgress ? progress.progress : 0);
49 }
50 else
51 {
52 num = EMono.pc.ai.MaxProgress;
53 now = (EMono.pc.ai.ShowProgress ? EMono.pc.ai.CurrentProgress : 0);
54 }
55 }
56 }
57 }
58 if (!gauge.gameObject.activeSelf && num != 0f)
59 {
60 gauge.bar.rectTransform.sizeDelta = new Vector2(0f, gauge.bar.rectTransform.sizeDelta.y);
61 }
62 gauge.SetActive(num != 0f);
63 if (num != 0f)
64 {
65 gauge.textNow.SetActive(hint != null);
66 count++;
67 gauge.UpdateValue(now, num);
68 if (hint != null)
69 {
71 }
72 icon.sprite = iconSprites[count / 5 % 2];
73 }
74 }
virtual bool IsAutoTurn
Definition: AIAct.cs:76
AIProgress GetProgress()
Definition: AIAct.cs:148
virtual int MaxProgress
Definition: AIAct.cs:84
virtual string TextHint
Definition: AIProgress.cs:17
AIAct ai
Definition: Chara.cs:187
List< Condition > conditions
Definition: Chara.cs:196
bool HasNoGoal
Definition: Chara.cs:821
bool WillConsumeTurn()
Definition: Chara.cs:3343
bool IsGameStarted
Definition: Core.cs:84
Definition: EMono.cs:4
static Core core
Definition: EMono.cs:5
static Chara pc
Definition: EMono.cs:13
void UpdateValue(float now, float _max)
Definition: Gauge.cs:68
RawImage bar
Definition: Gauge.cs:14
UIText textNow
Definition: Gauge.cs:8
Sprite[] iconSprites
Definition: UIAutoTurn.cs:8
string hint
Definition: UIAutoTurn.cs:12
Gauge gauge
Definition: UIAutoTurn.cs:10
void SetText(string s)
Definition: UIText.cs:159

References Chara.ai, Gauge.bar, Chara.conditions, EMono.core, count, gauge, AIAct.GetProgress(), Chara.HasNoGoal, hint, iconSprites, AIAct.IsAutoTurn, Core.IsGameStarted, AIAct.MaxProgress, EMono.pc, UIText.SetText(), AIProgress.TextHint, Gauge.textNow, Gauge.UpdateValue(), and Chara.WillConsumeTurn().

◆ Awake()

void UIAutoTurn.Awake ( )
inlineprivate

Definition at line 16 of file UIAutoTurn.cs.

17 {
18 InvokeRepeating("_Update", 0f, 0.05f);
19 }

Member Data Documentation

◆ count

int UIAutoTurn.count
private

Definition at line 14 of file UIAutoTurn.cs.

Referenced by _Update().

◆ gauge

Gauge UIAutoTurn.gauge

Definition at line 10 of file UIAutoTurn.cs.

Referenced by _Update().

◆ hint

string UIAutoTurn.hint

Definition at line 12 of file UIAutoTurn.cs.

Referenced by _Update().

◆ icon

Image UIAutoTurn.icon

Definition at line 6 of file UIAutoTurn.cs.

◆ iconSprites

Sprite [] UIAutoTurn.iconSprites

Definition at line 8 of file UIAutoTurn.cs.

Referenced by _Update().


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