Class RainMusicTrack
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
Creates a track for rain related music. [Not yet implemented]
public class RainMusicTrack : IMusicTrack
- Inheritance
-
RainMusicTrack
- Implements
- Inherited Members
- Extension Methods
Properties
IsActive
Is the track active?
public bool IsActive { get; }
Property Value
Name
The name of the track
public string Name { get; }
Property Value
PositionString
public string PositionString { get; }
Property Value
Priority
The priority of the track. A higher priority will cancel active tracks.
public float Priority { get; }
Property Value
StartPriority
The start priority of the track. A higher priority will leave active tracks playing.
public float StartPriority { get; }
Property Value
Methods
BeginPlay(TrackedPlayerProperties)
Begin playing the current track.
public void BeginPlay(TrackedPlayerProperties props)
Parameters
props
TrackedPlayerPropertiesPlayer Properties
BeginSort()
Called before sorting by start priority happens
public void BeginSort()
ContinuePlay(float, TrackedPlayerProperties)
Is it cool for the current track to continue playing?
public 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
public void FadeOut(float seconds, Action onFadedOut = null)
Parameters
FadeOut(float, Action<ILoadedSound>)
public void FadeOut(float seconds, Action<ILoadedSound> onFadedOut)
Parameters
seconds
floatonFadedOut
Action<ILoadedSound>
FastForward(float)
public void FastForward(float seconds)
Parameters
seconds
float
Initialize(IAssetManager, ICoreClientAPI, IMusicEngine)
Initialization of the Music Track.
public 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?
public bool ShouldPlay(TrackedPlayerProperties props, ClimateCondition conds, BlockPos pos)
Parameters
props
TrackedPlayerPropertiesPlayer Properties
conds
ClimateConditionpos
BlockPos
Returns
- bool
Should we play the current track?
Stop()
public void Stop()
UpdateVolume()
Updates the volume on the current track.
public void UpdateVolume()