public void Start() { LevelSettings = LevelSettings.GetActiveLevelSettings(); // Get the statistics object that counts the number of infected humans // and initialize it. levelStats = LevelStats.GetActiveLevelStats(); // Reset the level stats if it was active. // This is necessary if we restart from a previous run. levelStats.Reset(); }
public void StartCampaign() { // Play Now Button has been pressed, here you can initialize your game // Get the statistics object that counts the number of infected humans // and initialize it. LevelStats levelStats = LevelStats.GetActiveLevelStats(); // Reset the level stats if it was active. // This is necessary if we restart from a previous run. levelStats.Reset(); // Initialize the level stats. levelStats.Init(LevelSettings.NumberOfNPCs); // Load the Scene for levelgethome UnityEngine.SceneManagement.SceneManager.LoadScene("StartScreenLevelgethome"); }
public static LevelStats Load(uint levelID) { string path = SaveSlot.GetCurrentSlotPath() + "/Levels/"; if (!File.Exists(path + "Level " + levelID)) { return(null); } LevelStats stats = new LevelStats(); stats.Reset(); StreamReader stream = new StreamReader(path + "Level " + levelID); stats.LoadLevelInfo(stream); stats.LoadLevelGlobalStats(stream); stats.LoadLevelTracking(stream); return(stats); }
public void ResetStats() { stats.Reset(); }
// Use this for initialization void Awake() { m_levelStats.Reset(); }