Пример #1
0
 public void InitializeSystem()
 {
     // Upon using Save System, try to use Initialize System as a way to Load Data from the save file.
     id = ItemsUtility.GenerateItemID(name);
     foreach (Stats item in Enum.GetValues(typeof(Stats)))
     {
         BaseUnitStats tmp = new BaseUnitStats();
         tmp.InitializeStats(item.ToString());
         stats.Add(item, tmp);
     }
 }
Пример #2
0
 /// <summary>
 /// Use this only when you see players
 /// </summary>
 /// <param name="thisStats"></param>
 /// <returns></returns>
 public BaseUnitStats GetStats(Stats thisStats)
 {
     if (stats[thisStats] != null)
     {
         return(stats[thisStats]);
     }
     else
     {
         Debug.LogError("Unit does not contain " + thisStats + " stats, adding it to preference");
         BaseUnitStats newStat = new BaseUnitStats();
         newStat.InitializeStats(thisStats.ToString());
         stats.Add(thisStats, newStat);
         return(stats[thisStats]);
     }
 }