Hi,
I just want to move the stars from up to down.
This is my method.
If I put breakpoint on speed I see a number of speed. But the stars doesnt move.
[code]
public void StarsSpeed(Rectangle boundaries)
{
Point randomPointh;
Star newStar;
int randomX = random.Next(boundaries.Left,boundaries.Width);
int randomY = random.Next(boundaries.Top,boundaries.Height);
randomPointh = new Point(randomX, randomY);
int starsSpeed = 10;
int height = boundaries.Height;
int starsNumbersSpeed = starList.Count;
for (int i = 0; i < starList.Count; i++)
{
var star = starList.Count;
//Star star = RandomStar(boundaries);
speed = (float)random.NextDouble() * 10 + 2;
//starList.Add(star);
if ((randomPointh.Y += (int)speed) > height)
{
//Move(Direction.Down); //(float)random.NextDouble() * 10 + 2;
//Location.Y += GameConstants.speedStar;
// speed = GameConstants.speedStar;
//speed += GameConstants.speedStar;
Move(Direction.Down);
int colorIndex = random.Next(ColorsOfStar.Length);
Pen pen = ColorsOfStar[colorIndex];
newStar = new Star(randomPointh, pen);
//starList.Add(star);
}
}
}//End method
[/code]
THX
Loading

FroglegRank #1,020 · 1.9K reputationPosted Apr 22, 2011, 11:18 PM EDT
FroglegRank #1,020 · 1.9K reputationPosted Apr 20, 2011, 1:14 AM EDT
CrishRank #1,487 · 1.1K reputationPosted Apr 20, 2011, 2:31 AM EDT
http://www.cardschat.com/f57/when-move-up-down-limits-124119/
Suthish NairRank #92 · 22.8K reputationPosted Apr 20, 2011, 12:19 PM EDT