Example #1
0
    private void Awake()
    {
        myPlayer     = FindObjectOfType <Player>();
        myRisingTide = FindObjectOfType <RisingTide>();

        masterMusicPlayer         = FindObjectOfType <MasterMusicPlayer>().GetComponent <AudioSource>();
        soundVolume               = PlayerPrefsManager.GetSoundVolume();
        managerAudioSource        = GetComponent <AudioSource>();
        managerAudioSource.volume = soundVolume;
    }
    void Start()
    {
        if (FindObjectOfType <GameSettingsManager>() != null)
        {
            charges = GameSettingsManager.GetDivineOrbCharges();
        }
        else
        {
            charges = 1;
        }
        chargesLeftText.text = charges.ToString();

        warningText        = warningTextPanel.GetComponentInChildren <Text>();
        buffingAnimator    = playerBuffingObject.GetComponent <Animator>();
        buffingAudioSource = playerBuffingObject.GetComponent <AudioSource>();
        myRisingTide       = FindObjectOfType <RisingTide>();
    }