using AX.NetworkSystem; using System.Collections; using System.Collections.Generic; using UnityEngine; public class StartTimer : MonoBehaviour { // Use this for initialization void Start () { GetComponent().OutInterFaceButton += StartTimeSync; } // Update is called once per frame void Update () { } void StartTimeSync() { KeyValuePair pair = new KeyValuePair(CurrentUserInfo.room.Id, true); NetworkManager.Default.SendAsync("TIMER_ENABLE_SYNC", pair); //向服务端申请开始计时 } }