Esempio n. 1
0
        void Awake()
        {
            seriesSets      = new List <SeriesSet> ();
            csvList         = new List <CSVObject> ();
            convergeManager = null;

            title  = "Progress Report: Average Biomass Difference from Target";
            xTitle = "Attempt #";
            yTitle = "Biomass Difference";

            left = (Screen.width - width) / 2;
            top  = 100;

            windowRect = new Rect(left, top, width, height);
            graphRect  = new Rect(20, 30, 650, 325);
            sliderRect = new Rect(
                graphRect.x + (graphRect.width / 2) - 100,
                graphRect.x + graphRect.height + 20,
                200,
                30
                );

            hStart = new Vector2(85, graphRect.height - 75);
            hEnd   = new Vector2(graphRect.width - 50, hStart.y);

            xAxisLength   = Vector2.Distance(hStart, hEnd) * 0.95f;
            xUnitLength   = xAxisLength / xNumMarkers;
            interBarWidth = (xAxisLength - (barWidth * perPage)) / perPage;

            vStart = new Vector2(hStart.x, hStart.y);
            vEnd   = new Vector2(vStart.x, 30);

            yAxisLength = Vector2.Distance(vStart, vEnd) * 0.95f;
            yUnitLength = yAxisLength / yNumMarkers;

            lineMarkerTex = Resources.Load <Texture2D> ("chart_dot");

            barTexture = Functions.CreateTexture2D(Color.white);

            barLegend = new BarLegend(new Rect(width - 200 - 20, 30, 200, 325), this);

            //gameObject.AddComponent<GraphInput>().graph = this;  jtc-commented out
        }
Esempio n. 2
0
        void Awake()
        {
            seriesSets = new List<SeriesSet> ();
            csvList = new List<CSVObject> ();
            convergeManager = null;

            title = "Progress Report: Average Biomass Difference from Target";
            xTitle = "Attempt #";
            yTitle = "Biomass Difference";

            left = (Screen.width - width) / 2;
            top = 100;

            windowRect = new Rect (left, top, width, height);
            graphRect = new Rect (20, 30, 650, 325);
            sliderRect = new Rect (
            graphRect.x + (graphRect.width / 2) - 100,
            graphRect.x + graphRect.height + 20,
            200,
            30
            );

            hStart = new Vector2 (85, graphRect.height - 75);
            hEnd = new Vector2 (graphRect.width - 50, hStart.y);

            xAxisLength = Vector2.Distance (hStart, hEnd) * 0.95f;
            xUnitLength = xAxisLength / xNumMarkers;
            interBarWidth = (xAxisLength - (barWidth * perPage)) / perPage;

            vStart = new Vector2 (hStart.x, hStart.y);
            vEnd = new Vector2 (vStart.x, 30);

            yAxisLength = Vector2.Distance (vStart, vEnd) * 0.95f;
            yUnitLength = yAxisLength / yNumMarkers;

            lineMarkerTex = Resources.Load<Texture2D> ("chart_dot");

            barTexture = Functions.CreateTexture2D (Color.white);

            barLegend = new BarLegend(new Rect(width - 200 - 20, 30, 200, 325), this);

            //gameObject.AddComponent<GraphInput>().graph = this;  jtc-commented out
        }