Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        colorPicker    = GameObject.FindGameObjectWithTag("ColorPicker");
        cUIColorPicker = colorPicker.GetComponent <CUIColorPicker>();

        colorPicker.SetActive(false);
    }
Ejemplo n.º 2
0
    void Start()
    {
        palette = false;
        picker  = this.gameObject.GetComponentInChildren <CUIColorPicker> (true);

//		home = GameObject.Find ("Home Button");
//		infoPanel = GameObject.Find ("Info Pop Up");
//		menu = GameObject.Find("Menu");
        Debug.Log(infoPanel);
        infoDisplayed = false;
        menuDisplayed = false;
        menu.SetActive(menuDisplayed);
        //colour = GameObject.Find ("Colour Palette");

        if (ButtonManager.isPreview)
        {
//			GameObject instructions = GameObject.Find("InstructionsUI");
            instructions.SetActive(false);
            infoPanel.SetActive(false);
        }
        else
        {
//            GameObject colourPicker = GameObject.Find("ColourUI");
            colourPicker.SetActive(false);
//			GameObject colourButton = GameObject.Find("Colour Palette");
            colourButton.SetActive(false);
//			GameObject infoButton = GameObject.Find("Info Button");
            infoButton.SetActive(false);
//			GameObject disjointButton = GameObject.Find("DisjointButton");
            disjointButton.SetActive(false);
//			GameObject undoButton = GameObject.Find("Remove Button");
            undoButton.SetActive(false);
//			GameObject addButton = GameObject.Find("Add Corner Button");
            addButton.SetActive(false);

            onboardingButton.SetActive(false);


//			GameObject recorder = GameObject.Find("Recorder");
            recorder.SetActive(false);
//			GameObject slider = GameObject.Find("Slider");
            slider.SetActive(false);

            infoPanel.SetActive(false);

            onboarding.SetActive(false);
            windows.SetActive(false);
//			GameObject width = GameObject.Find("MeasurementWidth");
//			width.SetActive(false);
//			GameObject height = GameObject.Find("MeasurementHeight");
//			height.SetActive(false);
//			GameObject area = GameObject.Find("MeasurementArea");
//			area.SetActive(false);
//			GameObject paint = GameObject.Find("MeasurementPaint");
//			paint.SetActive(false);
        }
    }
Ejemplo n.º 3
0
    public void DisableColorPicker()
    {
        GameObject button = GameObject.FindGameObjectWithTag(currentColorBeingModified);

        cUIColorPicker = colorPicker.GetComponent <CUIColorPicker>();
        button.GetComponent <Image>().color = cUIColorPicker.Color;

        setAvatarColor(cUIColorPicker.Color);

        colorPicker.SetActive(false);
    }
Ejemplo n.º 4
0
    void Awake()
    {
        cuicp      = this;
        togglePiel = true;
        toggleOjo  = togglePelo = false;
        SetOnValueChangeCallback(cambiarColor);

        GuardarHueInicial();
        //Poner el hue de la piel al color inicial
        CambiarHue(0);
    }
Ejemplo n.º 5
0
    // Start is called before the first frame update
    void Start()
    {
        previewCamCtrlr = FindObjectOfType <CinemachineVirtualCamera>();
        if (previewCamCtrlr == null)
        {
            Debug.Log("Preview Cam Controller not found by " + this.name + "!");
        }

        objectTitle = transform.Find("TitleObj").GetComponent <Text>();
        if (!objectTitle)
        {
            Debug.LogError("Context Menu's 'TitleObj' not found!");
        }
        inptPosX = transform.Find("txtPosX/inptPosX").GetComponent <InputField>();
        if (!inptPosX)
        {
            Debug.LogError("Context Menu's 'inptPosX' not found!");
        }
        inptPosY = transform.Find("txtPosY/inptPosY").GetComponent <InputField>();
        if (!inptPosY)
        {
            Debug.LogError("Context Menu's 'inptPosY' not found!");
        }
        inptPosZ = transform.Find("txtPosZ/inptPosZ").GetComponent <InputField>();
        if (!inptPosZ)
        {
            Debug.LogError("Context Menu's 'inptPosZ' not found!");
        }
        inptMassVal = transform.Find("txtMass/inptMassVal").GetComponent <InputField>();
        if (!inptMassVal)
        {
            Debug.LogError("Context Menu's 'inptMassVal' not found!");
        }
        inptRadiusVal = transform.Find("txtRadius/inptRadiusVal").GetComponent <InputField>();
        if (!inptRadiusVal)
        {
            Debug.LogError("Context Menu's 'inptRadiusVal' not found!");
        }
        inptDensityVal = transform.Find("txtDensity/inptDensityVal").GetComponent <InputField>();
        if (!inptDensityVal)
        {
            Debug.LogError("Context Menu's 'inptDensityVal' not found!");
        }

        canvas        = FindObjectOfType <Canvas>();
        orbitControls = GameObject.FindObjectOfType <OrbitControls>();
        lineRenderer  = GetComponent <LineRenderer>();
        colourPicker  = FindObjectOfType <CUIColorPicker>();

        colourPicker.SetOnValueChangeCallback(SetTrailColour);
    }
Ejemplo n.º 6
0
    public void Start()
    {
        raceDropObj    = GameObject.Find("Select Race Drop");
        flagDropObj    = GameObject.Find("Flag Drop");
        civInputObj    = GameObject.Find("Civilization Input");
        leaderInputObj = GameObject.Find("Leader Input");
        homeInputObj   = GameObject.Find("Homeworld Input");
        colorPickerObj = GameObject.Find("CUIColorPicker");

        raceDrop    = raceDropObj.GetComponent <Dropdown>();
        flagDrop    = flagDropObj.GetComponent <Dropdown>();
        civInput    = civInputObj.GetComponent <InputField>();
        leaderInput = leaderInputObj.GetComponent <InputField>();
        homeInput   = homeInputObj.GetComponent <InputField>();
        colorPicker = colorPickerObj.GetComponent <CUIColorPicker>();

        raceDrop.ClearOptions();
        flagDrop.ClearOptions();

        populate();
    }