9 public override void OnActivate()
15 private void OnEnable()
19 this.timer = Timer.Start(0.1f,
new Action(this.UpdateText),
true);
24 private void OnDisable()
26 if (this.timer !=
null)
38 public void ToggleProps()
40 this.showProps = !this.showProps;
44 public void ToggleUpdates()
46 this.showUpdates = !this.showUpdates;
50 public void ToggleOther()
52 this.showOther = !this.showOther;
56 private void UpdateText()
58 this.deltaTime += (Time.unscaledDeltaTime - this.deltaTime) * 0.1f;
59 float num = this.deltaTime * 1000f;
60 float num2 = 1f / this.deltaTime;
61 string text =
string.Format(
"{0:0.0} ms ({1:0.} fps)", num, num2);
62 this.textFPS.text = text +
" avg delta: " + Core.avgDelta.ToString();
63 if (
EMono.game ==
null ||
EMono.game.activeZone ==
null)
65 this.debugText.text =
"";
71 int num3 = PathManager.requestCount - this.lastPathCount;
78 string[] array =
new string[5];
82 array[num4] = ((ai !=
null) ? ai.ToString() :
null);
84 array[3] =
EMono.pc.ai.status.ToString();
86 text =
string.Concat(array);
87 text =
string.Concat(
new string[]
91 EMono.scene.timeRatio.ToString(),
93 EMono.pc.turn.ToString(),
96 Vector3 mposWorld = EInput.mposWorld;
99 string[] array2 =
new string[8];
101 array2[1] =
"mouse: ";
102 array2[2] = tileMap.mx.ToString();
104 array2[4] = tileMap.mz.ToString();
105 array2[5] =
" hit: ";
107 Point point = hitPoint;
108 array2[num5] = ((point !=
null) ? point.ToString() :
null);
110 text =
string.Concat(array2);
111 if (
EMono._zone.IsRegion)
113 Point point2 = hitPoint.Copy();
114 point2.x +=
EMono.scene.elomapActor.elomap.minX;
115 point2.z +=
EMono.scene.elomapActor.elomap.minY;
116 string[] array3 =
new string[8];
118 array3[1] =
"mouse: ";
119 array3[2] = (tileMap.mx +
EMono.scene.elomapActor.elomap.minX).ToString();
121 array3[4] = (tileMap.mz +
EMono.scene.elomapActor.elomap.minY).ToString();
122 array3[5] =
" hit: ";
124 Point point3 = point2;
125 array3[num6] = ((point3 !=
null) ? point3.ToString() :
null);
127 text =
string.Concat(array3);
131 float num7 = (charaActorPCC !=
null) ? charaActorPCC.provider.angle : 0f;
132 text =
string.Concat(
new string[]
142 EMono.scene.syncList.Count.ToString(),
145 text =
string.Concat(
new string[]
149 EMono._zone.events.list.Count.ToString(),
151 EMono.pc.roundTimer.ToString(),
153 EMono._map.seed.ToString(),
156 text =
string.Concat(
new string[]
164 EMono._map.pointAnimes.Count.ToString(),
166 PCCManager.current.pccCache.Count.ToString(),
169 if (hitPoint.IsValid)
171 string[] array4 =
new string[12];
173 array4[1] =
"GatAngle: ";
174 array4[2] = Util.GetAngle((
float)(hitPoint.x -
EMono.pc.pos.x), (
float)(hitPoint.z -
EMono.pc.pos.z)).ToString();
175 array4[3] =
" dir: ";
176 array4[4] =
EMono.pc.dir.ToString();
177 array4[5] =
" actor dir: ";
180 array4[num8] = ((actor !=
null) ?
new int?(actor.currentDir) :
null).ToString();
181 array4[7] =
" angle:";
182 array4[8] =
EMono.pc.angle.ToString();
184 array4[10] = num7.ToString();
186 text =
string.Concat(array4);
187 string[] array5 =
new string[7];
189 array5[1] =
"room: ";
191 Room room = hitPoint.cell.room;
192 array5[num9] = ((room !=
null) ? room.ToString() :
null);
193 array5[3] =
" objVal:";
194 array5[4] = hitPoint.cell.objVal.ToString();
196 array5[6] = hitPoint.cell.CanGrow(hitPoint.cell.sourceObj,
new VirtualDate(1)).ToString();
197 text =
string.Concat(array5);
200 if (this.showUpdates)
202 text +=
EMono.game.updater.GetText();
207 text = text +
"roaming: " + props.roaming.Count.ToString() +
"\n";
208 text = text +
"installed: " + props.installed.Count.ToString() +
"\n";
209 text = text +
"charas: " +
EMono._map.charas.Count.ToString() +
"\n";
210 text = text +
"global charas: " +
EMono.game.cards.globalCharas.Count.ToString() +
"\n";
213 if (hitPoint.IsValid && hitPoint.FirstChara !=
null)
216 Chara firstChara = hitPoint.FirstChara;
217 text =
string.Concat(
new string[]
222 firstChara.uid.ToString(),
224 firstChara.idSkin.ToString(),
226 firstChara.dir.ToString()
229 this.debugText.text = text;
233 public static string output;
236 public Text debugText;
242 public bool showUpdates;
245 public bool showProps;
248 public bool showOther;
251 private Timer.TimerItem timer;
254 private float deltaTime;
257 private int lastPathCount;