コード例 #1
0
ファイル: SignalLog.cs プロジェクト: supyrb/signals
 public SignalLogItem(ASignal signalInstance)
 {
     TimeStamp        = DateTime.Now;
     PlayDispatchTime = Time.time;
     SignalInstance   = signalInstance;
     SignalType       = signalInstance.GetType();
 }
コード例 #2
0
ファイル: Signals.cs プロジェクト: supyrb/signals
 internal static void LogSignalDispatch(ASignal signal)
 {
     if (OnSignalDispatch != null)
     {
         OnSignalDispatch(signal);
     }
 }
コード例 #3
0
ファイル: SignalLog.cs プロジェクト: supyrb/signals
        private void OnSignalDispatch(ASignal signal)
        {
            var signalLogItem = new SignalLogItem(signal);

            log.Add(signalLogItem);
            lastDispatch[signalLogItem.SignalType] = signalLogItem;

            if (OnNewSignalLog != null)
            {
                OnNewSignalLog(signalLogItem);
            }
        }
コード例 #4
0
ファイル: SignalsTreeViewItem.cs プロジェクト: supyrb/signals
        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();
        }
コード例 #5
0
ファイル: SignalsTreeViewItem.cs プロジェクト: supyrb/signals
 public void Reset()
 {
     instance = null;
     logViewDrawer.Reset();
 }