示例#1
0
    public void AddNewMatch(bool won, int moves, DateTime date, int elapsedSeconds)
    {
        LevelMatchHistory history = new LevelMatchHistory(won, moves, date, elapsedSeconds);

        History.Insert(0, history);

        node["MatchHistory"].Add(history.Serialize());
    }
示例#2
0
    public void SetMatch(LevelMatchHistory match)
    {
        date.text  = match.StartDate.ToString("yyyy-MM-dd HH:mm");
        moves.text = match.Moves.ToString();
        time.text  = match.ElapsedSeconds.ToString();

        if (match.Won)
        {
            background.color = winBackgroundColor;
        }
    }