// Should be called when player looks at the button public void LookEnter() { if (type == "select") { gameObject.GetComponent <Renderer>().material.color = Color.green; if (transform.name == "LeftButton") { screen.SelectButtonHovered(0); } else if (transform.name == "RightButton") { screen.SelectButtonHovered(1); } else if (transform.name == "TopButton") { screen.SelectButtonHovered(2); } else if (transform.name == "BottomButton") { screen.SelectButtonHovered(3); } } else if (type == "center") { screen.CenterButtonActivated(); // The button becomes hidden gameObject.SetActive(false); } }