示例#1
0
        /// <summary>
        /// Clears the timeline of pre-calculated frames and starts at the
        /// new provided state.
        /// </summary>
        /// <param name="state">The start position, frame 0</param>
        public void Restart(Rider state, float zoom)
        {
            using (_framesync.AcquireWrite())
            {
                _hittest.Reset();
                _frames.Clear();
                _frames.Add(new frameinfo()
                {
                    Rider     = state,
                    Zoom      = zoom,
                    BGColor   = new Color4((byte)_track.BGColorR, (byte)_track.BGColorG, (byte)_track.BGColorB, (byte)255),
                    LineColor = Color.FromArgb(255, _track.LineColorR, _track.LineColorG, _track.LineColorB),
                });
                //Also reset the trigger colors
                Constants.TriggerBGColor               = new Color4((byte)_track.BGColorR, (byte)_track.BGColorG, (byte)_track.BGColorB, (byte)255);
                Constants.StaticTriggerBGColor         = new Color4((byte)_track.BGColorR, (byte)_track.BGColorG, (byte)_track.BGColorB, (byte)255);
                Constants.TriggerLineColorChange       = Color.FromArgb(255, _track.LineColorR, _track.LineColorG, _track.LineColorB);
                Constants.StaticTriggerLineColorChange = Color.FromArgb(255, _track.LineColorR, _track.LineColorG, _track.LineColorB);
                //Set Gravity
                RiderConstants.Gravity = new Vector2d(0.175 * _track.XGravity, 0.175 * _track.YGravity); //gravity
                //Set Gravity well size
                StandardLine.Zone = _track.GravityWellSize;

                using (changesync.AcquireWrite())
                {
                    _first_invalid_frame = _frames.Count;
                }
            }
        }
示例#2
0
 public void Clear()
 {
     _vertcount = 0;
     _indices.Clear();
     _freeverts.Clear();
     _lookup.Clear();
 }
示例#3
0
 public void Reset()
 {
     foreach (var v in _allcollisions)
     {
         _renderer_changelist.Add(v);
     }
     _unique_frame_collisions.Clear();
     _unique_frame_collisions.Add(new HashSet <int>());
     _line_framehit.Clear();
     _allcollisions.Clear();
     _currentframe = Disabled;
 }
示例#4
0
 /// <summary>
 /// Clears the timeline of pre-calculated frames and starts at the
 /// new provided state.
 /// </summary>
 /// <param name="state">The start position, frame 0</param>
 public void Restart(Rider state)
 {
     using (_framesync.AcquireWrite())
     {
         _hittest.Reset();
         _frames.Clear();
         _frames.Add(state);
         using (changesync.AcquireWrite())
         {
             _first_invalid_frame = _frames.Count;
         }
     }
 }
示例#5
0
 /// <summary>
 /// Clears the timeline of pre-calculated frames and starts at the
 /// new provided state.
 /// </summary>
 /// <param name="state">The start position, frame 0</param>
 public void Restart(Rider state, float zoom)
 {
     using (_framesync.AcquireWrite())
     {
         _hittest.Reset();
         _frames.Clear();
         _frames.Add(new frameinfo()
         {
             Rider = state, TriggerHitFrame = -1, TriggerLineID = -1, Zoom = zoom
         });
         using (changesync.AcquireWrite())
         {
             _first_invalid_frame = _frames.Count;
         }
     }
 }
示例#6
0
 public void Clear()
 {
     Array.Clear();
 }
示例#7
0
 public void Clear()
 {
     _vertexcount = 0;
     _indices.Clear();
     freevertices.Clear();
 }