| 123456789101112131415161718192021222324252627282930313233 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityCommon;
- using UnityEngine;
- using UnityEngine.UI;
- namespace DTYJ
- {
- public class UIRenShuTongJi : MonoBehaviour
- {
- public Text text_zhantai, text_zhanting;
- private Text textLabel;
- private void Start()
- {
- textLabel = transform.Find("Image/Label").GetComponent<Text>();
- Utility.Update(2, () =>
- {
- text_zhantai.text = (RenShuTrigger.dicCount["站台"] / 500f).ToString("#0.00");
- text_zhanting.text = (RenShuTrigger.dicCount["站厅"] / 700f).ToString("#0.00");
- textLabel.text = $"乘客人数:{RenShuTrigger.dicCount["站台"] + RenShuTrigger.dicCount["站厅"]}";
- var cmdObj = new KeLiu_opt();
- cmdObj.kvp = new KeLiu_opt.Info[] {
- new KeLiu_opt.Info(){ postion = "站台", value = RenShuTrigger.dicCount["站台"]/500f},
- new KeLiu_opt.Info(){ postion = "站厅 ", value = RenShuTrigger.dicCount["站厅"]/700f}
- };
- NetworkAnimPlayer.instance?.SendCmdToServer(20501, cmdObj);
- });
- }
- }
- }
|