コード例 #1
0
        public void InitGraph(SessionData _sessionData, ValueDisplayer _valueDisplayer, int _subGraphID, DataType _dataType)
        {
            sessionData         = _sessionData;
            valueDisplayer      = _valueDisplayer;
            subGraphID          = _subGraphID;
            data                = sessionData.sessionVariables.timeseries[_dataType];
            graphRenderer.color = sessionData.sessionColor;

            dataType = _dataType;
            minValue = _dataType == DataType.EOM ? 0f : data.value.Min();
            maxValue = _dataType == DataType.EOM ? 1f : data.value.Max();

            // Flag this datatype as shown
            sessionData.dataTypes[_dataType] = true;

            RefreshGraphAsync();
        }
コード例 #2
0
        public void InitEntry(GameObject _leftBlock, GameObject _rightBlock, EntryTypes _entryType, int _ID)
        {
            entryType = _entryType;

            leftBlock         = _leftBlock;
            leftRectTransform = leftBlock.GetComponent <RectTransform>();

            valueDisplayer = leftBlock.GetComponent <ValueDisplayer>();
            leftBlock.GetComponent <ValueDisplayer>().Init(this); // to estatblish a link back to here

            rightBlock         = _rightBlock;
            rightRectTransform = rightBlock.GetComponent <RectTransform>();

            startHeight = rightRectTransform.rect.height;

            ID = _ID;
            Debug.Log("InitEntry index:" + _ID);
        }