Class Instrument
- Namespace
- ChartTools
- Assembly
- ChartTools.dll
Base class for instruments
public abstract record Instrument : IEmptyVerifiable, IEquatable<Instrument>
- Inheritance
-
Instrument
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Instrument()
protected Instrument()
Instrument(Instrument)
protected Instrument(Instrument original)
Parameters
originalInstrument
Properties
Easy
Easy track
public Track? Easy { get; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Expert
Expert track
public Track? Expert { get; }
Property Value
Hard
Hard track
public Track? Hard { get; }
Property Value
InstrumentIdentity
Identity of the instrument the object belongs to
public InstrumentIdentity InstrumentIdentity { get; }
Property Value
InstrumentType
Type of instrument
public InstrumentType InstrumentType { get; }
Property Value
IsEmpty
true if containing no data
public bool IsEmpty { get; }
Property Value
Medium
Medium track
public Track? Medium { get; }
Property Value
SharedSpecialPhrases
Set of special phrases applied to all difficulties
public List<InstrumentSpecialPhrase> SharedSpecialPhrases { get; set; }
Property Value
Methods
CreateTrack(SafeEnum<Difficulty>)
Creates a track
public abstract Track CreateTrack(SafeEnum<Difficulty> difficulty)
Parameters
difficultySafeEnum<Difficulty>Difficulty of the track
Returns
Equals(Instrument?)
public virtual bool Equals(Instrument? other)
Parameters
otherInstrument
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetDifficulty(InstrumentDifficultySet)
public ref sbyte? GetDifficulty(InstrumentDifficultySet difficulties)
Parameters
difficultiesInstrumentDifficultySet
Returns
GetEasy()
protected abstract Track? GetEasy()
Returns
GetExistingTracks()
Creates an array containing all tracks with data.
public virtual IEnumerable<Track> GetExistingTracks()
Returns
GetExpert()
protected abstract Track? GetExpert()
Returns
GetHard()
protected abstract Track? GetHard()
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetIdentity()
protected abstract InstrumentIdentity GetIdentity()
Returns
GetMedium()
protected abstract Track? GetMedium()
Returns
GetTrack(SafeEnum<Difficulty>)
Gets the track matching a difficulty.
public abstract Track? GetTrack(SafeEnum<Difficulty> difficulty)
Parameters
difficultySafeEnum<Difficulty>
Returns
GetTracks()
Creates an array containing all tracks.
public abstract Track?[] GetTracks()
Returns
- Track[]
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
RemoveTrack(SafeEnum<Difficulty>)
Removes a track.
public abstract bool RemoveTrack(SafeEnum<Difficulty> difficulty)
Parameters
difficultySafeEnum<Difficulty>Difficulty of the target track
Returns
ShareLocalEvents(TrackObjectSource)
Gives all tracks the same local events.
public LocalEvent[] ShareLocalEvents(TrackObjectSource source)
Parameters
sourceTrackObjectSource
Returns
ShareSpecial(TrackObjectSource)
Gives all tracks the same special phrases.
public SpecialPhrase[] ShareSpecial(TrackObjectSource source)
Parameters
sourceTrackObjectSource
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Instrument?, Instrument?)
public static bool operator ==(Instrument? left, Instrument? right)
Parameters
leftInstrumentrightInstrument
Returns
operator !=(Instrument?, Instrument?)
public static bool operator !=(Instrument? left, Instrument? right)
Parameters
leftInstrumentrightInstrument