//>>> _using
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpDX;
using SharpDX.Direct3D11;
using SharpDX.Windows;
//<<< _using

namespace Framefield.Core.IDac6db43e_2249_48d9_b15d_c03e39e72eb7
{
    public class Class_TimeValueChanged__2_ : OperatorPart.Function
    {
        //>>> _inputids
        private enum InputId
        {
            Value = 0
        }
        //<<< _inputids        

        public override OperatorPartContext Eval(OperatorPartContext context, List<OperatorPart> inputs, int outputIdx)
        {
            //>>> _params
            var Value = inputs[(int)InputId.Value].Eval(context).Value;
            //<<< _params
            
            if (Changed == true && Value != _lastValue)
            {            
                _lastValue = Value;
                _lastChangedTime = context.Time;
                Changed = false;
            }
            context.Value = _lastChangedTime;
            return context;
        }

        float _lastChangedTime = -99999;
        float _lastValue;
    }
}


