Beispiel #1
0
        ///<summary>
        /// Set data set using reference
        ///</summary>
        public void SetValues(ref ChartData1D values)
        {
            if (this.values != null)
            {
                this.values.onDataChangeDelegate -= OnDataChangeDelegate;
            }
            this.values = values;
            this.values.onDataChangeDelegate += OnDataChangeDelegate;

            Dirty = true;
        }
Beispiel #2
0
 ///<summary>
 /// Enable the chart and create test data to give visuals in editor
 ///</summary>
 void OnEnable()
 {
     //only in editor
     if (!Application.isPlaying)
     {
         ChartData1D testValues = new ChartData1D();
         testValues[0] = 10.85f;
         testValues[1] = -90.2f;
         testValues[2] = 35;
         testValues[3] = 40.85f;
         testValues[4] = 60.0f;
         SetValues(ref testValues);
     }
     Dirty = true;
 }
Beispiel #3
0
        ///<summary>
        /// Enable the chart and create test data to give visuals in editor
        ///</summary>
        protected override void OnEnable()
        {
            base.OnEnable();

            //only in editor
            if (!Application.isPlaying)
            {
                ChartData1D testValues = new ChartData1D();
                testValues[0] = 120.85f;
                testValues[1] = -90.2f;
                testValues[2] = 35;
                testValues[3] = 40.85f;
                testValues[4] = 60.0f;
                SetValues(ref testValues);
            }
            Dirty = true;
            OnEnabled(true);
        }