Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Element Start Function Ran");

        if (!isRebuild)
        {
            titleText         = gameObject.transform.GetChild(0).GetComponentInChildren <Text>();
            input             = gameObject.transform.GetChild(1).GetComponentInChildren <InputField>();
            newAction         = true;
            mousePointManager = GameObject.Find("InputManager").GetComponent <MousePointManager>();
            //updateElement();
            titleText.text = "New Step";
        }
    }
Esempio n. 2
0
    public void RebuildElement(int newIndex, Action action)
    {
        titleText         = gameObject.transform.GetChild(0).GetComponentInChildren <Text>();
        input             = gameObject.transform.GetChild(1).GetComponentInChildren <InputField>();
        mousePointManager = GameObject.Find("InputManager").GetComponent <MousePointManager>();
        Debug.Log("Rebuilding Element " + index);

        index     = newIndex;
        waitTime  = action.waitTime;
        destPoint = action.destinationPoint;
        newAction = false;
        isRebuild = true;

        setDestPoint(destPoint);
        transform.SetSiblingIndex(index);
        updateElement();
    }