public void Add(HitboxCollision collision)
 {
     if (collision.IsSelfCollision)
     {
         return;
     }
     PlayerCollisions[collision.Destination.PlayerID].Add(collision);
 }
        public void CreateCollisions()
        {
            var hurtboxes = ArrayPool <Hurtbox> .Shared.Rent(256);

            foreach (var hitbox in ActiveHitboxes)
            {
                var hurtboxCount = HitboxUtil.CollisionCheck(hitbox, hurtboxes);
                for (var i = 0; i < hurtboxCount; i++)
                {
                    if (!ActiveHurtboxes.Contains(hurtboxes[i]))
                    {
                        continue;
                    }
                    var collision = new HitboxCollision {
                        Source = hitbox, Destination = hurtboxes[i]
                    };
                    CollisionManager.Add(collision);
                }
            }
            ArrayPool <Hurtbox> .Shared.Return(hurtboxes);
        }
 public void Add(HitboxCollision collision)
 {
     PlayerCollisions[collision.Destination.PlayerID].Add(collision);
 }