public void TestWriteJson() { //Arrange var rw = new OlcSideScrollingConsoleGame.Core.ReadWrite(); string Path = "\\Resources\\Settings"; string FileName = "\\settings"; string FileExtension = ".json"; // highscore var HSO = new HighScoreObj() { //Id = 1, Handle = "AAA", //Hours = 0, //Minutes = 5, //Seconds = 2, //Time = "00:05:02:123" }; var HSOList = new List <HighScoreObj>(); HSOList.Add(HSO); var testObj = new SettingsObj() { //misc = "Unit test", //AttributeIndex = new int[3] { 1, 2, 4 } //HighScoreList = HSOList }; //Act var success = rw.WriteJson <SettingsObj>(Path, FileName, FileExtension, testObj); //Assert Assert.IsTrue(success); }
public void PutOnHighScore(HighScoreObj HSO) { HighScoreList.Add(HSO); HighScoreList = HighScoreList.OrderBy(x => x.TimeSpan).ThenBy(y => y.DateTime).Take(5).ToList(); }
void Awake() { myTransform = this.transform; score_text = ScoreObj.GetComponentInChildren <Text>(); highScore_text = HighScoreObj.GetComponentInChildren <Text>(); }