示例#1
0
 public void Reset()
 {
     for (int i = 0; i < _markers.Count; i++)
     {
         RTPMarker rTPMarker = _markers[i];
         rTPMarker._keyOff = false;
     }
 }
示例#2
0
 public void KeyOffMarker()
 {
     if (_keyOffMarker != null)
     {
         _keyOffMarker._keyOff = true;
         _keyOffMarker         = null;
     }
 }
示例#3
0
        public void SetValueFromMarker(string label)
        {
            RTPMarker marker = _markers.GetMarker(label);

            if (marker != null)
            {
                SetValue(marker._value);
            }
        }
示例#4
0
        public bool RemoveMarker(string label)
        {
            RTPMarker marker = GetMarker(label);

            if (marker != null)
            {
                _markers.Remove(marker);
                return(true);
            }
            return(false);
        }
示例#5
0
 public bool Update(float value, float direction)
 {
     for (int i = 0; i < _markers.Count; i++)
     {
         RTPMarker rTPMarker = _markers[i];
         if (rTPMarker._keyOffEnabled)
         {
             if (direction >= 0f && value >= rTPMarker._value && !rTPMarker._keyOff)
             {
                 _keyOffMarker = rTPMarker;
                 return(true);
             }
             if (direction < 0f && value <= rTPMarker._value && !rTPMarker._keyOff)
             {
                 _keyOffMarker = rTPMarker;
                 return(true);
             }
         }
     }
     return(false);
 }
示例#6
0
        public EventStatus SetMarker(Event zEvent)
        {
            EventStatus result = EventStatus.Failed_Uknown;

            if (_parameters == null)
            {
                return(result);
            }
            for (int i = 0; i < _parameters.Length; i++)
            {
                RTPParameterToProperty rTPParameterToProperty = _parameters[i];
                string    label  = (string)zEvent._parameter;
                RTPMarker marker = rTPParameterToProperty._parameter._markers.GetMarker(label);
                if (marker != null)
                {
                    rTPParameterToProperty._parameter.SetNormalisedValue(marker._value);
                    result = EventStatus.Handled;
                }
            }
            return(result);
        }
示例#7
0
 public void RemoveMarker(RTPMarker rtpMarker)
 {
     _markers.Remove(rtpMarker);
 }