void Start() { inkScriptRef = inkHolder.GetComponent <InkProcessor>(); if (isRunningWorldScript) { gameObject.GetComponent <InkProcessor>().isCommandSlave = true; gameObject.GetComponent <InkProcessor>().StartStory(inkJSONAsset.text, "WorldScript"); } }
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); }
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(); } }
public void AddProcessor(InkProcessor processor) { inkProcessors.Add(processor); }
public WaitForUpdateInterruptable(InkProcessor caller) { commandCaller = caller; }
public WaitForSecondsInterruptable(float cd, InkProcessor caller) { waitCountDown = cd; commandCaller = caller; }