private void Start() { LevelStats = new LevelStats(this); LevelStats.Init(); Init(); }
public void Update() { // Play Now Button has been pressed, here you can initialize your game // Set the level parameters LevelSettings.NumberOfNPCs = (int)NumberOfNPCsSlider.value; LevelSettings.SocialDistancingFactor = SocialDistancingSlider.value; // Initialize the level stats. levelStats.Init(LevelSettings.NumberOfNPCs); }
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"); }