Example #1
0
        void Awake()
        {
            _instance = null;
            if (_instance == null)
            {
                _instance = this;
                DontDestroyOnLoad(gameObject);
            }
            else
            {
                if (_instance != this)
                {
                    Destroy(gameObject);
                    return;
                }
            }

            Client                = new GameClient();
            Client.AppId          = appId;
            Client.AppVersion     = appVersion;
            Client.onReceiveMove += OnReceiveMove;
        }
Example #2
0
 public override void OnAgentDestroy()
 {
     Destroy(gameObject);
     _instance = null;
 }