Table of Contents

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

Properties

IsActive

Is the track active?

public bool IsActive { get; }

Property Value

bool

Name

The name of the track

public string Name { get; }

Property Value

string

PositionString

public string PositionString { get; }

Property Value

string

Priority

The priority of the track. A higher priority will cancel active tracks.

public float Priority { get; }

Property Value

float

StartPriority

The start priority of the track. A higher priority will leave active tracks playing.

public float StartPriority { get; }

Property Value

float

Methods

BeginPlay(TrackedPlayerProperties)

Begin playing the current track.

public void BeginPlay(TrackedPlayerProperties props)

Parameters

props TrackedPlayerProperties

Player 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 float

Delta Time/Change in time.

props TrackedPlayerProperties

Track 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

seconds float
onFadedOut Action

FadeOut(float, Action<ILoadedSound>)

public void FadeOut(float seconds, Action<ILoadedSound> onFadedOut)

Parameters

seconds float
onFadedOut 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 IAssetManager

the global Asset Manager

capi ICoreClientAPI

The 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 TrackedPlayerProperties

Player Properties

conds ClimateCondition
pos BlockPos

Returns

bool

Should we play the current track?

Stop()

public void Stop()

UpdateVolume()

Updates the volume on the current track.

public void UpdateVolume()