private void Start()
 {
     if (server != null)
     {
         return;
     }
     server = DependencyResolver.Container.Resolve <GwentClientService>();
 }
示例#2
0
    //private GlobalUIService _guiservice;

    private void Start()
    {
        if (_client != null)
        {
            return;
        }
        _client = DependencyResolver.Container.Resolve <GwentClientService>();
        //_guiservice = DependencyResolver.Container.Resolve<GlobalUIService>();
    }
示例#3
0
 //async Task AutoTest()
 //{
 //    var hub = DependencyResolver.Container.Resolve<HubConnection>();
 //    while (true)
 //    {
 //        await Task.Delay(500);
 //        if (hub.State == HubConnectionState.Disconnected)
 //        {
 //            Debug.Log("MainCode检测到断线!");
 //            SceneManager.LoadScene("LoginSecen");
 //            _ = DependencyResolver.Container.Resolve<GlobalUIService>().YNMessageBox("断开连接", "请尝试重新登陆");
 //            return;
 //        }
 //    }
 //}
 void Start()
 {
     //_ = AutoTest();
     _globalUIService = DependencyResolver.Container.Resolve <GlobalUIService>();
     _client          = DependencyResolver.Container.Resolve <GwentClientService>();
     if (_client.IsAutoPlay || ClientGlobalInfo.IsToMatch)
     {
         MatchMenuButton.onClick.Invoke();
         //DoMatchButton.onClick.Invoke();
     }
 }
示例#4
0
    //private GlobalUIService _guiservice;

    private void Start()
    {
        void IsOnPreservation(bool isOn)
        {
            if (isOn)
            {
                PlayerPrefs.SetString("Username", Username.text);
                PlayerPrefs.SetString("Password", Password.text);
            }
        }

        RecordStatus.isOn = PlayerPrefs.GetInt("RecordBox", 0) != 0;
        if (RecordStatus.isOn)
        {
            Username.text = PlayerPrefs.GetString("Username", "");
            Password.text = PlayerPrefs.GetString("Password", "");
        }
        RecordStatus.onValueChanged.AddListener(x =>
        {
            PlayerPrefs.SetInt("RecordBox", x ? 1 : 0);
            IsOnPreservation(x);
        });
        Username.onValueChanged.AddListener(x =>
        {
            IsOnPreservation(RecordStatus.isOn);
        });
        Password.onValueChanged.AddListener(x =>
        {
            IsOnPreservation(RecordStatus.isOn);
        });
        if (_client != null)
        {
            return;
        }
        _client = DependencyResolver.Container.Resolve <GwentClientService>();
        //_guiservice = DependencyResolver.Container.Resolve<GlobalUIService>();
    }
示例#5
0
 private void Start()
 {
     _client      = DependencyResolver.Container.Resolve <GwentClientService>();
     _codeService = DependencyResolver.Container.Resolve <MainCodeService>();
 }
示例#6
0
 private void Start()
 {
     _gwentClientService = DependencyResolver.Container.Resolve <GwentClientService>();
     ConfigureGame();
     LoadServerMessage();
 }