Advertisement
Tidall

Untitled

Dec 4th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. public static void loadinfo()
  2. {
  3. string progress, city, date, miles, money, health;
  4.  
  5. for(int i = 0; i < Game.GameList.Count; i++)
  6. {
  7. if(Game.EnabledGames[i] != false)
  8. {
  9. progress = ($"Progress: {($"{Game.GameList[i].Progress.ToString()}%")}");
  10. city = ($"Location: {Game.GameList[i].CurrentLocation}");
  11. date = ($"Date: {Game.GameList[i].CurrentDay}");
  12. miles = ($"Miles: {Game.GameList[i].MilesTraveled.ToString()}");
  13. money = ($"Money: {($"${Game.GameList[i].CurrentMoney.ToString()}")}");
  14. health = ($"Health: {Game.GameList[i].CurrentHealth}");
  15.  
  16. string display = String.Format(" {0}@ {1}@ {2}@ {3}@ {4}@ {5}@ {6}@", progress, city, date, miles, money, health);
  17. display = display.Replace("@", Environment.NewLine);
  18.  
  19. switch (i)
  20. {
  21. case 0:
  22. con.game1Desc.Text = display;
  23. break;
  24. case 1:
  25. con.game2Desc.Text = display;
  26. break;
  27. case 2:
  28. con.game3Desc.Text = display;
  29. break;
  30. }
  31. }
  32. else
  33. {
  34. switch (i)
  35. {
  36. case 0:
  37. con.game1Desc.Text = "Game not started";
  38. break;
  39. case 1:
  40. con.game2Desc.Text = "Game not started";
  41. break;
  42. case 2:
  43. con.game3Desc.Text = "Game not started";
  44. break;
  45. }
  46. }
  47.  
  48.  
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement