//Function which sets the toolTip image and text after delayTime seconds, then clears after input predicate is met
    IEnumerator setToolTip(string animation, string newText, float delayTime, InputCompletion predicate)
    {
        yield return new WaitForSeconds(delayTime);

        //Display desired controller image and text
        animator.Play(animation);
        currentText.text = newText;
        StartCoroutine(inputListener(predicate));
    }
 //Coroutine started after a tooltip is displayed. Once the predicate is met, stops and clears tooltip after x seconds.
 IEnumerator inputListener(InputCompletion predicate)
 {
     while (true) {
         if (predicate())
         {
             yield return new WaitForSeconds(.5f);
             clearToolTip();
             yield break;
         }
         else yield return null;
     }
 }
Пример #3
0
        public static void Main(string[] args)
        {
            var application = new CommandLineApplication();
            var project     = application.Option("-p | --project", "プロジェクト定義 (YAML)", CommandOptionType.SingleValue);
            var template    = application.Option("-t | --template", "テンプレート (Excel)", CommandOptionType.SingleValue);
            var output      = application.Option("-o | --output", "出力先 (Excel)", CommandOptionType.SingleValue);

            application.OnExecute(() =>
            {
                var source = GanttSource.Load(project.Value());
                source     = InputCompletion.Complete(source);
                source.BuildGanttChart(template.Value(), output.Value());
                return(0);
            });
            application.Execute(args);
        }