I am new to c# game development and just start. I decided to start with the basics, Console Applications.
I am try trying to recreate a game created by Lincoln Li and it's called Mr Sprinkle's Great Escape.
There are 2 classes Stats (An attribute system) and Death where they kind of linked together. Here is the snippet of the code:
Stats
private static int thirst;
static public void ThirstLevel()
{
Console.WriteLine("Your thirst level is: {0}", thirst);
}
static public void DecreaseThirstLevel()
{
thirst--;
Console.WriteLine("Your thirst level is: {0}", thirst);
if (thirst == 20)
{
Console.WriteLine("Your thirst level is 2/3 gone!");
Console.WriteLine();
Console.WriteLine("You're getting thirsty!");
Console.WriteLine();
}
else if (thirst == 10)
{
Console.WriteLine("Danger! Danger! Your thirst level is 1/3 gone!");
Console.WriteLine();
Console.WriteLine("Better go get some water!");
Console.WriteLine();
}
else if (thirst <= 0)
{
Console.Clear();
Death.DeathByThirst();
}
}
Now my question, is how will I implement Death.DeathByThirst in the Death class. How will I proceed to call the logic of the Stats class to Death Class?
So far I'm stumped here :/
static public void DeathByThirst()
{
???
}
Your help will be appreciated! :)