Ejemplo n.º 1
0
        public override void Update(Task caller)
        {
            // Must have a target symbol
            if (targetSymbol == null)
            {
                return;
            }

            // Get target clock
            Clock targetClock = ParentQuest.GetClock(targetSymbol);

            if (targetClock == null)
            {
                Debug.LogFormat("start timer was unable to find clock symbol {0}", targetSymbol.Name);
                return;
            }

            // Start or stop clock
            if (isStartTimer)
            {
                targetClock.StartTimer();
            }
            else
            {
                targetClock.StopTimer();
            }

            // Action complete
            SetComplete();
        }