Score.cs 520 Bytes
Newer Older
1
using System;
Naliwe GS committed
2
using UnityEngine;
3 4 5

namespace Assets.Scripts.API
{
Naliwe GS committed
6
	[System.Serializable]
7 8 9 10 11
	public class Score
	{
		public string playerName;
		public string team;
		public int score;
Naliwe GS committed
12
		public string date;
Naliwe GS committed
13
	    public string _id;
14

15
		public static Score CreateFromJson(string json)
Naliwe GS committed
16 17 18 19
	    {
	        return JsonUtility.FromJson<Score>(json);
	    }

20 21 22 23
		public override string ToString()
		{
			return string.Format("PlayerName: {0}, Team: {1}, Score: {2}, Date: {3}, Id: {4}", playerName, team, score, date, _id);
		}
24 25 26
	}
}