IEnumerator Typepage(PageClass P)
    {
        writespeed  = 0.1f;
        Basetext    = P.ContentTitle;
        Choppedtext = Basetext;
        Outputtext  = "";
        UIManager.uiManager.DialogueTitle.text = Outputtext;
        UIManager.uiManager.Dialoguebox.text   = Outputtext;
        UIManager.uiManager.Action.text        = Outputtext;
        foreach (Transform item in UIManager.uiManager.OptionHolder)
        {
            Destroy(item.gameObject);
        }
        while (Choppedtext.Length > 0)
        {
            Outputtext += NextChar();
            UIManager.uiManager.DialogueTitle.text = Outputtext;
            yield return(new WaitForSeconds(writespeed));
        }
        Basetext    = P.Content;
        Choppedtext = Basetext;
        Outputtext  = "";
        while (Choppedtext.Length > 0)
        {
            Outputtext += NextChar();
            UIManager.uiManager.Dialoguebox.text = Outputtext;
            yield return(new WaitForSeconds(writespeed));
        }
        for (int i = 0; i < P.Options.Count; i++)
        {
            if (EngineScript.engineScript.Archivecheck(P.Options[i]))
            {
                GameObject   Button = Instantiate(Optionprefab);
                buttonscript OC     = Button.GetComponent <buttonscript>();
                OptionClass  OCG    = EngineScript.engineScript.Ocgen(P.Options[i]);
                OC.setup(OCG);
                Button.transform.SetParent(UIManager.uiManager.OptionHolder);
                yield return(new WaitForSeconds(0.5f));
            }
        }
        Basetext    = P.CallToAction;
        Choppedtext = Basetext;
        Outputtext  = "";
        while (Choppedtext.Length > 0)
        {
            Outputtext += NextChar();
            UIManager.uiManager.Action.text = Outputtext;
            yield return(new WaitForSeconds(writespeed));
        }

        updating = false;
    }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     bs     = GameObject.Find("Button_colliders").GetComponent <buttonscript>();
     cs     = GameObject.Find("cup").GetComponent <CupScript>();
     ss     = GameObject.Find("Sink").GetComponent <SinkScript>();
     water  = GameObject.Find("Water");
     coldPS = GameObject.Find("ColdTapPS");
     coldPS.SetActive(false);
     hotPS = GameObject.Find("HotTapPS");
     hotPS.SetActive(false);
     water.SetActive(false);
     pz  = GameObject.Find("Mercury_zone").GetComponent <Planet_zones>();
     pzN = GameObject.Find("Neptune_zone").GetComponent <Planet_zones>();
 }
Example #3
0
 void Start()
 {
     BU = this;
 }