Fixed Listener's functions being private in SFML.Net
Added a function to set a sound's position relative to the listener git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1059 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
631bcc8c5f
commit
40b4bda26b
20 changed files with 295 additions and 52 deletions
|
@ -159,6 +159,19 @@ namespace SFML
|
|||
set {sfSound_SetPosition(This, value.X, value.Y, value.Z);}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Is the sound's position relative to the listener's position,
|
||||
/// or is it absolute?
|
||||
/// Default value is false (absolute)
|
||||
/// </summary>
|
||||
////////////////////////////////////////////////////////////
|
||||
public bool RelativeToListener
|
||||
{
|
||||
get {return sfSound_IsRelativeToListener(This);}
|
||||
set {sfSound_SetRelativeToListener(This, value);}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Minimum distance of the sound. Closer than this distance,
|
||||
|
@ -238,6 +251,9 @@ namespace SFML
|
|||
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
|
||||
static extern void sfSound_SetPosition(IntPtr Sound, float X, float Y, float Z);
|
||||
|
||||
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
|
||||
static extern void sfSound_SetRelativeToListener(IntPtr Sound, bool Relative);
|
||||
|
||||
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
|
||||
static extern void sfSound_SetMinDistance(IntPtr Sound, float MinDistance);
|
||||
|
||||
|
@ -256,6 +272,9 @@ namespace SFML
|
|||
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
|
||||
static extern void sfSound_GetPosition(IntPtr Sound, out float X, out float Y, out float Z);
|
||||
|
||||
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
|
||||
static extern bool sfSound_IsRelativeToListener(IntPtr Sound);
|
||||
|
||||
[DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity]
|
||||
static extern float sfSound_GetMinDistance(IntPtr Sound);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue