Skip to content

Instantly share code, notes, and snippets.

@pielegacy
Created August 1, 2016 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pielegacy/47f4861e467ccde69003e88e19bfe365 to your computer and use it in GitHub Desktop.
Save pielegacy/47f4861e467ccde69003e88e19bfe365 to your computer and use it in GitHub Desktop.
using SwinGameSDK;
namespace MyGame
{
// Just a few functions to help work with Swingame easily
// Created by Alex Billson
class SwinGameHelpers
{
public Vector newVect(float x, float y)
{
Vector temp_vect = new Vector();
temp_vect.X = x;
temp_vect.Y = y;
return temp_vect;
}
public Rectangle newRect(Vector loc, Vector dim)
{
Rectangle temp_rect = new Rectangle();
temp_rect.X = loc.X;
temp_rect.Y = loc.Y;
temp_rect.Width = dim.X;
temp_rect.Height = dim.Y;
return temp_rect;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment