1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using UnityEngine;
- namespace Tools
- {
- public class PlayerAttributeDebugGUI : DebugGuiBase
- {
- protected override string UIDebugButtonName
- {
- get
- {
- return "属性查看";
- }
- }
- protected override void GUIStart()
- {
- float num = (float)Screen.width;
- this.GUIArea = new Rect(num / 2f - 320f, 20f, 640f, 500f);
- }
- public override void OnDebugGUI()
- {
- GUILayout.BeginArea(this.GUIArea);
- GUILayout.BeginVertical("box", new GUILayoutOption[0]);
- GUILayout.Label(string.Concat(new object[]
- {
- "HP: ",
- R.Player.Attribute.currentHP,
- "/",
- R.Player.Attribute.maxHP
- }), new GUILayoutOption[0]);
- GUILayout.Label(string.Concat(new object[]
- {
- "Energy: ",
- R.Player.Attribute.currentEnergy,
- "/",
- R.Player.Attribute.maxEnergy
- }), new GUILayoutOption[0]);
- GUILayout.Label("Coin: " + R.Equipment.CoinNum, new GUILayoutOption[0]);
- GUILayout.EndVertical();
- GUILayout.EndArea();
- }
- private Rect GUIArea;
- }
- }
|