This commit is contained in:
Chikashi Miyama 2019-11-01 17:13:16 +01:00
parent 59d07bdd75
commit 66a98d60ba
4 changed files with 26 additions and 12 deletions

View file

@ -256,6 +256,17 @@ MonoBehaviour:
m_StringArgument: m_StringArgument:
m_BoolArgument: 0 m_BoolArgument: 0
m_CallState: 2 m_CallState: 2
- m_Target: {fileID: 1261823480}
m_MethodName: SendState
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
sceneSelection: 0 sceneSelection: 0
--- !u!4 &337815216 --- !u!4 &337815216
Transform: Transform:
@ -676,6 +687,17 @@ MonoBehaviour:
m_StringArgument: m_StringArgument:
m_BoolArgument: 0 m_BoolArgument: 0
m_CallState: 2 m_CallState: 2
- m_Target: {fileID: 337815215}
m_MethodName: OnMidiReceived
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
midiSyncReceived: midiSyncReceived:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls:

View file

@ -11,7 +11,7 @@ namespace cylvester
IPdArray PitchArray { get; } IPdArray PitchArray { get; }
IPdArrayContainer SpectrumArrayContainer{ get; } IPdArrayContainer SpectrumArrayContainer{ get; }
IPdArrayContainer WaveformArrayContainer{ get; } IPdArrayContainer WaveformArrayContainer{ get; }
void SendState(IStateManager manager); void SendState(IStateReader manager);
} }
public class PdBackend : MonoBehaviour, IPdBackend public class PdBackend : MonoBehaviour, IPdBackend
@ -97,7 +97,7 @@ namespace cylvester
samplePlaybackObserver_.Value = samplePlayback; samplePlaybackObserver_.Value = samplePlayback;
} }
public void SendState(IStateManager stateManager) public void SendState(IStateReader stateManager)
{ {
pdSender_.Send("state previous " + (stateManager.PreviousState.HasValue ? stateManager.PreviousState.Value.Title : "---")); pdSender_.Send("state previous " + (stateManager.PreviousState.HasValue ? stateManager.PreviousState.Value.Title : "---"));
pdSender_.Send("state current " + stateManager.CurrentState.Title); pdSender_.Send("state current " + stateManager.CurrentState.Title);

View file

@ -7,15 +7,15 @@ namespace cylvester
public interface IStateReader public interface IStateReader
{ {
State? PreviousState { get; }
State CurrentState { get; } State CurrentState { get; }
State? NextState { get; }
} }
public interface IStateManager : IStateReader public interface IStateManager : IStateReader
{ {
int SelectedState { set; } int SelectedState { set; }
State[] States { get; } State[] States { get; }
State? PreviousState { get; }
State? NextState { get; }
} }
public struct State public struct State

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9581872f89ab2c24c849f6ff4bfeea7d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: