Exemplo n.º 1
0
    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();
    }
Exemplo n.º 2
0
    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");
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
 public void ResetStats()
 {
     stats.Reset();
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Awake()
 {
     m_levelStats.Reset();
 }