//>>> _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.IDf56f482f_3ec9_4076_8da5_cf0f71b177f1
{
    public class Class_TimeWhenChanged : 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;
    }
}


