Exemple #1
0
 public static void AddBackgroundCollection(BackgroundInformation back)
 {
     if (!backgroundCollection.Contains(back))
     {
         backgroundCollection.Add(back);
     }
 }
Exemple #2
0
 public static void RemoveBackgroundCollection(BackgroundInformation back)
 {
     if (backgroundCollection.Contains(back))
     {
         backgroundCollection.Remove(back);
     }
 }
Exemple #3
0
        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);
        }