Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
WidgetDebug Class Reference
Inheritance diagram for WidgetDebug:
Widget EMono IChangeResolution ISkinRoot

Public Member Functions

override void OnActivate ()
 
void Refresh ()
 
void ToggleProps ()
 
void ToggleUpdates ()
 
void ToggleOther ()
 
- Public Member Functions inherited from Widget
void Test ()
 
bool IsInRightMode ()
 
void Activate ()
 
void RefreshOrder ()
 
virtual void OnActivate ()
 
virtual object CreateExtra ()
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
void Close ()
 
void Reactivate ()
 
virtual void OnManagerActivate ()
 
virtual void OnManagerDeactivate ()
 
void SetAnchor (RectPosition p)
 
void SetPivot (RectPosition p)
 
virtual void OnChangePivot ()
 
void UpdateConfig ()
 
virtual void OnUpdateConfig ()
 
void ClampToScreen ()
 
virtual void OnChangeResolution ()
 
void OnChangePosition ()
 
virtual void OnChangeActionMode ()
 
virtual void OnFlip ()
 
bool IsAlignTop ()
 
Layer AddLayer (Layer l, Transform trans)
 
void RefreshTipPivotPosition ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 
void SetSkin (int id, int v=0)
 
void TestSkin ()
 
virtual void ApplySkin ()
 
virtual void OnApplySkin ()
 
void InstantiateDeco (SkinDeco deco)
 
void AddDeco (SkinDeco deco)
 
void RemoveDeco (SkinDeco deco)
 
virtual bool CanShowContextMenu ()
 
void ShowContextMenu ()
 
void SetBaseContextMenu (UIContextMenu m)
 
virtual void OnSetContextMenu (UIContextMenu m)
 
void SetGridContextMenu (UIContextMenu m)
 
void SoundActivate ()
 
void OnChangeResolution ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 

Public Attributes

Text debugText
 
Text textFPS
 
bool showUpdates
 
bool showProps
 
bool showOther
 
- Public Attributes inherited from Widget
Image imageBG
 
SoundData soundActivate
 
UIDragPanel dragPanel
 
RectTransform tipPivotLeft
 
RectTransform tipPivotRight
 

Static Public Attributes

static string output
 
- Static Public Attributes inherited from EMono
static Core core
 

Private Member Functions

void OnEnable ()
 
void OnDisable ()
 
void UpdateText ()
 

Private Attributes

Timer.TimerItem timer
 
float deltaTime
 
int lastPathCount
 

Additional Inherited Members

- Public Types inherited from Widget
enum  WidgetType { Default , ZoomMenu }
 
enum  State { Active , Inactive }
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Protected Member Functions inherited from Widget
void ClampToScreenEnsured (Component c, Vector2 anchoredPos)
 
void ClampToScreen (RectTransform rect, float margin=10f)
 
- Protected Attributes inherited from Widget
bool flip
 
- Properties inherited from Widget
string ID [get]
 
Config config [get]
 
SkinRoot skinRoot [get]
 
bool IsSealed [get]
 
virtual bool ShowStyleMenu [get]
 
virtual bool AlwaysTop [get]
 
virtual bool IsStaticPosition [get]
 
virtual bool AlwaysBottom [get]
 
virtual Type SetSiblingAfter [get]
 
virtual bool ShowInBuildMode [get]
 
virtual bool RightClickToClose [get]
 
virtual bool AllowRightClickToClose [get]
 
- 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 WidgetDebug.cs.

Member Function Documentation

◆ OnActivate()

override void WidgetDebug.OnActivate ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 24 of file WidgetDebug.cs.

25 {
26 UpdateText();
27 }
void UpdateText()
Definition: WidgetDebug.cs:64

References UpdateText().

◆ OnDisable()

void WidgetDebug.OnDisable ( )
inlineprivate

Definition at line 37 of file WidgetDebug.cs.

38 {
39 if (timer != null)
40 {
41 timer.Cancel();
42 }
43 }
Timer.TimerItem timer
Definition: WidgetDebug.cs:18

References timer.

◆ OnEnable()

void WidgetDebug.OnEnable ( )
inlineprivate

Definition at line 29 of file WidgetDebug.cs.

30 {
31 if ((bool)Timer.current)
32 {
33 timer = Timer.Start(0.1f, UpdateText, repeat: true);
34 }
35 }

References timer, and UpdateText().

◆ Refresh()

void WidgetDebug.Refresh ( )
inline

Definition at line 45 of file WidgetDebug.cs.

46 {
47 }

◆ ToggleOther()

void WidgetDebug.ToggleOther ( )
inline

Definition at line 59 of file WidgetDebug.cs.

60 {
62 }
bool showOther
Definition: WidgetDebug.cs:16

References showOther.

◆ ToggleProps()

void WidgetDebug.ToggleProps ( )
inline

Definition at line 49 of file WidgetDebug.cs.

50 {
52 }
bool showProps
Definition: WidgetDebug.cs:14

References showProps.

◆ ToggleUpdates()

void WidgetDebug.ToggleUpdates ( )
inline

Definition at line 54 of file WidgetDebug.cs.

55 {
57 }
bool showUpdates
Definition: WidgetDebug.cs:12

References showUpdates.

◆ UpdateText()

void WidgetDebug.UpdateText ( )
inlineprivate

Definition at line 64 of file WidgetDebug.cs.

65 {
66 deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f;
67 float num = deltaTime * 1000f;
68 float num2 = 1f / deltaTime;
69 string text = $"{num:0.0} ms ({num2:0.} fps)";
70 textFPS.text = text + " avg delta: " + Core.avgDelta;
71 if (EMono.game == null || EMono.game.activeZone == null)
72 {
73 debugText.text = "";
74 return;
75 }
79 int num3 = PathManager.requestCount - lastPathCount;
81 Point hitPoint = Scene.HitPoint;
82 text = "";
83 if (showOther)
84 {
85 text += output;
86 text = text + EMono.pc.ai?.ToString() + "/" + EMono.pc.ai.status.ToString() + "\n";
87 text = text + "time: " + EMono.scene.timeRatio + " turn:" + EMono.pc.turn + " ";
88 _ = EInput.mposWorld;
89 if (tileMap != null)
90 {
91 text = text + "mouse: " + tileMap.mx + "/" + tileMap.mz + " hit: " + hitPoint?.ToString() + "\n";
93 {
94 Point point = hitPoint.Copy();
97 text = text + "mouse: " + (tileMap.mx + EMono.scene.elomapActor.elomap.minX) + "/" + (tileMap.mz + EMono.scene.elomapActor.elomap.minY) + " hit: " + point?.ToString() + "\n";
98 }
99 }
100 float num4 = (EMono.pc.renderer.actor as CharaActorPCC)?.provider.angle ?? 0f;
101 text = text + "path:" + num3 + "/" + PathManager.requestCount + "/" + PathManager.Instance._pathfinder.total + " syncList:" + EMono.scene.syncList.Count + "\n";
102 text = text + "events:" + EMono._zone.events.list.Count + " roundTimer:" + EMono.pc.roundTimer + " seed:" + EMono._map.seed + "\n";
103 text = text + "details:" + CellDetail.count + "(" + CellDetail.cache.Count + " pointAnimes:" + EMono._map.pointAnimes.Count + ") pccCache:" + PCCManager.current.pccCache.Count + "\n";
104 if (hitPoint.IsValid)
105 {
106 text = text + "GatAngle: " + Util.GetAngle(hitPoint.x - EMono.pc.pos.x, hitPoint.z - EMono.pc.pos.z) + " dir: " + EMono.pc.dir + " actor dir: " + EMono.pc.renderer.actor?.currentDir + " angle:" + EMono.pc.angle + "/" + num4 + "\n";
107 text = text + "room: " + hitPoint.cell.room?.ToString() + " objVal:" + hitPoint.cell.objVal + " " + hitPoint.cell.CanGrow(hitPoint.cell.sourceObj, new VirtualDate(1));
108 }
109 }
110 if (showUpdates)
111 {
112 text += EMono.game.updater.GetText();
113 text += "\n";
114 }
115 if (showProps)
116 {
117 text = text + "roaming: " + props.roaming.Count + "\n";
118 text = text + "installed: " + props.installed.Count + "\n";
119 text = text + "charas: " + EMono._map.charas.Count + "\n";
120 text = text + "global charas: " + EMono.game.cards.globalCharas.Count + "\n";
121 text += "\n";
122 }
123 if (hitPoint.IsValid && hitPoint.FirstChara != null)
124 {
125 text += "\n";
126 Chara firstChara = hitPoint.FirstChara;
127 text = text + firstChara.id + " uid:" + firstChara.uid + " skin:" + firstChara.idSkin + " dir:" + firstChara.dir;
128 }
129 debugText.text = text;
130 }
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
Status status
Definition: AIAct.cs:16
override string ToString()
Definition: AIAct.cs:124
BaseTileMap tileMap
virtual int currentDir
Definition: CardActor.cs:41
CardActor actor
Definition: CardRenderer.cs:11
Point pos
Definition: Card.cs:55
float roundTimer
Definition: Card.cs:65
int dir
Definition: Card.cs:142
CardRenderer renderer
Definition: Card.cs:57
static int count
Definition: CellDetail.cs:5
static Stack< CellDetail > cache
Definition: CellDetail.cs:9
Room room
Definition: Cell.cs:102
SourceObj.Row sourceObj
Definition: Cell.cs:1072
bool CanGrow(SourceObj.Row obj, VirtualDate date)
Definition: Cell.cs:1649
Definition: Chara.cs:10
AIAct ai
Definition: Chara.cs:187
Definition: Core.cs:14
static float avgDelta
Definition: Core.cs:19
PathManager pathManager
Definition: Core.cs:35
Definition: EInput.cs:8
static Vector3 mposWorld
Definition: EInput.cs:339
Definition: EMono.cs:4
static Core core
Definition: EMono.cs:5
static Chara pc
Definition: EMono.cs:13
static Zone _zone
Definition: EMono.cs:19
static BaseGameScreen screen
Definition: EMono.cs:29
static Game game
Definition: EMono.cs:7
static Scene scene
Definition: EMono.cs:27
static Map _map
Definition: EMono.cs:17
EloMap elomap
Definition: EloMapActor.cs:7
int minX
Definition: EloMap.cs:112
int minY
Definition: EloMap.cs:114
string GetText()
Definition: GameUpdater.cs:552
Zone activeZone
Definition: Game.cs:245
GameUpdater updater
Definition: Game.cs:243
PropsManager props
Definition: Map.cs:91
int seed
Definition: Map.cs:19
List< TransAnime > pointAnimes
Definition: Map.cs:83
IPathfinder pathfinder
Definition: PathManager.cs:24
PathFinder _pathfinder
Definition: PathManager.cs:20
static PathManager Instance
Definition: PathManager.cs:16
static int requestCount
Definition: PathManager.cs:14
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:467
override string ToString()
Definition: Point.cs:500
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool IsValid
Definition: Point.cs:88
Chara FirstChara
Definition: Point.cs:264
Cell cell
Definition: Point.cs:51
override string ToString()
Definition: Room.cs:31
Definition: Scene.cs:8
List< ISyncScreen > syncList
Definition: Scene.cs:131
static Point HitPoint
Definition: Scene.cs:21
EloMapActor elomapActor
Definition: Scene.cs:97
virtual bool IsRegion
Definition: Spatial.cs:501
Definition: Util.cs:10
static float GetAngle(Vector3 self, Vector3 target)
Definition: Util.cs:121
static string output
Definition: WidgetDebug.cs:6
float deltaTime
Definition: WidgetDebug.cs:20
int lastPathCount
Definition: WidgetDebug.cs:22
List< ZoneEvent > list
ZoneEventManager events
Definition: Zone.cs:40

References $, EMono._map, PathManager._pathfinder, EMono._zone, Game.activeZone, CardRenderer.actor, Chara.ai, Core.avgDelta, CellDetail.cache, Cell.CanGrow(), Point.cell, Point.Copy(), EMono.core, CellDetail.count, CardActor.currentDir, deltaTime, Card.dir, EloMapActor.elomap, Scene.elomapActor, Zone.events, Point.FirstChara, EMono.game, GameUpdater.GetText(), Scene.HitPoint, if(), PathManager.Instance, Spatial.IsRegion, Point.IsValid, lastPathCount, ZoneEventManager.list, EloMap.minX, EloMap.minY, EInput.mposWorld, BaseTileMap.mz, output, PathManager.pathfinder, Core.pathManager, EMono.pc, Map.pointAnimes, Card.pos, Map.props, Card.renderer, PathManager.requestCount, Cell.room, Card.roundTimer, EMono.scene, EMono.screen, Map.seed, showOther, showProps, showUpdates, Cell.sourceObj, AIAct.status, Scene.syncList, BaseGameScreen.tileMap, AIAct.ToString(), Point.ToString(), Room.ToString(), Game.updater, Util, Point.x, and Point.z.

Referenced by OnActivate(), and OnEnable().

Member Data Documentation

◆ debugText

Text WidgetDebug.debugText

Definition at line 8 of file WidgetDebug.cs.

◆ deltaTime

float WidgetDebug.deltaTime
private

Definition at line 20 of file WidgetDebug.cs.

Referenced by UpdateText().

◆ lastPathCount

int WidgetDebug.lastPathCount
private

Definition at line 22 of file WidgetDebug.cs.

Referenced by UpdateText().

◆ output

string WidgetDebug.output
static

Definition at line 6 of file WidgetDebug.cs.

Referenced by UpdateText().

◆ showOther

bool WidgetDebug.showOther

Definition at line 16 of file WidgetDebug.cs.

Referenced by ToggleOther(), and UpdateText().

◆ showProps

bool WidgetDebug.showProps

Definition at line 14 of file WidgetDebug.cs.

Referenced by ToggleProps(), and UpdateText().

◆ showUpdates

bool WidgetDebug.showUpdates

Definition at line 12 of file WidgetDebug.cs.

Referenced by ToggleUpdates(), and UpdateText().

◆ textFPS

Text WidgetDebug.textFPS

Definition at line 10 of file WidgetDebug.cs.

◆ timer

Timer.TimerItem WidgetDebug.timer
private

Definition at line 18 of file WidgetDebug.cs.

Referenced by OnDisable(), and OnEnable().


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