예제 #1
0
        public Player(ref TcpClient inputClient, Action<string, byte[], Player> replay)
        {
            //对原构造函数继承

            playerIPAddress = "";
            playerName = "";

            modList = new List<string>();
            backgroundName = "";
            bgmName = "";

            historyFailCount = "";
            historyRankedRaceCount = "";
            historyRelayRaceCount = "";
            historyWinCount = "";

            dutyUnit = new List<string>();
            playerGroupName = "";

            readyColor = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));

            nowLife = "";
            nowTime = "";
            nowUnit = "1";
            nowState = PlayerState.Playing;
            nowStateColor = new SolidColorBrush(Color.FromArgb(80, 0, 0, 0));

            playerUnitPrize = new List<PlayerUnitData>();
            finallyMark = "";
            finallyPP = "";
            finallyPrize = "";

            //=================================自己的初始化
            gameData = new GameData(ref inputClient, this.replyInsider);
            replyEx = new Action<string, byte[], Player>(replay);

            var cache = inputClient.Client.RemoteEndPoint.ToString().Split(':');
            playerIPAddress = cache[0];

            PingCount = 0;

            gameTime = new Timer();
            dataCache = new DataCache();

            groupColor = new SolidColorBrush(Color.FromArgb(80, 0, 0, 0));
        }
예제 #2
0
 public void SetDataGiveIn(ref TcpClient tc)
 {
     dataGiveIn = new GameData(ref tc, dataProcess);
 }