Advertisement
allerost

part one

Oct 7th, 2015
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. using System.Text;
  2. using System.Threading.Tasks;
  3. using System.Threading;
  4.  
  5. namespace Mini_RPG
  6. {
  7. class Program
  8. {
  9. public static int health = 100;
  10. public static int level = 3;
  11. public static float money = 1337;
  12. public static int mana = 50;
  13. public static float exp = 24;
  14. public static
  15.  
  16. static void Main(string[] args)
  17. {
  18. while (true)
  19. {
  20. Console.WriteLine("Choose the following: ");
  21. Console.WriteLine("Press : S for start, C for commands, D for devs & Q for quit!");
  22. Console.WriteLine("=[S]tart Game=");
  23. Console.WriteLine("=[C]ommands=");
  24. Console.WriteLine("=[D]evelopers=");
  25. Console.WriteLine("=[Q]uit=");
  26.  
  27. string menuSelection = Console.ReadLine();
  28.  
  29. if (menuSelection == "S" || menuSelection == "s")
  30. {
  31. Console.Clear();
  32. Console.WriteLine("===Welcome!====");
  33. Console.WriteLine("This is RPG 1.0!");
  34. HUD.TextBar();
  35. HudBar();
  36. Thread.Sleep(4000);
  37. Console.Clear();
  38. HudBar();
  39. Thread.Sleep(4500);
  40. Console.WriteLine("The game is fully text based. You are given three options!");
  41. Console.WriteLine("Going right , Going left & Going forward!");
  42. //All game code here.
  43. }
  44. else if (menuSelection == "C" || menuSelection == "c")
  45. {
  46. //All commands for the game here!
  47. }
  48. else if (menuSelection == "D" || menuSelection == "d")
  49. {
  50. //Add topkek info about us here.
  51. DevInfo();
  52. }
  53. else if (menuSelection == "Q" || menuSelection == "q")
  54. {
  55. break;
  56. }
  57. }
  58. }
  59. public static void HudBar()
  60. {
  61. HUD.TextBar();
  62. Console.SetCursorPosition(0, 20);
  63. Console.Write("Health : {0}", health);
  64. Console.SetCursorPosition(0, 21);
  65. Console.WriteLine("Level : {0}", level);
  66. Console.SetCursorPosition(0, 22);
  67. Console.WriteLine("Money : {0}", money);
  68. Console.SetCursorPosition(0, 23);
  69. Console.WriteLine("Mana : {0}", mana);
  70. Console.SetCursorPosition(13, 21);
  71. Console.WriteLine("Exp until lvl up : {0}%", exp);
  72. Console.SetCursorPosition(24, 24);
  73. Console.WriteLine("Press i for inv!");
  74. Console.SetCursorPosition(0, 0);
  75. }
  76. public static void DevInfo()
  77. {
  78. Console.ForegroundColor = ConsoleColor.Yellow;
  79. Console.WriteLine("This is all the information about the dev team!");
  80. Console.ForegroundColor = ConsoleColor.White;
  81. Console.WriteLine("This game was developted by Jakob , Jakob & Alexander of LBS Helsingborg!");
  82. Console.ForegroundColor = ConsoleColor.Green;
  83. Console.WriteLine("Total prodject budget was and estimated : $0 !");
  84. Console.ForegroundColor = ConsoleColor.White;
  85. Console.WriteLine("All code was done in C# and programmed by us.");
  86. Console.WriteLine("");
  87. Thread.Sleep(17000);
  88. Console.Clear();
  89. }
  90. }
  91. }
  92.  
  93.  
  94. using System;
  95. using System.Collections.Generic;
  96. using System.Linq;
  97. using System.Text;
  98. using System.Threading.Tasks;
  99.  
  100. namespace Mini_RPG
  101. {
  102. public class HUD
  103. {
  104. public static int x = 0;
  105. public static int y = 20;
  106.  
  107. public static void TextBar()
  108. {
  109. for (int x = 0; x < 41; x++)
  110. {
  111. Console.SetCursorPosition(x, 19);
  112. Console.Write("▬");
  113. }
  114. for (y = 20; y < 25; y++)
  115. {
  116. Console.SetCursorPosition(40, y);
  117. Console.Write("█");
  118. }
  119. }
  120. }
  121. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement