// Use this for initialization
 void Start()
 {
     copyGC = gridObject.GetComponent<GridController>();
     copyVS = vertexSpawnerObject.GetComponent<VertexSpawner>();
     copySC = selectorControllerObject.GetComponent<SelectorController>();
     copyGG = cameraObject.GetComponent<GloblGUI>();
     copyEC = cameraObject.GetComponent<ExportController>();
 }
 // Use this for initialization
 void Start()
 {
     segmentsCount = GlobalParameters.curveSteps;
     copuVS = GameObject.Find("VerticesSpawner").GetComponent<VertexSpawner>();
 }
 // Use this for initialization
 void Start()
 {
     copyVS = vertexSpawnerObject.GetComponent<VertexSpawner>();
 }
    // Use this for initialization
    void Start()
    {
        DefaultColors();

        copyVS = GameObject.Find("VerticesSpawner").GetComponent<VertexSpawner>();
        copySC = GameObject.Find("Selector").GetComponent<SelectorController>();

        copyGG.WriteGizmoOnGUI(gameObject);

        copyGG.SayCurrentTransform(transform);
    }
    // Use this for initialization
    void Start()
    {
        copyVS = vertexSpawnerObject.GetComponent<VertexSpawner>();
        copyCC = cameraObject.GetComponent<CameraController>();
        selectorMode = 0;

        copyGG = mainCameraObject.GetComponent<GloblGUI>();
    }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        LoadPrefs();
        isGridButton = true;
        isSelectButton = true;
        isMoveButton = false;
        isRotateButton = false;
        isBridgeButton = false;
        paramsButtonZone = new Rect(padding, padding, squareSize, squareSize);
        showGridButton = new Rect(padding, squareSize + 2*padding, squareSize, squareSize);
        newVertexRect = new Rect(padding, 2*(squareSize + padding) + padding, squareSize, squareSize);
        selectButtonZone = new Rect(padding, 3 * (squareSize + padding) + padding, squareSize, squareSize);
        moveButtonZone = new Rect(padding, 4 * (squareSize + padding) + padding, squareSize, squareSize);
        rotateButtonZone = new Rect(padding, 5 * (squareSize + padding) + padding, squareSize, squareSize);
        bridgeButtonZone = new Rect(padding, 6 * (squareSize + padding) + padding, squareSize, squareSize);
        clearButtonZone = new Rect(padding, 7 * (squareSize + padding) + padding, squareSize, squareSize);
        exportButtonZone = new Rect(padding, 8 * (squareSize + padding) + padding, squareSize, squareSize);

        moveMenusZone = new Rect(Screen.width - 3*padding - valueLength - contentLength, padding, 2*padding + valueLength + contentLength, titleHeight + 4*padding + 3*valueHeight);
        rotateMenusZone = new Rect(Screen.width - 3 * padding - valueLength - contentLength, padding, 2 * padding + valueLength + contentLength, titleHeight + 4 * padding + 3 * valueHeight);
        moveRotateTitleZone = new Rect(0, 0, moveMenusZone.width, titleHeight);//relative
        moveRotateContentZone = new Rect(padding, padding + moveRotateTitleZone.height, moveMenusZone.width - 2*padding, 2*padding + 3*valueHeight);

        StatusLineZone = new Rect(0, Screen.height - statusHeight, Screen.width, statusHeight);

        allScreenZone = new Rect(0, 0, Screen.width, Screen.height);
        paramsWindowZone = new Rect((Screen.width - paramsWindowWidth)/2, (Screen.height - paramsWindowHeight)/2, paramsWindowWidth, paramsWindowHeight);
        //closeParamsWindowButtonZone = new Rect(paramsWindowZone.xMax - closeButtonSize / 2, paramsWindowZone.yMin - closeButtonSize / 2, closeButtonSize, closeButtonSize);
        closeParamsWindowButtonZone = new Rect(paramsWindowZone.xMax, paramsWindowZone.yMin - closeButtonSize, closeButtonSize, closeButtonSize);
        toolbarZone = new Rect(0, 0, paramsWindowZone.width, toolbarHeight);//relative
        //settingsContentZone = new Rect(padding, padding + toolbarHeight, paramsWindowZone.width - 2*padding, paramsWindowZone.height - 2 * padding - toolbarHeight);//relative
        settingsContentZoneCentered = new Rect((paramsWindowZone.width - (float)centerZoneWidth) / 2, padding + toolbarHeight,centerZoneWidth, paramsWindowZone.height - 2 * padding - toolbarHeight);

        copyGC = gridObject.GetComponent<GridController>();
        copyVS = vertexSpawnerObject.GetComponent<VertexSpawner>();
        copySC = selectorObject.GetComponent<SelectorController>();
        copyEC = gameObject.GetComponent<ExportController>();

        paramsContentC = new GUIContent(paramsImgC);
        paramsContentG = new GUIContent(paramsImgG);
        xContentG = new GUIContent(xImgG);
        xContentC = new GUIContent(xImgC);
        gridContentC = new GUIContent(gridImgC);
        gridContentG = new GUIContent(gridImgG);
        selectContentC = new GUIContent(selectImgC);
        selectContentG = new GUIContent(selectImgG);
        moveContentC = new GUIContent(moveImgC);
        moveContentG = new GUIContent(moveImgG);
        rotateContentC = new GUIContent(rotateImgC);
        rotateContentG = new GUIContent(rotateImgG);
        bridgeContentC = new GUIContent(bridgeImgC);
        bridgeContentG = new GUIContent(bridgeImgG);
        vertexContentC = new GUIContent(vertexImgC);
        vertexContentG = new GUIContent(vertexImgG);
        clearContentC = new GUIContent(clearImgC);
        clearContentG = new GUIContent(clearImgG);
        exportContentC = new GUIContent(exportImgC);
        exportContentG = new GUIContent(exportImgG);

        keyString = FormKeyString();

        paramsCameraSpeed = GlobalParameters.cameraSpeed / 8.0f;
        paramsMoveStep = GlobalParameters.moveStep;
        paramsRotateStep = GlobalParameters.rotateStep;
        paramsGridSize = GlobalParameters.gridSize;
        copyGC.SetSize(paramsGridSize);
        paramCurveStep = GlobalParameters.curveSteps;
        paramUseImgEffect = GlobalParameters.useImgEffect;
        paramLightining = GlobalParameters.lightining;
        paramBloomIntensity = GlobalParameters.bloomIntensity;
        paramUseAntialiasing = GlobalParameters.useAntialiasing;
        paramUseSSAO = GlobalParameters.useSSAO;

        gameObject.GetComponent<CameraController>().LoadParameters();
        copyVS.UpdateBridgeCurveSteps();
    }