Esempio n. 1
0
    public void processScrollDynamicInfo(Scroll.ScrollDynamicInfo scrollDynamicInfo)
    {
        if (scrollDynamicInfo.completions.Count != 0)
        {
            LatestCompletions = scrollDynamicInfo.completions[0];
        }
        else
        {
            LatestCompletions = new List <Scroll.ScrollAssignment>();
        }

        LatestRenderedHints = new List <Fact>();

        List <string> hintUris = new List <string>();

        foreach (Scroll.ScrollAssignment currentCompletion in LatestCompletions)
        {
            hintUris.Add(currentCompletion.fact.uri);
        }

        //Update Scroll, process data for later hints and update Uri-List for which hints are available
        hintUris = processRenderedScroll(scrollDynamicInfo.rendered, hintUris);

        if (this.automaticHintGenerationActive)
        {
            //Show that Hint is available for ScrollParameter
            HintAvailableEvent.Invoke(hintUris);
        }
    }
Esempio n. 2
0
    IEnumerator newAssignment()
    {
        //Non blocking wait till sendView() is finished
        yield return(sendView("/scroll/dynamic"));

        if (currentMmtAnswer == null)
        {
            Debug.Log("DAS HAT NICHT GEKLAPPT");
        }
        else
        {
            Scroll.ScrollDynamicInfo scrollDynamicInfo = JsonConvert.DeserializeObject <Scroll.ScrollDynamicInfo>(currentMmtAnswer);
            processScrollDynamicInfo(scrollDynamicInfo);
        }
    }