レッスン 8

目次

Routing Callback Notifications: PostWwiseEvent

(go to Routing Callback Notifications)

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

public class PostWwiseEvent : MonoBehaviour {
    public AK.Wwise.Event MusicEvent;
    public AK.Wwise.Event MusicEvent_Enemy;
    public AK.Wwise.CallbackFlags CallbackTypes;
    // Use this for initialization.
    void Start () {
        MusicEvent.Post(gameObject, CallbackTypes, CallbackFunction);
    }
    void CallbackFunction(object in_cookie, AkCallbackType in_type, object in_info){
        if(in_type == AkCallbackType.AK_MusicSyncUserCue){
            MusicEvent_Enemy.Post(gameObject);
        }
        GameManager.PushRhythmAction();
    }
}