public void OnBeginTimerCommand(BeginTimerCommand command) { if (insideLoop) { loopCommands.Add(command); return; } // Already timer running if (stopwatch != null) { Console.WriteLine( "[{0}] Timer already running", DateTime.Now.ToString("HH:mm:ss")); } else { Console.WriteLine( "[{0}] Timer started", DateTime.Now.ToString("HH:mm:ss")); stopwatch = Stopwatch.StartNew(); } }
private void Awake() { BeginTimerCommand = GetComponent <BeginTimerCommand>(); }