public void chooseThis() { near = true; if (chosen != null) { StatueControl statue = chosen.GetComponent <StatueControl>(); chosen.transform.Find("Model3D").Find("Shine").GetComponent <MeshRenderer>().material.color = statue.offColor; statue.message.SetActive(false); } this.transform.Find("Model3D").Find("Shine").GetComponent <MeshRenderer>().material.color = chosenColor; chosen = this.GetComponent <Solutioner>(); if (places.Length > 0) { places[0].turnOn(); } }
// Use this for initialization void Start() { myStatue = this.GetComponent <StatueControl>(); }