Exemplo n.º 1
0
 static VanillaPlus ChoseStartingOptions(Random r)
 {
     try
     {
         Console.WriteLine("Selecting your Vanilla+ starting items");
         VanillaPlusOptions options = JsonConvert.DeserializeObject <VanillaPlusOptions>(File.ReadAllText("startupItems.json"));
         return(new VanillaPlus(options, r));
     }
     catch (Exception e)
     {
         WriteConsoleColor("Error while choosing vanilla+ starting items: " + e.ToString(), ConsoleColor.Red);
         return(null);
     }
 }
Exemplo n.º 2
0
 public VanillaPlus(VanillaPlusOptions options, Random r)
 {
     Weapon   = options.Weapons[r.Next(options.Weapons.Count)];
     Movement = options.Movement[r.Next(options.Movement.Count)];
     Utility  = options.Utility[r.Next(options.Utility.Count)];
 }