少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-27 45c82c513c67130bb52cb5e7f2f10c957e463cf1
Core/GameEngine/DataToCtl/NetUpdateBehaviour.cs
@@ -1,34 +1,34 @@
using UnityEngine;
using System.Collections;
using System;
public class NetUpdateBehaviour : MonoBehaviour
{
    Action onUpdate;
    public void RegisterUpdateCallBack(Action _onUpdate)
    {
        onUpdate += _onUpdate;
    }
    void Update()
    {
#if UNITY_EDITOR
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.Escape))
        {
            GameNetSystem.Instance.LoginOut();
        }
#endif
        if (onUpdate!=null)
        {
            onUpdate();
        }
    }
    private void OnApplicationQuit()
    {
        GameNetSystem.Instance.Disconnect();
    }
}
using UnityEngine;
using System.Collections;
using System;
public class NetUpdateBehaviour : MonoBehaviour
{
    Action onUpdate;
    public void RegisterUpdateCallBack(Action _onUpdate)
    {
        onUpdate += _onUpdate;
    }
    void Update()
    {
#if UNITY_EDITOR
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.Escape))
        {
            GameNetSystem.Instance.LoginOut();
        }
#endif
        if (onUpdate!=null)
        {
            onUpdate();
        }
    }
    private void OnApplicationQuit()
    {
        GameNetSystem.Instance.Disconnect();
    }
}