LoadLevel.Load C# (CSharp) Method

Load() public method

public Load ( int level ) : void
level int
return void
    public void Load(int level)
    {
        if (erasePlayerPrefs)
        {
            PlayerPrefs.DeleteAll();
            PlayerPrefs.Save();
        }

        // NOTE: we dont check if next level actually exists in list, could check with Application.levelCount
        Application.LoadLevel(level);
    }

Usage Example

Beispiel #1
0
    /// <param name="NumberClickParams">Loadable level number</param>
    public static void Invoke(int NumberClickParams)
    {
        GlobalSounds.pressButton.Play();
        GlobalSounds.transfer.PlayDelayed(0.15f);
        HideContentBalls.Invoke();

        GlobalVariables.stateForAnimation = (int)GlobalVariables.NameAnimation.GameLevel;

        SaveInGame.numberLvlClick = NumberClickParams;
        LoadLevel.Load(SaveInGame.numberLvlClick);
    }
All Usage Examples Of LoadLevel::Load