Ejemplo n.º 1
0
        /// <summary>
        /// Find ALL the GUI stuff needed for the sensor GUI to work
        /// </summary>
        private void FindElements()
        {
            tabStateMachine = Auxiliary.FindGameObject("Tabs").GetComponent <StateMachine>();

            canvas        = GameObject.Find("Canvas");
            sensorManager = GameObject.Find("SensorManager").GetComponent <SensorManager>();
            dynamicCamera = GameObject.Find("Main Camera").GetComponent <DynamicCamera>();
            toolkit       = GetComponent <Toolkit>();

            //For Sensor position and attachment configuration
            configureSensorPanel = Auxiliary.FindObject(canvas, "SensorConfigurationPanel");
            sensorConfigHeader   = Auxiliary.FindObject(configureSensorPanel, "SensorConfigHeader");

            //For Sensor angle configuration
            sensorAnglePanel = Auxiliary.FindObject(canvas, "SensorAnglePanel");
            xAngleEntry      = Auxiliary.FindObject(sensorAnglePanel, "xAngleEntry");
            yAngleEntry      = Auxiliary.FindObject(sensorAnglePanel, "yAngleEntry");
            zAngleEntry      = Auxiliary.FindObject(sensorAnglePanel, "zAngleEntry");

            //For range configuration
            sensorRangePanel = Auxiliary.FindObject(canvas, "RangePanel");
            RangeEntry       = Auxiliary.FindObject(sensorRangePanel, "RangeEntry");

            sensorOutputPanel = Auxiliary.FindObject(canvas, "SensorOutputBorder");
            robotCameraGUI    = GetComponent <RobotCameraGUI>();
        }