Added testing and save/load mechanic to the game. Game is now entering final phase.
This commit is contained in:
@@ -23,6 +23,7 @@ public partial class GameData
|
||||
public static SurvivalState survival = new SurvivalState();
|
||||
public static RobotStats robotStats = new RobotStats();
|
||||
public static Dictionary<int, List<Ingredient>> gateUnlocks;
|
||||
public static bool loadSaveOnStart = false;
|
||||
|
||||
public static Color primaryColor = new Color("#276ac2");
|
||||
public static Color lightColor = new Color("#7efff5");
|
||||
@@ -32,4 +33,36 @@ public partial class GameData
|
||||
public static int seed = 12345;
|
||||
|
||||
public static Inventory inventory = new Inventory();
|
||||
|
||||
public static void ResetRunState()
|
||||
{
|
||||
seed = 12345;
|
||||
ruinSize = 10;
|
||||
layerSize = 20;
|
||||
rand = new Random(seed);
|
||||
survival = new SurvivalState();
|
||||
robotStats = new RobotStats();
|
||||
inventory = new Inventory();
|
||||
availableResearch = ResourceLoader.LoadResearch();
|
||||
robots.Clear();
|
||||
currentLayer = 0;
|
||||
visibleLayer = 0;
|
||||
lowestLayer = 0;
|
||||
maxRobotCount = 10;
|
||||
canMove = true;
|
||||
}
|
||||
|
||||
public static void RebuildRobotStatsFromResearch()
|
||||
{
|
||||
robotStats = new RobotStats();
|
||||
maxRobotCount = 10;
|
||||
|
||||
foreach (Research research in availableResearch.Values)
|
||||
{
|
||||
if (research.state == ResearchState.RESEARCHED)
|
||||
{
|
||||
robotStats.Apply(research.data.Effects);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user