예제 #1
0
    void Update()
    {
        manager = GameObject.Find("Dial").GetComponent <DialogueManager>();

        visible = manager.IsVisible();
        if (visible)
        {
            timer += Time.deltaTime;
        }
        else
        {
            timer -= Time.deltaTime;
        }
        timer = win.cut(timer, 1, 0);


        height = timer * 100;
        if (type == 1)
        {
            height = 720 - height;
        }
        else
        {
            height = height;
        }

        this.GetComponent <RectTransform>().sizeDelta = win.Locate(new Vector2(1280, 100));
        this.GetComponent <RectTransform>().position  = win.LocateVector3(new Vector2(0, height));
    }
예제 #2
0
    public void Decide(string ID)
    {
        int    size_y = 0;
        string act_text;
        string act_next;

        do
        {
            act_text = file.get(ID, (size_y + 1).ToString());
            act_next = file.get(ID, (size_y + 1).ToString() + "-next");

            GameObject element = Instantiate(sample);

            element.active = true;
            element.transform.SetParent(list.transform);

            element.GetComponent <DecideSample>().set((size_y + 1) + "." + act_text, act_next);
            element.GetComponent <RectTransform>().sizeDelta = win.Locate(new Vector2(1280, 100));
            element.GetComponent <RectTransform>().position  = win.LocateVector3(new Vector2(0, (100 * (size_y + 1))));

            size_y++;

            // TO NIŻEJ JEST TYMCZASOWO BO NARAZIE NIE WIEM JAK TO ZROBIĆ INACZEJ XDDDDDD
            act_text = file.get(ID, (size_y + 1).ToString());
        }while(act_text != "");
    }