Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
NotificationBattle.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
5{
6 public int index;
7
8 public override bool Visible => widget.battles > 0;
9
10 public override Action<UITooltip> onShowTooltip => delegate(UITooltip a)
11 {
12 a.textMain.text = "battles".lang() + ": " + widget.battles;
13 };
14
15 public override void OnRefresh()
16 {
17 text = widget.battles.ToString() ?? "";
18 }
19
20 public override void OnClick()
21 {
22 if (EClass.AdvMode)
23 {
24 return;
25 }
26 List<Chara> list = new List<Chara>();
27 foreach (Chara chara in EClass._map.charas)
28 {
29 if (chara.IsHomeMember() && chara.enemy != null && chara.IsAliveInCurrentZone)
30 {
31 list.Add(chara);
32 }
33 }
34 index++;
35 if (index >= list.Count)
36 {
37 index = 0;
38 }
39 EClass.screen.Focus(list[index]);
40 }
41}
void Focus(Int3 ints)
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:546
bool IsHomeMember()
Definition: Chara.cs:5942
Chara enemy
Definition: Chara.cs:83
Definition: EClass.cs:5
static Map _map
Definition: EClass.cs:18
static bool AdvMode
Definition: EClass.cs:10
static BaseGameScreen screen
Definition: EClass.cs:32
List< Chara > charas
Definition: Map.cs:81
override bool Visible
override Action< UITooltip > onShowTooltip
override void OnClick()
override void OnRefresh()
virtual WidgetNotice widget