Beispiel #1
0
        public void GiveMoney(DuifenPlayerPanel someone, int money, BetFinishedType type = BetFinishedType.None, float delay = 0, float flyTime = 0.3f, int depth = 99)
        {
            var main = App.GetGameManager <DuifenGameManager>();

            GameObject[] bets = main.BetMgr.CreatBetArray(money, 9, transform, depth);
            for (int i = 0; i < bets.Length; i++)
            {
                Bet bet = bets[i].GetComponent <Bet>();
                bet.transform.parent = someone.transform;
                main.BetMgr.BetParent.GetComponent <UIPanel>().depth = 4;

                bet.BeginMove(bet.transform.localPosition, Vector3.zero, delay,
                              type, flyTime);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 初始化总结算成员
        /// </summary>
        /// <param name="data">总结算成员信息</param>
        public void InitAccItem(Sfs2X.Entities.Data.ISFSObject data)
        {
            _winTimesValue.text  = data.GetInt("win").ToString();  //获取胜利次数
            _lostTimesValue.text = data.GetInt("lost").ToString(); //获取失败次数
            PlayerScore          = data.GetInt("gold");            //获取玩家的得分
            _allScore.text       = PlayerScore.ToString();         //获取总分数


            if (data.ContainsKey("seat"))
            {
                int seat  = data.GetInt("seat");
                var gdata = App.GameData;
                DuifenPlayerPanel panel = gdata.GetPlayer <DuifenPlayerPanel>(seat, true);
                _playerName.text = panel.Info.NickM;
                _headImage.SetTexture(panel.HeadPortrait.GetTexture());

                if (seat == gdata.SelfSeat)
                {
                    SetNameLabelColor(0xffff00);
                }
                _owerMark.SetActive(seat == 0);
            }
        }