Пример #1
0
    private void ConnectTaiXiu()
    {
        _taixiu = new SRSTaiXiu();
        _config = Database.Instance.serverConfig.taixiu;

        if (SignalRController.Instance.IsServerConnecting((int)_config.gameId))
        {
            return;
        }

        _taixiu.MoneyType           = MoneyType.GOLD;
        _serverTaiXiu               = SignalRController.Instance.CreateServer <TaiXiuSignalRServer>((int)_config.gameId);
        _serverTaiXiu.OnSRSEvent    = OnSRSEvent;
        _serverTaiXiu.OnSRSHubEvent = OnSRSHubEvent;
        _serverTaiXiu.SRSInit(_config.urlServer, _config.hubName);
    }
Пример #2
0
    public void Init()
    {
        ClearUI();
        UILayerController.Instance.ShowLoading();
        _taixiu            = new SRSTaiXiu();
        _assetBundleConfig = AssetbundlesManager.Instance.assetSetting.GetItemByGameId(_GAMEID);
        _soundSetting      = AudioAssistant.Instance.GetSettingSound(_GAMEID);

        _taixiu.MoneyType     = MoneyType.GOLD;
        _server               = SignalRController.Instance.CreateServer <TaiXiuSignalRServer>((int)_GAMEID);
        _server.OnSRSEvent    = OnSRSEvent;
        _server.OnSRSHubEvent = OnSRSHubEvent;
        _server.SRSInit(_URL, _HUBNAME);

        this._account = Database.Instance.Account();

        ChangeSound();
        ShowMoneyType();
        UpdateMoneyType();
        UpdateGameInfo();
    }