I've made a menu.cs which starts off the game, asking if they need to know how to play the game or not, when they want to start the game by typing "Start" I need it to run the code that I've placed in World.cs, since I'm keeping all my systems separate (Menu.cs, Items.cs, Entity.cs, Battle.cs and World.cs). Here's the code, but since I'm doing the framework of it, please ignore the lack of story or information for the main menu.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RPG.World;
namespace RPG.Menu
{
public partial class Menu
{
static void Main()
{
Console.Title = "The Game Ver. 0.0.1";
Console.CursorVisible = false;
Console.WindowWidth = Console.LargestWindowWidth;
Console.WindowHeight = Console.LargestWindowHeight;
Console.WriteLine("Welcome traveler to the start of your adventure. To learn the controls type 'help' and press enter or just type 'start' to begin your adventure.");
Boolean check = true;
while (check == true)
{
string Input = Console.ReadLine();
Input = Input.ToLower();
if (Input == "help")
{
check = false;
Help();
}
else
{
if (Input == "start")
{
check = false;
****
}
else
{
if (Input == "exit")
{
check = false;
}
}
}
if (check == true)
{
Console.WriteLine("What you entered wasn't recognised please enter Start, Help or Exit.");
}
else
{
}
}
}
the **** is where I need it to go to World.cs and start running the code in there. Which I haven't started on atm. But have Console.WriteLine("Start game in here"); so I know it's running that code, but I can't get it to work.
Sorry I forgot to mention that all the *.CS files are under one .csproj file thing. Sorry.
Thanks for anyone who's willing to help.

New Topic/Question
Reply




MultiQuote




|