Example #1
0
 void Start()
 {
     inkScriptRef = inkHolder.GetComponent <InkProcessor>();
     if (isRunningWorldScript)
     {
         gameObject.GetComponent <InkProcessor>().isCommandSlave = true;
         gameObject.GetComponent <InkProcessor>().StartStory(inkJSONAsset.text, "WorldScript");
     }
 }
Example #2
0
        public void TestProccessor()
        {
            var filePath       = PathExtensions.GetApplicationFullPath(@"TestData\hello.ink.json");
            var importer       = new InkImporter();
            var importerResult = importer.Import(filePath, null);

            var processor = new InkProcessor();
            var result    = processor.Process(importerResult, null);

            Debug.WriteLine(result);
        }
Example #3
0
        private void InkAnalyzer_ResultsUpdated(object sender, ResultsUpdatedEventArgs e)
        {
            running = false;

            InkUtils.MergeParagraphs(inkAnalyzer);

            if (processor < inkProcessors.Count)
            {
                InkProcessor proc = inkProcessors[processor];
                proc.process(inkAnalyzer);
                processor++;
                fireoff();
                return;
            }

            if (adds.Count > 0 || removes.Count > 0)
            {
                //Flush adds and removes
                while (adds.Count > 0)
                {
                    Stroke stroke = adds.Dequeue();
                    inkAnalyzer.AddStroke(stroke);
                }
                while (removes.Count > 0)
                {
                    Stroke stroke = removes.Dequeue();
                    inkAnalyzer.RemoveStroke(stroke);
                }
                fireoff();
                return;
            }

            if (PipelineComplete != null)
            {
                PipelineComplete(this, new EventArgs());
            }

            processor  = 0;
            processing = false;

            if (queued)
            {
                queued     = false;
                processor  = 0;
                processing = true;
                fireoff();
            }
        }
Example #4
0
 public void AddProcessor(InkProcessor processor)
 {
     inkProcessors.Add(processor);
 }
Example #5
0
 public WaitForUpdateInterruptable(InkProcessor caller)
 {
     commandCaller = caller;
 }
Example #6
0
 public WaitForSecondsInterruptable(float cd, InkProcessor caller)
 {
     waitCountDown = cd;
     commandCaller = caller;
 }
Example #7
0
 public void AddProcessor(InkProcessor processor)
 {
     inkProcessors.Add(processor);
 }