Esempio n. 1
0
        public SMBGlobalLeaderboardEntry(LeaderboardEntry entry)
        {
            SteamID = entry.SteamID;
            Rank = entry.Rank;
            Nickname = entry.Nickname;

            byte[] bytes = entry.Details.HexToBytes();
            TotalTime = (float)BitConverter.ToInt32(bytes, 0) / 1000;
            LevelsBeat = BitConverter.ToInt32(bytes, 4);
        }
Esempio n. 2
0
        public SMBLeaderboardEntry(LeaderboardEntry entry)
        {
            SteamID = entry.SteamID;
            Rank = entry.Rank;
            Nickname = entry.Nickname;

            byte[] bytes = entry.Details.HexToBytes();
            int charIndex = BitConverter.ToInt32(bytes, 0) + 1;
            Characters[] chars = ((Characters[])Enum.GetValues(typeof(Characters)));
            if (charIndex > 0 && charIndex < chars.Length) Character = chars[charIndex];
            Time = (float)BitConverter.ToInt32(bytes, 4) / 1000;
        }