- Home /
Handling a large number of behind the scenes variables
I am creating a game where solving algebraic equations is the primary mechanic. I am trying to figure out how to implement the large amount of variables a game like this requires. Here's what I have it broken down to so far.
public string name = “3x+2 = 8”;
public string eq_difficulty = “1”;
public string s1n1 = “3”
public string s1n2 = “x”
public string s1n3 = “2”
public string s1n4 = “8”
public string s2n1 = “3”
public string s2n2 = “x”
public string s2n3 = “6”
public string s2n4 = “ ”
public string s3n1 = “ ”
public string s3n2 = “ ”
public string s3n3 = “ ”
public string s3n4 = “ ”
public string step1 = “subtract”
public string step2 = “2”
public string step3 = “divide”
public string step4 = “3”
public string step5 = “ “
public string eqt1 = “3x+2 = 8”
public string eqt2 = “3x = 6”
public string eqt3 = “x = 3”;
public string eqt4 = “WINNER”;
I am unsure how to go about implementing this into the game.
Answer by Sisso · Dec 06, 2013 at 07:39 PM
Use arrays http://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx
But you really need is a complete C# course http://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx
Your answer
Follow this Question
Related Questions
Local Variables 2 Answers
Get Variable From A Script Attached To a Prefab 3 Answers
Inspector Assigned Variables Not In Both Scenes 1 Answer
Passing variables to an instantiated object 1 Answer
Int Variable++ isn't adding anything. 4 Answers