Interface IMusicTrack
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public interface IMusicTrack
- Extension Methods
Properties
IsActive
Is the track active?
bool IsActive { get; }
Property Value
Name
The name of the track
string Name { get; }
Property Value
PositionString
string PositionString { get; }
Property Value
Priority
The priority of the track. A higher priority will cancel active tracks.
float Priority { get; }
Property Value
StartPriority
The start priority of the track. A higher priority will leave active tracks playing.
float StartPriority { get; }
Property Value
Methods
BeginPlay(TrackedPlayerProperties)
Begin playing the current track.
void BeginPlay(TrackedPlayerProperties props)
Parameters
props
TrackedPlayerPropertiesPlayer Properties
BeginSort()
Called before sorting by start priority happens
void BeginSort()
ContinuePlay(float, TrackedPlayerProperties)
Is it cool for the current track to continue playing?
bool ContinuePlay(float dt, TrackedPlayerProperties props)
Parameters
dt
floatDelta Time/Change in time.
props
TrackedPlayerPropertiesTrack properties.
Returns
- bool
Cool or not cool?
FadeOut(float, Action)
Called when the track to interupted or when Update() returned false. So called every time the tracked ended or has to end
void FadeOut(float seconds, Action onFadedOut = null)
Parameters
FastForward(float)
void FastForward(float seconds)
Parameters
seconds
float
Initialize(IAssetManager, ICoreClientAPI, IMusicEngine)
Initialization of the Music Track.
void Initialize(IAssetManager assetManager, ICoreClientAPI capi, IMusicEngine musicEngine)
Parameters
assetManager
IAssetManagerthe global Asset Manager
capi
ICoreClientAPIThe Core Client API
musicEngine
IMusicEngine
ShouldPlay(TrackedPlayerProperties, ClimateCondition, BlockPos)
Should this current track play?
bool ShouldPlay(TrackedPlayerProperties props, ClimateCondition conds, BlockPos pos)
Parameters
props
TrackedPlayerPropertiesPlayer Properties
conds
ClimateConditionpos
BlockPos
Returns
- bool
Should we play the current track?
UpdateVolume()
Updates the volume on the current track.
void UpdateVolume()