Exemplo n.º 1
0
    public void HandleJoinRoom(object[] data)
    {
        UILayerController.Instance.HideLoading();

        string json = LitJson.JsonMapper.ToJson(data[0]);
        SRSSlot25LineAccount account = JsonUtility.FromJson <SRSSlot25LineAccount>(json);

        Init(_config, _server, account, _assetBundleConfig, roomBetIdNew, moneyTypeNew);
    }
Exemplo n.º 2
0
    public void HandleJoinRoom(object[] data)
    {
        UILayerController.Instance.HideLoading();

        VKDebug.Log(data[0].ToString(), VKCommon.HEX_YELLOW);

        string json = LitJson.JsonMapper.ToJson(data[0]);
        SRSSlot25LineAccount account = JsonUtility.FromJson <SRSSlot25LineAccount>(json);

        _server.OnSRSEvent    = null;
        _server.OnSRSHubEvent = null;

        UILayerController.Instance.ShowLayer(UILayerKey.LGameSlot25Line, _assetBundleConfig.name, (layer) =>
        {
            ClearUI();
            ((LGameSlot25Line)layer).Init(_config, _server, account, _assetBundleConfig, roomIdSelected, moneyType);
        });
    }
Exemplo n.º 3
0
    public void Init(SRSSlot25LineConfig config, Slot25lineSignalRServer server, SRSSlot25LineAccount account, AssetBundleSettingItem assetBundleConfig, int roomId, int mType)
    {
        ClearUI();

        _config               = config;
        _server               = server;
        _server.OnSRSEvent    = OnSRSEvent;
        _server.OnSRSHubEvent = OnSRSHubEvent;

        _assetBundleConfig = assetBundleConfig;
        _settingSound      = AudioAssistant.Instance.GetSettingSound(_config.gameId);

        this.accountSpin = account;
        this.accountInfo = Database.Instance.Account();

        this.roomBetId    = roomId;
        this.moneyType    = mType;
        this.roomBetValue = accountSpin.RoomBetValue(roomBetId);

        txtRomBet.SetNumber(roomBetValue);

        SetNotifyFree();
        SetLineSelected(account.GetLineData());

        // event
        OnEventUpdate();

        // update jackpot
        if (_server.jackpots.ContainsKey(roomBetId.ToString()))
        {
            jackpot = _server.jackpots[roomBetId.ToString()];
            UpdateJackpot();
        }

        // Set data
        imgIconMoney.sprite = sprIconMoney[moneyType == MoneyType.GOLD ? 0 : 1];
        vkTxtMyMoney.SetNumber(accountInfo.GetCurrentBalance(moneyType));

        // finish bonus
        if (account.BonusSpinId > 0)
        {
            _server.HubCallFinishBonusGame(moneyType, account.BonusSpinId);
        }
    }