void Start() { //graphGO = GameObject.Instantiate(emptyGraphPrefab); //graphGO.transform.SetParent(this.transform, false); //graphGO.SetActive(graph_enabled); graph = graphGO.GetComponent <WMG_Axis_Graph>(); series1 = graph.addSeries(); series2 = graph.addSeries(); series2.pointColor = new Color(0, 230, 0); series2.lineColor = new Color(0, 230, 0); series2.enabled = rec_enabled; graph.xAxis.AxisMinValue = 20; graph.xAxis.AxisMaxValue = 0; graph.autoUpdateOrigin = false; graph.theOrigin = new Vector2(0f, 0f); graph.xAxis.AxisTitleString = "Time"; graph.xAxis.hideLabels = true; graph.autoShrinkAtPercent = 0f; graph.autoAnimationsEnabled = false; coroutine_time = 0.15f;//otherScript.coroutine_wait; otherScript = CubeObject.GetComponent <ChangeColor>(); rec_behavior = RecElectrode.GetComponent <ElectrodeBehavior>(); data = new List <Vector2>(); data2 = new List <Vector2>(); dataStore = new List <Vector2>(); data2Store = new List <Vector2>(); cur_pos = graphGO.GetComponent <Transform>().localPosition; //series1.enabled = graph_enabled; //graphGO.SetActive(graph_enabled); //ToggleGraph(); StartCoroutine(DisableGraph()); //series1.pointValues //graph.xAxis.AxisMaxValue = x; }
private Vector3 vec_oldPos = new Vector3(3.7f, 119.6f, -147.5f); //position Vector at x=30; // Use this for initialization void Start() { //get scripts from GameObjects graph_script = gui_canvas.GetComponent <WMGTest>(); rec_script = rec_electrode.GetComponent <ElectrodeBehavior>(); color_script = color_cube.GetComponent <ChangeColor>(); audio_script = audio_obj.GetComponent <FrequencyChange>(); color_script.bandMat_high = bandMat_high; //calculate voltage color_script.time_scale = time_scale; //init graph graph_script.num_points = num_points; graph_script.band_width = band_width; graph_script.pointBuffer = pointBuffer; //graph_script.SetGraph(graph_enabled); //graph_script.set_recEnabled(rec_enabled); }