Recent Posts
PHP | 27 sec ago
None | 33 sec ago
None | 35 sec ago
None | 39 sec ago
None | 47 sec ago
None | 55 sec ago
None | 1 min ago
None | 1 min ago
mIRC | 1 min ago
Java | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Shawn on the 19th of Apr 2008 06:22:06 PM Download | Raw | Embed | Report
  1. using System.Collections.Generic;
  2. using Microsoft.Xna.Framework;
  3. using Microsoft.Xna.Framework.Graphics;
  4.  
  5. namespace SimonXNA
  6. {
  7.     class PlayBoard
  8.     {
  9.         List<Rectangle> ColoredRectangles;
  10.         List<Color> ColorList;
  11.  
  12.         public void Initialize()
  13.         {
  14.             ColoredRectangles = new List<Rectangle>();
  15.             ColorList = new List<Color>();
  16.             ColoredRectangles.Add(new Rectangle(300, 200, 100, 100));
  17.             ColoredRectangles.Add(new Rectangle(401, 200, 100, 100));
  18.             ColoredRectangles.Add(new Rectangle(300, 301, 100, 100));
  19.             ColoredRectangles.Add(new Rectangle(401, 301, 100, 100));
  20.             ColorList.Add(new Color(0, 0, 150));
  21.             ColorList.Add(new Color(0, 150, 0));
  22.             ColorList.Add(new Color(150, 0, 0));
  23.             ColorList.Add(new Color(150, 150, 0));
  24.         }
  25.  
  26.         public void Update()
  27.         {
  28.         }
  29.  
  30.         public void Draw(SpriteBatch sb, Texture2D squares)
  31.         {
  32.             int colorIndex = 0;
  33.             foreach (Rectangle r in ColoredRectangles)
  34.             {
  35.                 sb.Draw(squares, r, ColorList[colorIndex]);
  36.                 colorIndex++;
  37.             }
  38.         }
  39.     }
  40. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: