Esempio n. 1
0
 public void funLoadLevelState(ILevelState lvl)
 {
     GameObject.DontDestroyOnLoad((RefLevel as MonoBehaviour).gameObject);
     SceneManager.LoadScene(2); // TODO: Check game scene number
     RefLevel = lvl;
     RefLevel.funDayStart();
 }
Esempio n. 2
0
    private void Start()
    {
        DontDestroyOnLoad(gameObject);

        if (RefLevel == null)
        {
            RefLevel = new GameObject("LevelState").AddComponent <Level1>();
            DontDestroyOnLoad((RefLevel as MonoBehaviour).gameObject);
        }

        RefLevel.funDayStart();
    }