private void Update() { if (inSettings) { return; } if (Input.GetKeyDown(KeyBinds.GetKeyBind(KeyBinds.Action.Refresh))) { OnClickRefresh(); } if (Input.GetKeyDown(KeyBinds.GetKeyBind(KeyBinds.Action.Restart))) { OnClickRestart(); } if (!isSearchBarSelected) { if (Input.GetKeyDown(KeyBinds.GetKeyBind(KeyBinds.Action.StartGame)) && !startedGame) { OnClickStart(); } } /* timer logic*/ if (startedGame && timerAmountInSeconds != 0) { timer -= Time.deltaTime; if (timer <= 0) { timerCountdownText.text = "0.0"; /* stop the timer */ startedGame = false; DisableCardsInSlots(); } else { int seconds = (int)timer % 60; int minutes = (int)timer / 60 % 60; timerCountdownText.text = $"{minutes.ToString("00")}:{seconds.ToString("00")}"; } } else { timerCountdownText.gameObject.SetActive(false); } }
private static void displayKeybind(Keys key) { Pigeon.Console.Log(string.Format("{0}: {1}", key, KeyBinds.GetKeyBind(key) ?? "<unbound>")); }