public SignalLogItem(ASignal signalInstance) { TimeStamp = DateTime.Now; PlayDispatchTime = Time.time; SignalInstance = signalInstance; SignalType = signalInstance.GetType(); }
internal static void LogSignalDispatch(ASignal signal) { if (OnSignalDispatch != null) { OnSignalDispatch(signal); } }
private void OnSignalDispatch(ASignal signal) { var signalLogItem = new SignalLogItem(signal); log.Add(signalLogItem); lastDispatch[signalLogItem.SignalType] = signalLogItem; if (OnNewSignalLog != null) { OnNewSignalLog(signalLogItem); } }
public void DrawSignalDetailView() { GUILayout.BeginVertical(); if (instance == null) { instance = Signals.Get(type) as ASignal; if (instance == null) { GUILayout.Label("Only signals derived from ASignal supported"); return; } } var indexObject = currentIndexField.GetValue(instance); currentIndex = indexObject is int?(int)indexObject : 0; var stateObject = stateField.GetValue(instance); state = stateObject is ASignal.State ? (ASignal.State)stateObject : ASignal.State.Idle; DrawHeader(); GUILayout.Space(24f); DrawDispatchPropertyFields(); DrawButtons(); GUILayout.Space(24f); DrawLogs(); GUILayout.Space(24f); DrawListeners(); GUILayout.EndVertical(); }
public void Reset() { instance = null; logViewDrawer.Reset(); }