C# Class MusicController, UnderworldExporter

The music controller. Updates music tracks to play based on the state of the game world and player.
Inheritance: UWEBase
Show file Open project: hankmorgan/UnderworldExporter Class Usage Examples

Public Properties

Property Type Description
Combat bool
CombatTracks int[]
Death bool
DeathTracks int[]
EndGame bool
EndGameTracks int[]
Fleeing bool
FleeingTracks int[]
IdleTracks int[]
InIntro bool
InMap bool
Injured bool
InjuredTracks int[]
IntroTracks int[]
LastAttackCounter float
MainTrackList UnityEngine.AudioClip[]
MapTracks int[]
SpecialClip bool
Stopped bool
VictoryTracks int[]
WeaponDrawn bool
WeaponTracks int[]

Public Methods

Method Description
PlaySpecialClip ( int newTrackList ) : void

PLays a special music clip. (eg fanfare)

Resume ( ) : void

Resumes playing music

ResumeAll ( ) : void
Stop ( ) : void

Stops music

StopAll ( ) : void

Stops all music processing

UpdateMusicState ( ) : void

Updates the state of the music based on the current world and player state.

Private Methods

Method Description
ChangeTracklist ( int newTrackList, int playingMode ) : void

Changes the track playing if we go to to a new list

GetMaxPriority ( ) : int

Gets the current music state that is active and has the highest priority.

PlayRandom ( int tracklist ) : void

Picks a random track to play from the selected playlist.

Start ( ) : void
Update ( ) : void

Method Details

PlaySpecialClip() public method

PLays a special music clip. (eg fanfare)
public PlaySpecialClip ( int newTrackList ) : void
newTrackList int New track list.
return void

Resume() public method

Resumes playing music
public Resume ( ) : void
return void

ResumeAll() public method

public ResumeAll ( ) : void
return void

Stop() public method

Stops music
public Stop ( ) : void
return void

StopAll() public method

Stops all music processing
public StopAll ( ) : void
return void

UpdateMusicState() public method

Updates the state of the music based on the current world and player state.
public UpdateMusicState ( ) : void
return void

Property Details

Combat public property

Playing combat music
public bool Combat
return bool

CombatTracks public property

Array of the possible combat tracks
public int[] CombatTracks
return int[]

Death public property

PLayer character is death
public bool Death
return bool

DeathTracks public property

Array of the possible death tracks.
public int[] DeathTracks
return int[]

EndGame public property

is the end game track playing
public bool EndGame
return bool

EndGameTracks public property

Array of possible end game tracks.
public int[] EndGameTracks
return int[]

Fleeing public property

Is the player fleeing from combat (recently attacked and no weapon drawn)
public bool Fleeing
return bool

FleeingTracks public property

Array of the possible fleeing tracks.
public int[] FleeingTracks
return int[]

IdleTracks public property

Array of the possible idle tracks
public int[] IdleTracks
return int[]

InIntro public property

Playing intro music
public bool InIntro
return bool

InMap public property

In the automap
public bool InMap
return bool

Injured public property

Player character near death.
public bool Injured
return bool

InjuredTracks public property

Array of the possible injured tracks
public int[] InjuredTracks
return int[]

IntroTracks public property

Array of the possible intro tracks
public int[] IntroTracks
return int[]

LastAttackCounter public static property

Tracks how long ago the last attack took place at.
public static float LastAttackCounter
return float

MainTrackList public property

The main track list. Contains all the tracks that can be played.
public AudioClip[],UnityEngine MainTrackList
return UnityEngine.AudioClip[]

MapTracks public property

Array of the possible automap tracks
public int[] MapTracks
return int[]

SpecialClip public property

Is a special clip such as a fan fare being played.
public bool SpecialClip
return bool

Stopped public property

Is music processing stopped
public bool Stopped
return bool

VictoryTracks public property

Array of the possible victory tracks
public int[] VictoryTracks
return int[]

WeaponDrawn public property

Weapon drawn music
public bool WeaponDrawn
return bool

WeaponTracks public property

Array of the possible weapon tracks
public int[] WeaponTracks
return int[]