private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (myPrompt.IsActive() == false) { myPrompt.SetText("Press Space to Enter"); myPrompt.gameObject.SetActive(true); } } }
private void ToggleCoordinateLabels() { if (Input.GetKeyDown("c")) { CoordinateText.enabled = !CoordinateText.IsActive(); } }
public void SetPing(float a_ping) { if (pingDisplay.IsActive()) { pingDisplay.text = a_ping.ToString() + " ms"; } }
public void SetEnemyScore(int a_newScore) { m_enemyScore = a_newScore; if (enemyScoreDisplay.IsActive()) { enemyScoreDisplay.text = m_enemyScore.ToString(); } }
public void SetPlayerScore(int a_newScore) { m_playerScore = a_newScore; if (playerScoreDisplay.IsActive()) { playerScoreDisplay.text = m_playerScore.ToString(); } }
private void FireRsEvent() { if (!restartText.IsActive()) { EventSystem.current.SetSelectedGameObject(null, null); btn.enabled = false; RespawnEvent?.Invoke(); } }
private void OnTriggerEnter(Collider other) { if ((GameManager.completedLevels[thisLevelNum] || GameManager.completedLevels[thisLevelNum - 1])) { if (myPrompt.IsActive() == false) { myPrompt.SetText("Press Space to Enter"); myPrompt.gameObject.SetActive(true); } } else { if (myPrompt.IsActive() == false) { myPrompt.SetText("Complete Previous Level to Enter"); myPrompt.gameObject.SetActive(true); } } }
void Update() { if (_errorText.IsActive()) { _errorText.alpha -= Time.unscaledDeltaTime; if (_errorText.alpha < 0.1) { _errorText.gameObject.SetActive(false); } } }
void Update() { if (Input.GetKeyDown(KeyCode.Return) && _waitToStartText.activeSelf && !_startMenu.activeSelf) { _startMenu.SetActive(true); _waitToStartText.SetActive(false); } if (_errorText.IsActive()) { _errorText.alpha -= Time.unscaledDeltaTime; if (_errorText.alpha < 0.1) { _errorText.gameObject.SetActive(false); } } }