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...
By Shawn on the 19th of Apr 2008 06:22:06 PM
Download |
Raw |
Embed |
Report
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace SimonXNA
{
class PlayBoard
{
List<Rectangle> ColoredRectangles;
List<Color> ColorList;
public void Initialize()
{
ColoredRectangles
= new List
<Rectangle
>();
ColorList
= new List
<Color
>();
ColoredRectangles.
Add(new Rectangle
(300, 200, 100, 100
));
ColoredRectangles.
Add(new Rectangle
(401, 200, 100, 100
));
ColoredRectangles.
Add(new Rectangle
(300, 301, 100, 100
));
ColoredRectangles.
Add(new Rectangle
(401, 301, 100, 100
));
ColorList.
Add(new Color
(0, 0, 150
));
ColorList.
Add(new Color
(0, 150, 0
));
ColorList.
Add(new Color
(150, 0, 0
));
ColorList.
Add(new Color
(150, 150, 0
));
}
public void Update()
{
}
public void Draw(SpriteBatch sb, Texture2D squares)
{
int colorIndex = 0;
foreach (Rectangle r in ColoredRectangles)
{
sb.Draw(squares, r, ColorList[colorIndex]);
colorIndex++;
}
}
}
}
Submit a correction or amendment below.
Make A New Post