void OnEndKey() { lock (this) { if (_state == BeatState.Running) { StopCapture(true); _state = BeatState.Idle; } } }
public BeatState[] GetLoopState() { BeatState[] ret = new BeatState[this.BeatCount]; for (int i = 0; i < this.BeatCount; i++) { ret[i] = Beats[i].State; } return(ret); }
void OnBeatKey() { lock (this) { if (_state == BeatState.Idle) { StartCapture(); _state = BeatState.FirstBeat; } if (_state == BeatState.FirstBeat) { _state = BeatState.Running; } _tickList.Add(_tracker.CurrentTime); } }
void PeriodicCancelThread() { while (true) { lock (this) { if (_state == BeatState.Running && (_tracker.CurrentTime - _tickList.Last()) > 2000 * 10000 ) { StopCapture(false); _state = BeatState.Idle; } } Thread.Sleep(1000); } }
/// <summary> /// Sets the selection state of the beat. /// </summary> /// <param name="state">State to set the beat as</param> private void SetBeatState(BeatState state) { switch (state) { case BeatState.None: hovered = hovered == this ? null : hovered; outerRectangle.Opacity = 0.3; break; case BeatState.Hovering: hovered = this; outerRectangle.Opacity = 0.5; break; case BeatState.Grab: outerRectangle.Opacity = 0.6; break; } }
private void Track_BeatCountChanged(object sender, EventArgs e) { BeatState[] states = this.beatLoop.GetLoopState(); BeatState[] newstates = new BeatState[this.BeatCount]; if (states.Length <= newstates.Length) { Array.Copy(states, 0, newstates, 0, states.Length); for (int i = states.Length; i < newstates.Length; ++i) { newstates[i] = BeatState.Off; } } else { Array.Copy(states, 0, newstates, 0, newstates.Length); } this.beatLoop.BeatCount = this.BeatCount; this.beatLoop.SetLoopState(newstates); this.SetupSliders(); }
void OnEndKey() { lock(this) { if (_state == BeatState.Running) { StopCapture(true); _state = BeatState.Idle; } } }
private void InitializeObjectBasedOnBeat(Beat BeatObjReference) { SpawnPosition = BeatObjReference.transform.position; CurrentBeatStatus = BeatObjReference.Status; }