public void Simulate(ref MatchState state, MatchInputContext input)
 {
     if (ActiveHitboxes.Count + ActiveHurtboxes.Count > 0)
     {
         Physics.SyncTransforms();
         CreateCollisions();
         for (var i = 0; i < Config.PlayerCount; i++)
         {
             var collisions = CollisionManager.PlayerCollisions[i];
             ApplyCollisions(collisions, ref state[i], state);
         }
     }
     CollisionManager.Clear();
     ActiveHitboxes.Clear();
     ActiveHurtboxes.Clear();
 }
 public MatchState Simulate(MatchState state, MatchInputContext input)
 {
     if (ActiveHitboxes.Count + ActiveHurtboxes.Count > 0)
     {
         Physics.SyncTransforms();
         CreateCollisions();
         for (uint i = 0; i < Config.PlayerCount; i++)
         {
             var playerState = state.GetPlayerState(i);
             var collisions  = CollisionManager.PlayerCollisions[i];
             ApplyCollisions(collisions, ref playerState);
             state.SetPlayerState(i, playerState);
         }
         CollisionManager.Clear();
         ActiveHitboxes.Clear();
         ActiveHurtboxes.Clear();
     }
     return(state);
 }