Пример #1
0
    private void Start()
    {
        LevelStats = new LevelStats(this);
        LevelStats.Init();

        Init();
    }
Пример #2
0
    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);
    }
Пример #3
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");
    }