1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- [Serializable]
- public class ZhaZhanJianKongData
- {
- public string name;
- public float openValue;
- public ZhaZhanState state;
- public string GetStateStr()
- {
- string result = "未知";
- switch (state)
- {
- case ZhaZhanState.close:
- result = "关闭";
- break;
- case ZhaZhanState.open:
- result = "开启";
- break;
- case ZhaZhanState.fix:
- result = "养护";
- break;
- case ZhaZhanState.warning:
- result = "告警";
- break;
- }
- return result;
- }
- }
- /// <summary>
- /// 0:关闭 1:开启 :2养护 3:告警
- /// </summary>
- public enum ZhaZhanState
- {
- close,
- open,
- fix,
- warning
- }
|