Game Development Reference
In-Depth Information
This new function takes in two properties: the first one will be what KeyCode we set
and the second one will be what KeyCode we are setting the key to. You can see
that we also set our string variables, which are used in the GUI with another function.
We'll create that function now:
string SetString(string SetTo)
{
switch(SetTo)
{
case "Alpha1":
SetTo = "1";
break;
case "Alpha2":
SetTo = "2";
break;
case "Alpha3":
SetTo = "3";
break;
case "Alpha4":
SetTo = "4";
break;
case "Return":
SetTo = "Enter";
break;
case "Escape":
SetTo = "Escape";
break;
case "I":
SetTo = "I";
break;
case "JoystickButton6":
SetTo = "Start Button";
break;
case "JoystickButton1":
SetTo = "A Button";
break;
}
Search WWH ::




Custom Search