123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using FSEvent;
- using UnityEngine.UI;
- public class OperatePanelManager : MonoBehaviour {
- public Text DrawText;
- public Text DiscardText;
-
- void Start () {
- InitEventListener();
- }
-
-
- void Update () {
-
- }
-
- private void InitEventListener() {
- print("Operate 注册事件 ... ");
- EventListener.Instance.RegisterEvent(EventEnum.EVENT_UPDATE_TABLE_INFO, UpdateTableInfo);
- }
-
- private void UpdateTableInfo(Dictionary<string, object> info) {
-
- int index = (int)info["index"];
- int num = (int)info["num"];
-
- if (index == 0) {
- DrawText.text = num.ToString();
- } else {
- DiscardText.text = num.ToString();
- }
- }
-
- public void EndRound() {
- print("结束我方出牌 ... ");
- EventListener.Instance.PostEvent(EventEnum.EVENT_ENTER_COMPAIRE_CARD_ROUND);
- }
- }
|