public static void AddBackgroundCollection(BackgroundInformation back) { if (!backgroundCollection.Contains(back)) { backgroundCollection.Add(back); } }
public static void RemoveBackgroundCollection(BackgroundInformation back) { if (backgroundCollection.Contains(back)) { backgroundCollection.Remove(back); } }
public GameArea(int screenPositionX, int screenPositionY, int viewportWidth, int viewportHeight) { GravityDirection.Value = Direction.SOUTH; ScreenPosition = new Vector2(screenPositionX, screenPositionY); ViewportHeight = viewportHeight; ViewportWidth = viewportWidth; ViewportWidthOneHalf = ViewportWidth / 2; ViewportHeightOneHalf = ViewportHeight / 2; TotalWidth = ViewportWidth; TotalHeight = ViewportHeight; Background = new BackgroundInformation(this); ViewportRectangle = new Rectangle(screenPositionX, screenPositionY, ViewportWidth, ViewportHeight); }