DynamicSequencePlay() public static method

public static DynamicSequencePlay ( uint in_playingID ) : AKRESULT
in_playingID uint
return AKRESULT
示例#1
0
    public static void DynamicDialogue(string eventName, string[] args, GameObject go)
    {
        // Generated locally, no match in project
        uint sequenceID = AkSoundEngine.DynamicSequenceOpen(go);
        // eg. VO_Positives_E
        uint eventUINT = AkSoundEngine.GetIDFromString(eventName);

        // build hashes for arguments, eg. Grunt, Cheer,
        uint[] argUINTS = new uint[args.Length];
        for (int i = 0; i < argUINTS.Length; i++)
        {
            argUINTS[i] = AkSoundEngine.GetIDFromString(args[i]);
        }
        // audio file hash
        uint nodeID = AkSoundEngine.ResolveDialogueEvent(eventUINT, argUINTS, (uint)argUINTS.Length);

        // sequence of events being played.
        AkPlaylist playList = AkSoundEngine.DynamicSequenceLockPlaylist(sequenceID);

        playList.Enqueue(nodeID);

        AkSoundEngine.DynamicSequenceUnlockPlaylist(sequenceID);

        AkSoundEngine.DynamicSequencePlay(sequenceID);

        AkSoundEngine.DynamicSequenceClose(sequenceID);
    }