// Initialisation void Start() { forwardKey.text = KeyBoardBindings.GetForwardKey().ToString(); backwardKey.text = KeyBoardBindings.GetBackwardKey().ToString(); attackKey.text = KeyBoardBindings.GetAttackKey().ToString(); chargedAttackKey.text = KeyBoardBindings.GetChargedAttackKey().ToString(); pauseKey.text = KeyBoardBindings.GetPauseKey().ToString(); zoomInKey.text = KeyBoardBindings.GetZoomInKey().ToString(); zoomOutKey.text = KeyBoardBindings.GetZoomOutKey().ToString(); showScoreboardKey.text = KeyBoardBindings.GetScoreboardKey().ToString(); }
// Update is called once per frame void Update() { #if UNITY_ANDROID if (Input.GetKeyDown(KeyCode.Escape)) // alternate method instead of pause button { TogglePauseMenu(); } #else if (Input.GetKeyDown(KeyBoardBindings.GetPauseKey())) { TogglePauseMenu(); } if (Input.GetKeyDown(KeyBoardBindings.GetScoreboardKey())) { scoreboard.SetActive(true); } else if (Input.GetKeyUp(KeyBoardBindings.GetScoreboardKey())) { scoreboard.SetActive(false); } #endif }