Esempio n. 1
0
    private void onStatusChange(CEvent evt)
    {
        //玩家状态改变,比如说 准备。
        var playerEvent = (PlayerEvent)evt.eventParams;


        TinyPlayerCS pp = ConvertTool.ConvertPlayer <TinyPlayerCS>(playerEvent.player);

        var sts = pp.status; //这里是状态,在头像旁边显示准备。
    }
Esempio n. 2
0
    private void onGetuserInfo(CEvent evt)
    {
        var playerEvent = (PlayerEvent)evt.eventParams;


        TinyPlayerCS pp = ConvertTool.ConvertPlayer <TinyPlayerCS>(playerEvent.player);

        //  currentPlayer = pp;

        // self.installData(e.player); //这一定要设置。

        Debug.Log("pp=" + pp.money);
    }
Esempio n. 3
0
    //收益 2019-12-5
    private void onGetIncome(CEvent evt)
    {
        var playerEvent = (PlayerEvent)evt.eventParams;


        var p = playerEvent.player;

        Debug.Log("获取收益CS");


        TinyPlayerCS pp = ConvertTool.ConvertPlayer <TinyPlayerCS>(playerEvent.player);

        Debug.Log(JsonConvert.SerializeObject(pp));
    }
Esempio n. 4
0
    private void onLogin(CEvent evt)
    {
        UnityThreadHelper.Dispatcher.Dispatch(() =>
        {
            HallEvent e = (HallEvent)evt.eventParams;
            Debug.Log("unity 登陆成功");
            Debug.Log(e);


            TinyPlayerCS pp = ConvertTool.ConvertPlayer <TinyPlayerCS>(e.player);

            currentPlayer = pp;

            self.installData(e.player); //这一定要设置。
            Debug.Log(JsonConvert.SerializeObject(pp));
        });
    }
Esempio n. 5
0
    //玩家下注,实时
    private void onPlayerAddBet(CEvent evt)
    {
        var playerEvent = (PlayerEvent)evt.eventParams;


        TinyPlayerCS pp = ConvertTool.ConvertPlayer <TinyPlayerCS>(playerEvent.player);

        var b = playerEvent.bling; //这里是下注具体。要转换成TinyBling


        TinyBilingCS data = ConvertTool.ConvertPlayer <TinyBilingCS>(playerEvent.bling); //其他用户下注?或者自己下注?


        var json = JsonConvert.SerializeObject(data); //打印下注信息

        Debug.Log(json);
    }