Пример #1
0
 public static T GetRandom <T>(this List <T> list)
 {
     if (list.Count == 0)
     {
         return(default(T));
     }
     return(list[NKMRandom.Get("System Generic Random" + NKMID.GetNext("System Generic Random"), 0, list.Count)]);
 }
Пример #2
0
 public static Character Create(string name) =>
 CreateCharacterFromDatabase(name, NKMID.GetNext("Character"));
Пример #3
0
 protected Ability(AbilityType type, string name, int cooldown = 0) : this(type, name, cooldown, NKMID.GetNext("Ability"))
 {
 }