Example #1
0
    private EventInstance PlayOneShot(string path, Vector3 position, float volume, FMOD_StudioSystem.ProcessEventInstanceDelegate eventSetup = null)
    {
        if (this.ShouldBeCulled(path, position))
        {
            return(null);
        }
        EventInstance @event = this.GetEvent(path);

        FMOD.Studio.ATTRIBUTES_3D attributes = position.to3DAttributes();
        FMOD_StudioSystem.ERRCHECK(@event.set3DAttributes(attributes));
        if (eventSetup == null || eventSetup(@event))
        {
            FMOD_StudioSystem.ERRCHECK(@event.start());
        }
        FMOD_StudioSystem.ERRCHECK(@event.release());
        return(@event);
    }
Example #2
0
 public EventInstance PlayOneShot(string path, Vector3 position, FMOD_StudioSystem.ProcessEventInstanceDelegate eventSetup = null)
 {
     return(this.PlayOneShot(path, position, 1f, eventSetup));
 }