public void Draw(SpriteBatch theSpriteBatch)
{
Random rand = new Random();
for(int y = 0; y < map.GetLength(0); y++) {
for(int x = 0; x < map.GetLength(1); x++) {
theSpriteBatch.Draw(tile[rand.Next(0,3)], new Rectangle(x*tileWidth,y*tileHeight,tileWidth,tileHeight),
Color.White);
}
}
}
これを行うと、タイルがちらつき、常に再描画されます。一度だけ描画してランダム効果を得るにはどうすればよいですか?これらのタイルをマウスでクリックして変更する方法はありますか?また、1つのタイルを他のタイルよりも普及させる方法はありますか?