private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         if (myPrompt.IsActive() == false)
         {
             myPrompt.SetText("Press Space to Enter");
             myPrompt.gameObject.SetActive(true);
         }
     }
 }
Ejemplo n.º 2
0
 private void ToggleCoordinateLabels()
 {
     if (Input.GetKeyDown("c"))
     {
         CoordinateText.enabled = !CoordinateText.IsActive();
     }
 }
Ejemplo n.º 3
0
 public void SetPing(float a_ping)
 {
     if (pingDisplay.IsActive())
     {
         pingDisplay.text = a_ping.ToString() + " ms";
     }
 }
Ejemplo n.º 4
0
    public void SetEnemyScore(int a_newScore)
    {
        m_enemyScore = a_newScore;

        if (enemyScoreDisplay.IsActive())
        {
            enemyScoreDisplay.text = m_enemyScore.ToString();
        }
    }
Ejemplo n.º 5
0
    public void SetPlayerScore(int a_newScore)
    {
        m_playerScore = a_newScore;

        if (playerScoreDisplay.IsActive())
        {
            playerScoreDisplay.text = m_playerScore.ToString();
        }
    }
Ejemplo n.º 6
0
 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);
         }
     }
 }
Ejemplo n.º 8
0
 void Update()
 {
     if (_errorText.IsActive())
     {
         _errorText.alpha -= Time.unscaledDeltaTime;
         if (_errorText.alpha < 0.1)
         {
             _errorText.gameObject.SetActive(false);
         }
     }
 }
Ejemplo n.º 9
0
    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);
            }
        }
    }