Example #1
0
        public static SharedClasses Instance()
        {
            if (_instance == null)
            {
                _instance = new SharedClasses();
            }

            return(_instance);
        }
Example #2
0
 // Load rounds played, words solved and score
 public void Load()
 {
     RoundsPlayed = SharedClasses.Instance().AppClass.LoadPref <int>("RoundsPlayed");
     WordsSolved  = SharedClasses.Instance().AppClass.LoadPref <int>("WordsSolved");
     TotalScore   = SharedClasses.Instance().AppClass.LoadPref <int>("TotalScore");
 }
Example #3
0
 // Increment and save total score
 public void AddTotalScore(int value)
 {
     TotalScore += value;
     SharedClasses.Instance().AppClass.SavePref <int>("TotalScore", TotalScore);
     Debug.WriteLine("TotalScore " + TotalScore);
 }
Example #4
0
 // Increment and save words solved
 public void AddWordsSolved(int value)
 {
     WordsSolved += value;
     SharedClasses.Instance().AppClass.SavePref <int>("WordsSolved", WordsSolved);
     Debug.WriteLine("WordsSolved " + WordsSolved);
 }
Example #5
0
 // Increment and save rounds played
 public void IncrementRoundsPlayed()
 {
     RoundsPlayed++;
     SharedClasses.Instance().AppClass.SavePref <int>("RoundsPlayed", RoundsPlayed);
     Debug.WriteLine("RoundsPlayed " + RoundsPlayed);
 }
Example #6
0
 // Load Player Preferences
 public void Load()
 {
     ThemeIndex = SharedClasses.Instance().AppClass.LoadPref <int>("ThemeIndex");
 }