private static void HighlightSelectedBlock() { RaycastHit hit; if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)) { if (hit.collider.tag == "JengaLine") { JengaLine jengaLine = hit.collider.GetComponent <JengaLine>(); jengaLine.SetSelected(); //jengaLine.GetComponent<Renderer>().material.color = Color.blue; //jengaLine.GetComponent<Renderer>().material.color = Color.red; jengaLine.Move(); } } } }
private static JengaLine GetJengaLine(JengaLine jengaLine) { return(jengaLine); }