Пример #1
0
    // Start is called before the first frame update
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        map            = new MapSystem();
        map.global     = this;
        map.currentMap = startScene;
        map.setRepositionType(MapSystem.repositionTypes.none);

        audio = new AudioManager();
        audio.EffectsSource = audioEffectsSource;
        audio.MusicSource   = audioMusicSource;
        audio.Start(gameObject);
    }