void Update() { if (lastUserID != LudumDareAPI.GetUserID()) { Texture2D tex = LudumDareAPI.GetAvatar(); if (tex != null) { lastUserID = LudumDareAPI.GetUserID(); image.texture = tex; image.enabled = true; } } }
public void SubmitButton() { if (!isProcessing) { errorLine.text = ""; isProcessing = true; submitButton.interactable = false; buttonText.text = "working..."; if (firstName.text.Trim() == "" || lastName.text.Trim() == "") { errorLine.text = "*First and Last Name are Required"; isProcessing = false; submitButton.interactable = true; buttonText.text = "Submit"; return; } NameManager.SetMyName(firstName.text, lastName.text); if (ldName.text != "") { LudumDareAPI.SetUser(ldName.text, () => { isProcessing = false; if (LudumDareAPI.GetUserID() > 2) { InterfaceManager.ShowFriendBay(); } else { submitButton.interactable = true; buttonText.text = "Submit"; errorLine.text = "*Ludum Dare Username Could Not Be Found"; } }); } else { InterfaceManager.ShowFriendBay(); } } }