public void Save() { PlayerData data = new PlayerData(); data.position[0] = transform.position.x; data.position[1] = transform.position.y; data.position[2] = transform.position.z; data.lives = m_Lives; PersistenceFile.Save <PlayerData>(data, m_FileName); }
public void write_line_in_file() { persistenceFile.Save("Operation", 3); using (StreamReader streamReader = new StreamReader(path)) { string lineInFile = streamReader.ReadLine(); lineInFile.Should().Be("Operation -> El resultado es " + 3); } }