void Update() { if (Input.GetKeyDown(KeyCode.R)) { CursorLockControl.UnlockCursor(); MenuCanvasScript.Inicio(); } }
// Start is called before the first frame update void Start() { _killCounter = GameObject.FindWithTag("KillCounter").GetComponent <KillCounter>(); _stageComplete = GetComponent <TextMeshProUGUI>(); _stageComplete.enabled = false; _audioManager = GameObject.FindWithTag("AudioManager").GetComponent <AudioManagerScript>(); _menu = GameObject.FindWithTag("IGMenu").GetComponent <MenuCanvasScript>(); }
//Do this when the mouse is clicked over the selectable object this script is attached to. public void OnPointerDown(PointerEventData eventData) { CursorLockControl.LockCursor(); MenuCanvasScript.Jogar(); }