// Start is called before the first frame update void Start() { cc = levelCamera.GetComponent <CameraController>(); for (int i = 0; i < restoringObjects.Count; i++) { toTrigger.AddLast(restoringObjects[i]); } for (int i = 0; i < possibleKeys.Count; i++) { KeyPressData newKey = new KeyPressData(); newKey.code = possibleKeys[i]; newKey.anim = keyAnimatorControllers[i]; newKey.sprite = keySprites[i]; runtimeKeyData.Add(newKey); } }
void InterpretKeypress(KeyPressData data) { if (data.KeyType == KeyType.Value) { _consoleController.AddText(data.Value); } else if (data.Command == Commands.Tab) { _consoleController.AddText(" "); } else if (data.Command == Commands.NewLine) { _consoleController.SubmitText(); } else if (data.Command == Commands.Backspace || data.Command == Commands.Clear) { _consoleController.RemoveText(data.Command); } else { _consoleController.ExecuteCommand(data.Command); } }
public void KeypressHandler(KeyPressData keyPressed) { keyQueue.Enqueue(keyPressed); }