第 7 课

目录

通过 Wwise 专有 Event 实现回调:PostMusic

(转到“通过 Wwise 专有 Event 实现回调”)

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

public class PostMusic : MonoBehaviour {
                  public AK.Wwise.Event MusicEvent;
    // 使用此函数进行初始化。
    void Start () {
        MusicEvent.Post(gameObject, (uint)AkCallbackType.AK_MusicSyncBar, CallbackFunction);
    }
    void CallbackFunction(object in_cookie, AkCallbackType in_type, object in_info){
        GameManager.PushRhythmAction();
    }
}

此页面对您是否有帮助?