Beispiel #1
0
        public void SetLevel <T>() where T : Level
        {
            if (_currentLevel != null)
            {
                Destroy(_currentLevel);
            }

            _currentLevel            = gameObject.AddComponent <T>();
            _currentLevel.OnSetuped += StartLevel;
            _currentLevel.LoadAndSetup();
        }