Leçon 8

Table des matières

Setting a Music Region State: SetMusicState

(go to Setting a Music Region State)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SetMusicState : MonoBehaviour {
    public AK.Wwise.State OnTriggerEnterState;
    public AK.Wwise.State OnTriggerExitState;
    private void OnTriggerEnter(Collider other){
        if(other.CompareTag("Player")){
            OnTriggerEnterState.SetValue();
        }
    }
    private void OnTriggerExit(Collider other){
        if(other.CompareTag("Player")){
            OnTriggerExitState.SetValue();
        }
    }
}

Cette page a-t-elle été utile ?