Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Text;
- using System.Threading.Tasks;
- using System.Threading;
- namespace Mini_RPG
- {
- class Program
- {
- public static int health = 100;
- public static int level = 3;
- public static float money = 1337;
- public static int mana = 50;
- public static float exp = 24;
- public static
- static void Main(string[] args)
- {
- while (true)
- {
- Console.WriteLine("Choose the following: ");
- Console.WriteLine("Press : S for start, C for commands, D for devs & Q for quit!");
- Console.WriteLine("=[S]tart Game=");
- Console.WriteLine("=[C]ommands=");
- Console.WriteLine("=[D]evelopers=");
- Console.WriteLine("=[Q]uit=");
- string menuSelection = Console.ReadLine();
- if (menuSelection == "S" || menuSelection == "s")
- {
- Console.Clear();
- Console.WriteLine("===Welcome!====");
- Console.WriteLine("This is RPG 1.0!");
- HUD.TextBar();
- HudBar();
- Thread.Sleep(4000);
- Console.Clear();
- HudBar();
- Thread.Sleep(4500);
- Console.WriteLine("The game is fully text based. You are given three options!");
- Console.WriteLine("Going right , Going left & Going forward!");
- //All game code here.
- }
- else if (menuSelection == "C" || menuSelection == "c")
- {
- //All commands for the game here!
- }
- else if (menuSelection == "D" || menuSelection == "d")
- {
- //Add topkek info about us here.
- DevInfo();
- }
- else if (menuSelection == "Q" || menuSelection == "q")
- {
- break;
- }
- }
- }
- public static void HudBar()
- {
- HUD.TextBar();
- Console.SetCursorPosition(0, 20);
- Console.Write("Health : {0}", health);
- Console.SetCursorPosition(0, 21);
- Console.WriteLine("Level : {0}", level);
- Console.SetCursorPosition(0, 22);
- Console.WriteLine("Money : {0}", money);
- Console.SetCursorPosition(0, 23);
- Console.WriteLine("Mana : {0}", mana);
- Console.SetCursorPosition(13, 21);
- Console.WriteLine("Exp until lvl up : {0}%", exp);
- Console.SetCursorPosition(24, 24);
- Console.WriteLine("Press i for inv!");
- Console.SetCursorPosition(0, 0);
- }
- public static void DevInfo()
- {
- Console.ForegroundColor = ConsoleColor.Yellow;
- Console.WriteLine("This is all the information about the dev team!");
- Console.ForegroundColor = ConsoleColor.White;
- Console.WriteLine("This game was developted by Jakob , Jakob & Alexander of LBS Helsingborg!");
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine("Total prodject budget was and estimated : $0 !");
- Console.ForegroundColor = ConsoleColor.White;
- Console.WriteLine("All code was done in C# and programmed by us.");
- Console.WriteLine("");
- Thread.Sleep(17000);
- Console.Clear();
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Mini_RPG
- {
- public class HUD
- {
- public static int x = 0;
- public static int y = 20;
- public static void TextBar()
- {
- for (int x = 0; x < 41; x++)
- {
- Console.SetCursorPosition(x, 19);
- Console.Write("▬");
- }
- for (y = 20; y < 25; y++)
- {
- Console.SetCursorPosition(40, y);
- Console.Write("█");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement