/// <summary> /// Post all actions in this event at this position with this game object as the controller /// </summary> /// <param name="controllingObject">The controlling object of the played audio files</param> /// <param name="postEvent">The event to post the actions of</param> /// <param name="position">The position in world space of the sound</param> public static void PostEventAtPosition(GameObject controllingObject, InAudioEventNode postEvent, Vector3 position) { if (instance != null && controllingObject != null && postEvent != null) { instance.OnPostEventAtPosition(controllingObject, postEvent, position); } else { if (instance == null) { InDebug.InAudioInstanceMissing(controllingObject); } else if (controllingObject == null) { InDebug.MissingControllingObject(); } else if (postEvent == null) { InDebug.MissingEvent(controllingObject); } } }
/// <summary> /// Post all actions in this event attached to this another game object than the one controlling it /// </summary> /// <param name="controllingObject">The controlling object of the played sources</param> /// <param name="postEvent">The event to post the actions of</param> /// <param name="attachedToOther">The audio source to attach any audio sources to</param> public static void PostEventAttachedTo(GameObject controllingObject, InAudioEventNode postEvent, GameObject attachedToOther) { if (instance != null && controllingObject != null && postEvent != null) { instance.OnPostEvent(controllingObject, postEvent, attachedToOther); } else { if (instance == null) { InDebug.InAudioInstanceMissing(controllingObject); } else if (controllingObject == null) { InDebug.MissingControllingObject(); } else if (postEvent == null) { InDebug.MissingEvent(controllingObject); } } }