public static void CalculateScreenBoundries(MovingSprite sprite, Vector2 viewport)
 {
     //left
     if (sprite.currentPOS.X < 0)
     {
         sprite.currentPOS.X = 0;
         sprite.horizontalVelocity = 0;
     }
     //top
     if (sprite.currentPOS.Y < 0)
     {
         sprite.currentPOS.Y = 0;
         sprite.verticalVelocity = 0;
     }
     //right
     if (sprite.currentPOS.X > viewport.X - sprite.getWidth())
     {
         sprite.currentPOS.X = viewport.X - sprite.getWidth();
         sprite.horizontalVelocity = 0;
     }
     //bottom
     if (sprite.currentPOS.Y > viewport.Y)
     {
         sprite.Death();
     }
 }
        public static void ResolvePlatformCollisions(MovingSprite sprite, SortedList<int, Platform> platforms)
        {
            foreach (KeyValuePair<int, Platform> platform in platforms)
            {
                RectangleHelper playerRec = new RectangleHelper(sprite.currentPOS.X, sprite.currentPOS.Y, sprite.getWidth(), sprite.getHeight());
                RectangleHelper platformRec = new RectangleHelper(platform.Value.originalPosition.X, platform.Value.originalPosition.Y, platform.Value.getWidth(), platform.Value.getHeight());

                Vector2 overlap = RectangleHelper.Collide(playerRec, platformRec);

                PushSprite(sprite, overlap);
            }
        }