public void clicked() { string result = ServerSignup(email, pass, user); if (String.Equals(result, "email error")) { ErrorPanel.gameObject.SetActive(true); ErrorText.text = "Invalid Email"; ErrorText.gameObject.SetActive(true); } else if (String.Equals(result, "User with that email already exists")) { ErrorPanel.gameObject.SetActive(true); ErrorText.gameObject.SetActive(true); ErrorText.text = "Email is already in use"; } else { UserPanel.gameObject.SetActive(false); quitbutton.gameObject.SetActive(true); loginbutton.gameObject.SetActive(true); signupbutton.gameObject.SetActive(true); if (ErrorPanel.IsActive()) { ErrorPanel.gameObject.SetActive(true); ErrorText.gameObject.SetActive(true); ErrorText.text = "Verification email sent"; } } Debug.Log(result); }
void Update() { if (isPatrolling) { PatrolArea(); } if (isAttacking && state == AIstate.ATTACK) { anim.SetBool("Attack", false); Filler.enabled = true; CallAttack(); } if (_currentHealth <= 0) { Destroy(gameObject); } if (Filler.IsActive() && opacity.transform.localScale.x <= 1) { opacity.transform.localScale += new Vector3(Time.deltaTime * (_attackCoolDown / 5), Time.deltaTime * (_attackCoolDown / 5), 0); if (opacity.transform.localScale.x >= 1) { anim.SetBool("Attack", true); opacity.transform.localScale = new Vector3(0, 0, 1); } } }
private void OnEnable() { if (linkedLoot != null) { image.enabled = true; Debug.Log(image.IsActive()); image.sprite = linkedLoot.transform.GetComponent <Loot>()._icon; Debug.Log(linkedLoot.transform.GetComponent <Loot>()._icon); } else { image.enabled = false; } }