public void Init(SRSTaiXiuSessionLog sessionLog, SRSTaiXiu taixiu, int moneyType, Action <int, string> callback)
    {
        this._taixiu   = taixiu;
        this.moneyType = moneyType;
        this.callback  = callback;

        ShowMoneyType();
        LoadData(sessionLog);
    }
    public void Init(List <SRSTaiXiuEventTopItem> ranks, SRSTaiXiu taixiu, Action <TaiXiuEventType, string> callback)
    {
        this.ranks    = ranks;
        this._taixiu  = taixiu;
        this.callback = callback;

        string td = taixiu.GetEventToDay();

        currentDayIndex = taixiu.eventTimeRequests.IndexOf(td);

        LoadTab(TaiXiuEventType.Win);
        LoadData(ranks);

        VKCommon.LoadDropDownMenu(taixiu.eventTimeShows, dropDay, currentDayIndex);
    }
    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);
    }
Esempio n. 4
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();
    }