// Start is called before the first frame update void Start() { text = GetComponent <Text>(); ascii = new Dictionary <int, string>(); foreach (var key in Keycodes.getCodes()) { ascii.Add((int)key, key.ToString()); } }
private void Awake() { if (singleton != null) { return; } singleton = this; Keycodes.GetKeycodes(); }
// Start is called before the first frame update void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } else { Destroy(gameObject); } gameOver = false; winNum = 0; Keycodes.addCodes(); }
// Update is called once per frame void Update() { int myCode = (int)Keycodes.getPlayerCode(playerNumber); text.text = Mutilate(ascii[myCode]); }
public void RandomizeKey() { Keycodes.getNewCode(playerNum); currentKey = Keycodes.getPlayerCode(playerNum); }
public void BlockKey() { Keycodes.BlockCode(playerNum); currentKey = KeyCode.At; }