OMIDIV
Standard2D Class Reference
Inheritance diagram for Standard2D:
VisualsComponent OmidivComponent

Classes

class  TrackInfo
 

Protected Types

enum  NoteState { Unplayed , Playing , Played }
 

Protected Member Functions

bool TrackHasNotes (TrackInfo track)
 
bool IgnoreTrack (TrackInfo trackInfo)
 
void Start ()
 
override void Update ()
 
virtual void SetNoteState (TrackInfo trackInfo, int noteIndex, NoteState state)
 Updates the visuals for a note at a given noteIndex of a specific trackInfo .
 
virtual void UpdateNowPlayingVisuals ()
 
override void CreateVisuals ()
 
override void ClearVisuals ()
 
void ResetTracks ()
 
void ResetNotes (bool justColors=false)
 
override void MovePlay (decimal ticks, decimal microseconds)
 
override void Restart ()
 Override this. Called when the visualization restarts (R is pressed).
 
override void DrawGUI ()
 Override this. Use ImGui to draw most UI elements here.
 
override void WriteConfig ()
 Override this. Write to Config here.
Don't forget to include ConfigTag in your config keys.
 
override void ReadConfig ()
 Override this. Read from Config here.
Don't forget to include ConfigTag in your config keys.
 
- Protected Member Functions inherited from VisualsComponent
void CreateVisuals ()
 Create your visualization here. Happens every time visuals reload after a call to ClearVisuals.
 
void ClearVisuals ()
 Clear all created visuals here.
 
void MovePlay (decimal ticks, decimal microseconds)
 Move your visualization forward or backward (in case midi delay is adjusted).
 
override void OnEnable ()
 
override void OnDisable ()
 
override void OnDestroy ()
 
override void ReadConfig ()
 
override void WriteConfig ()
 
override void LoadVisuals ()
 Clears and creates the visuals.
 
override void DrawGUI ()
 
override void Restart ()
 Override this. Called when the visualization restarts (R is pressed).
 
- Protected Member Functions inherited from OmidivComponent
virtual void Awake ()
 
virtual void OnPlayStart ()
 Override this. Called when the visualization starts playing. May be starting from the beginning or resuming.
 
virtual void OnPlayStop ()
 Override this. Called when the visualization stops playing.
 
virtual void Reset_ ()
 Override this. Called when SceneController.OnReset is fired. LoadAudio and LoadMidi will also be called afterwards, so don't do any of that here, but do reload any other resources your component needs.
 
virtual void LoadMidi ()
 Override this. Called when the midi information needs to be loaded from the file. LoadVisuals will also be called afterwards, so don't do any of that here.
 
virtual void LoadAudio ()
 Override this. Called when the audio needs to be loaded from the file.
 

Protected Attributes

GameObject NotePrefab
 
TrackInfo[] Tracks = new TrackInfo[0]
 
float VelocityFactor = 0.75f
 
float NoteHeight = 10f
 
float NoteHSpacing = 2f
 
float NoteVSpacing = 2f
 
float PlayedAlpha = 0.05f
 
float LastTrackUpdate = -1f
 
float LastNoteUpdate = -1f
 
float LastReloadVisuals = -1f
 

Static Protected Attributes

static readonly float GlobalScale = 1/128.0f
 

Additional Inherited Members

- Public Attributes inherited from OmidivComponent
string ConfigTag = "def"
 Use this to give different instances in difference scenes different saved config.

 
- Static Public Attributes inherited from VisualsComponent
static readonly SortedList< int, Color > TrackColors = new SortedList<int, Color>()
 
- Properties inherited from VisualsComponent
bool AutoApplyChanges = true [get, set]
 Whether changes that require recreating the visualization should apply automatically (true) or manually with F6 (false).
 
- Properties inherited from OmidivComponent
static bool IsPlaying [get]
 Is the visualization currently playing.
 
static double FrameDeltaTime [get]
 Time.deltaTime when not recording, 1/recording framerate when recording. In most cases, use this instead of Time.deltaTime so that recordings work properly.
 

Member Function Documentation

◆ DrawGUI()

override void Standard2D.DrawGUI ( )
protectedvirtual

Override this. Use ImGui to draw most UI elements here.

Subscribe to ImGuiManager.DrawMainMenuItems to add to main menu bar menus instead of here.

Reimplemented from OmidivComponent.

◆ ReadConfig()

override void Standard2D.ReadConfig ( )
protectedvirtual

Override this. Read from Config here.
Don't forget to include ConfigTag in your config keys.

Reimplemented from OmidivComponent.

◆ Restart()

override void Standard2D.Restart ( )
protectedvirtual

Override this. Called when the visualization restarts (R is pressed).

Reimplemented from OmidivComponent.

◆ Update()

override void Standard2D.Update ( )
protectedvirtual

Please call base.Update() if overriding this unless you know what you're doing.

Reimplemented from VisualsComponent.

◆ WriteConfig()

override void Standard2D.WriteConfig ( )
protectedvirtual

Override this. Write to Config here.
Don't forget to include ConfigTag in your config keys.

Reimplemented from OmidivComponent.

Member Data Documentation

◆ Tracks

TrackInfo [] Standard2D.Tracks = new TrackInfo[0]
protected

Note: the index of a track in here may not be the same as the midi track it represents (such as if it's been reordered). See TrackInfo.midiTrack.


The documentation for this class was generated from the following file: