Beispiel #1
0
    private void Awake()
    {
        //no checks if null, since there is the 'require' attribute on the class
        audioSource = GetComponent <AudioSource>();

        //this is to accomodate an expansion feature with fade in and out effects on sound using Mixers.
        audioSource.outputAudioMixerGroup = audioMixerGroupMusic;

        Slider[] allSliders = FindObjectsOfType <Slider>();
        foreach (Slider thisSlider in allSliders)
        {
            if (thisSlider.gameObject.name == "SliderEffects")
            {
                slider = thisSlider;
            }
        }


        //there is only one of these:
        gameStateManager = FindObjectOfType <GameStateManager>();
        //subscribe methods to events:
        if (gameStateManager != null)
        {
            //gameStateManager.gameWonEvent += GameWonSoundEffect;
            //  gameStateManager.gameLostEvent += GameLostSoundEffect;
        }

        sceneManagerLocal = FindObjectOfType <SceneManagerLocal>();
    }
Beispiel #2
0
    private void FindWitchOneToLoadAfterAdditive(string sceneToChargeAfterAdditive)
    {
        EventManager.TriggerEvent(GameData.Event.AdditiveJustFinishLoad);

        Debug.Log("findAfterAdditive;.." + sceneToChargeAfterAdditive);
        SceneManagerLocal local = GameManager.Instance.SceneManagerLocal;

        local.StartLoading(sceneToChargeAfterAdditive);
    }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     sceneManagerLocal = FindObjectOfType <SceneManagerLocal>();
 }