// Use this for initialization void Start() { _enterPressed = false; if (Instance != null) { Destroy(gameObject); } Instance = this; }
public static void SaveHighScore(HighScoreMenuManager highScore) { BinaryFormatter formatter = new BinaryFormatter(); string path = Application.persistentDataPath + "/player.wow"; FileStream stream = new FileStream(path, FileMode.Create); HighScoreData data = new HighScoreData(highScore); formatter.Serialize(stream, data); stream.Close(); }
public HighScoreData(HighScoreMenuManager highScore) { names = highScore.nameArray; scores = highScore.scoreArray; }