// Update is called once per frame void Update() { if (animateInputField) { goInputField.transform.position = Vector2.Lerp(goInputField.transform.position, InputFieldEndPos, 0.05f); } //User type in input field if (goInputField.GetComponent <InputField>().isFocused) { goButtonStatus.SetActive(false); goButtonPlay.SetActive(true); } //Display checking name result and progress matching step if (checkNameState.Equals(CheckNameState.VALID)) { txtStatus.text = "Matching ..."; checkNameState = CheckNameState.READY; gameStateManager.SendMatching(); //disable focus input field } else if (checkNameState.Equals(CheckNameState.INVALID)) { txtStatus.text = "Invalid Name"; checkNameState = CheckNameState.READY; } // Jump to ship setup scene if (switchScene) { SceneManager.LoadScene("Main"); } }
public void DisplayCheckNameResult(bool isValid) { if (isValid) { checkNameState = CheckNameState.VALID; } else { checkNameState = CheckNameState.INVALID; } }