3using System.Collections.Generic;
17 [SerializeField, Multiselect(
"TrackNames")]
30 :
new() {
"Data not assigned!" };
35 public Action<RadioComponent>
OnInit {
get;
set; } =
new(_ => { });
41 public override void Init()
66 for (
int i = 0; i < oldIndexes.Length; i++)
79 for (
int i = 0; i < affectedIndexes.Length; i++)
An extension of RadioComponent that accesses specific tracks on the stored RadioData.
List< string > TrackNames
The list of tracks on the RadioData that this component can choose from.
void AssignToTrack(RadioTrackWrapper _track)
Links this component to a track.
void AssignToTracksGeneric()
Generally applicable method that converts affectedTracks to a list of tracks, then calls AssignToTrac...
virtual void AccessorInit()
Allows extra code for initialization so that Init() can still be called.
int lastAffectedTracks
The tracks that were affected previously- only matters if affected tracks are changed at runtime (whi...
override void Init()
Initialises this component and links its affected tracks.
int affectedTracks
The tracks that this component affects. This is displayed with a MultiselectAttribute.
void RemoveFromTrack(RadioTrackWrapper _track)
Unlinks this component from a track.
Action< RadioComponent > OnInit
Event called when the component is initialized.
A scene component that holds a reference to a RadioData.
RadioData data
The RadioData (aka just radio) that this component is linked to.
A custom attribute that allows ints to display as a multiselect dropdown for a given collection,...
static int[] ToInt(int _flags)
Shorthand for MultiselectAttribute.To<int>(_flags, _options). Useful for converting a multiselect to ...
A wrapper class for RadioTrack so that track types can be switched between in the inspector!...
Base interfaces and classes for components, e.g: track accessors, output accessors.
Tracks to be used on a radio- includes base classes.