Beispiel #1
0
    private void Update()
    {
        if (SM == null || !SM.OnLine)
        {
            return;
        }
        //取得訊息
        SocketManage.MessagePack t = SM.GetData();
        if (t != null)
        {
            switch (t.MsgID)
            {
            case 10:    //登入更新金錢
            {
                Pb.Money m = HyanProto.UnMarshal <Pb.Money>(t.Data);
                TextMoney_Obj.text = m.Money_.ToString();
            }
            break;

            case 100:    //盤面
            {
                Pb.Result result = HyanProto.UnMarshal <Pb.Result>(t.Data);
                TextMoney_Obj.text = result.Money.Money_.ToString();
                //TextWinMoney_Obj.text = result.WinMoney.ToString();
                Reels_Obj.StartGame(result.Table.ToArray(), result.Paylinesnum.ToArray(), result.WinMoney);
            }
            break;

            default:
                break;
            }
        }
    }