// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { if (!_pressed && (Time.time - _timeSinceStart) > WaitTime) { levelSwitcher.SwitchLevel("Menu"); _pressed = true; } } _textTransform.anchoredPosition = new Vector2(_textTransform.anchoredPosition.x, _textTransform.anchoredPosition.y + Time.deltaTime * TextSpeed); }
private void LoadLevel(string level) { levelSwitcher.SwitchLevel(level); }