Jump to content

basic array in XNA

seaturtleftw's Photo
Posted Dec 02 2010 11:35 AM
5446 Views

hey everyone i know this sounds really silly but i'm working on a highscore list and i want it to contain a small list of 10 numbers and players so i've made an array like this:
private int[] highscoreRank;
private string[] playerName;
private int HighestScore;
highscoreRank = new int[9];

i'm using a for loop to draw every item out of the array but i'm clueless on how to decrease the location every call right now it's drawing all 10 items on top of eachother
            for (int i = 0; i < highscoreRank.Length; i++)
            {
                spritebatch.DrawString(_arial, "ranks :" + highscoreRank[i], listLocation, Color.White);
                spritebatch.DrawString(_arial, "player : cindy", new Vector2(350,100), Color.White);
            }

if anyone could just help me out i'd greatly apreciate that.

Tags:
1 Subscribe


0 Replies