Exemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     spriteRenderer       = gameObject.GetComponent <SpriteRenderer>();
     countControled       = -1;
     spriteRenderer.color = new Color(0, 0, 0);
     currentStatus        = StatusOfTV.Off;
 }
Exemplo n.º 2
0
    public void optTurnTV()
    {
        countControled++;

        if (currentStatus == StatusOfTV.Off)
        {
            currentStatus = StatusOfTV.On;
            FindObjectOfType <AudioManager>().Play("tv");
            tvZoom_off.SetActive(false);
            tvlight.SetActive(true);
        }
        else
        {
            currentStatus = StatusOfTV.Off;
            FindObjectOfType <AudioManager>().Pause("tv");
            tvZoom_on.SetActive(false);
            tvlight.SetActive(false);
        }
        option.SetActive(false);
        EventSystem.current.SetSelectedGameObject(null);
    }