예제 #1
0
    /// <summary>Plays the SFXLayer after the specified delay in 3D space.</summary>
    /// <param name="SFX">The SFXLayer to play.</param>
    /// <param name="DelayDuration">Duration of the delay for the SFXObject.</param>
    /// <param name="SFXVolume">The volume multiplier applied.</param>
    /// <param name="SFXPitch">The pitch multiplier applied.</param>
    private IEnumerator DelayedPlay(SFXLayer SFX, float DelayDuration, float SFXVolume, float SFXPitch)
    {
        yield return(new WaitForUnpausedSeconds(DelayDuration));

        SFX.Play(0, SFXVolume, SFXPitch);
    }
예제 #2
0
    /// <summary>Plays the SFXLayer after the specified delay.</summary>
    /// <param name="SFX">The SFXLayer to play.</param>
    /// <param name="Position">The position in 3D space to play the SFXLayer at.</param>
    /// <param name="DelayDuration">Duration of the delay for the SFXObject.</param>
    /// <param name="SFXVolume">The volume multiplier applied.</param>
    /// <param name="SFXPitch">The pitch multiplier applied.</param>
    /// <param name="Parent">Parent transform to assign to the SFXLayer (Optional).</param>
    /// <param name="IsGlobalPosition">If the position to play the SFXLayer at is global or local to the parent.</param>
    private IEnumerator DelayedPlay(SFXLayer SFX, Vector3 Position, float DelayDuration, float SFXVolume, float SFXPitch, Transform Parent = null, bool IsGlobalPosition = true)
    {
        yield return(new WaitForUnpausedSeconds(DelayDuration));

        SFX.Play(Position, 0, SFXVolume, SFXPitch, Parent, IsGlobalPosition);
    }