示例#1
0
 private void SetDefaults()
 {
     Properties.stats stats = new Properties.stats
     {
         health = 80,
         hunger = 70,
         money  = 20.00,
         day    = 1,
         time   = 0
     };
     stats.Save();
 }
示例#2
0
 private void SaveGame()
 {
     Properties.stats stats = new Properties.stats
     {
         health = HealthProgress.Value,
         hunger = FoodProgress.Value,
         money  = Convert.ToInt32(MoneyBox.Text),
         day    = Convert.ToInt32(DayBox.Text),
         time   = TimeBoxValue(),
         homeid = homeid
     };
     stats.Save();
 }