Exemplo n.º 1
0
    public void Awake()
    {
        unitAudioSourceHelper = GetParent <Unit>().GameObject.GetComponentInChildren <UnitAudioSourceHelper>();
        AudioPlayerMgr audioPlayerMgr = Game.Scene.GetComponent <AudioMgrComponent>().audioPlayerMgr;

        if (unitAudioSourceHelper.attackAS != null)
        {
            unitAudioSourceHelper.attackAS.outputAudioMixerGroup = audioPlayerMgr.soundEffect;
        }
        if (unitAudioSourceHelper.envirAS != null)
        {
            unitAudioSourceHelper.envirAS.outputAudioMixerGroup = audioPlayerMgr.soundEffect;
        }
        if (unitAudioSourceHelper.emoteAS != null)
        {
            unitAudioSourceHelper.emoteAS.outputAudioMixerGroup = audioPlayerMgr.characterSound;
        }
        if (unitAudioSourceHelper.moveAS != null)
        {
            unitAudioSourceHelper.moveAS.outputAudioMixerGroup = audioPlayerMgr.characterSound;
        }
    }
Exemplo n.º 2
0
 public void Awake(AudioPlayerMgr audioPlayerMgr)
 {
     this.audioPlayerMgr = audioPlayerMgr;
 }