コード例 #1
0
ファイル: Timeline.cs プロジェクト: luiseduve/exciteometer
        void Start()
        {
            // Calculate the OneSecondPixel unit on applications resolution in order to show 15mins of data at start
            oneSecondUnit        = (exciteOcanvas.GetComponent <RectTransform>().rect.width - 250) / oneTimeChunk;
            oneSecondUtitMinimum = oneSecondUnit;                // remember this start value

            leftScrollableContent.sizeDelta  = new Vector2(oneTimeChunk * oneSecondUnit, timeLineStartHeight);
            rightScrollableContent.sizeDelta = new Vector2(oneTimeChunk * oneSecondUnit, timeLineStartHeight);

            EOMGraph = EOMRight.GetComponent <LineGraphData>();
            EOMGraph.InitEntry(EOMLeft, EOMRight, EntryTypes.EXCITEOMETER, 0);

            // Draw basic Timeline stuff
            UpdateTimeline();
        }
コード例 #2
0
ファイル: Timeline.cs プロジェクト: luiseduve/exciteometer
        public void AddLineGraph(SessionData _sessionData, DataType _dataType)
        {
            // Instantiate Info and Data prefeb and call their inits with values they need to show
            GameObject graphLeft  = GenerateAndPlace(lineGrapshPrefabLeft, leftContent.transform);
            GameObject graphRight = GenerateAndPlace(lineGrapshPrefabRight, rightContent.transform);

            // Generate a new entry in the list
            LineGraphData newEntry = graphRight.GetComponent <LineGraphData>();

            entryIDcounter++;
            newEntry.InitEntry(graphLeft, graphRight, EntryTypes.LINEGRAPH, entryIDcounter);

            newEntry.AddSubLineGraph(_sessionData, _dataType);
            activeTimeLineEntries.Add(newEntry);

            UpdateScrollableContentHeight();
        }