Ejemplo n.º 1
0
    public void setInstance(pipeHandler handler)
    {
        this.active = handler;
        this.titleLeft.GetComponent <Text>().text  = active.getData().from.gameObject.name;
        this.titleRight.GetComponent <Text>().text = active.getData().to.gameObject.name;
        var data = active.getData();

        drainAllLeft.GetComponent <Toggle>().isOn  = data.drainAllLeft;
        drainallRight.GetComponent <Toggle>().isOn = data.drainAllRight;
        drainLeft.GetComponent <Toggle>().isOn     = data.drainLeft;
        drainRight.GetComponent <Toggle>().isOn    = data.drainRight;
    }
Ejemplo n.º 2
0
    public void closePressed()
    {
        this.gameObject.SetActive(false);
        clickDetector.menusOpened--;
        var data = active.getData();

        data.drainAllLeft  = drainAllLeft.GetComponent <Toggle>().isOn;
        data.drainAllRight = drainallRight.GetComponent <Toggle>().isOn;
        data.drainLeft     = drainLeft.GetComponent <Toggle>().isOn;
        data.drainRight    = drainRight.GetComponent <Toggle>().isOn;
    }