// Use this for initialization protected override void Start() { base.Start(); liner = GetComponent <LineRenderer> (); BeatScheduler.ScheduleNextMeasure(new StartTrackEvent(track)); soundpicker = new SoundRandomizer(audioSource, shootingSounds); }
void IEnemyInitiator.triggerStart() { BeatTracker track = attackscript.GetTrack(); if (track != null) { BeatScheduler.ScheduleNextMeasure(new StartTrackEvent(track)); } }
/// <summary> /// Sets the BeatScheduler that is responsible for feeding this IMidiOut with MIDI messages. Setting this multiple times causes an error. /// </summary> /// <param name="source">The BeatScheduler</param> void IMidiOut.SetSource(BeatScheduler source) { lock (_sync) { if (_source == null) { _source = source; _workThread.Start(); timeMannager.Start(); } else { throw new InvalidOperationException("This IMidiOut is already in use"); } } }
void IEnemyInitiator.triggerStart() { GameObject inst = GameObject.Instantiate(spawnPrefab, spawnLocation.position, spawnLocation.rotation) as GameObject; if (startTrack) { AbstractEnemyAttack attackscript = inst.GetComponent <AbstractEnemyAttack> (); if (attackscript != null) { BeatTracker track = attackscript.GetTrack(); if (track != null) { BeatScheduler.ScheduleNextMeasure(new StartTrackEvent(track)); } } } }
// Use this for initialization protected override void Start() { base.Start(); BeatScheduler.ScheduleNextMeasure(new StartTrackEvent(track)); }
/// <summary> /// Creates a new instance of the orchestra class. /// Needs a reference to an output class, which you can get by creating a new WinmmOut instance. /// </summary> /// <param name="output"> The output class to send all played music to. </param> public Orchestra(IMidiOut output) { _output = output; _beatScheduler = new BeatScheduler(this, _output); _output.SetSource(_beatScheduler); }