コード例 #1
0
        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();
            }
        }
コード例 #2
0
ファイル: BeginTimerTrigger.cs プロジェクト: tyasw/MazeEscape
 private void Awake()
 {
     BeginTimerCommand = GetComponent <BeginTimerCommand>();
 }