예제 #1
0
    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();
                }
            }
        }
    }
예제 #2
0
 private static JengaLine GetJengaLine(JengaLine jengaLine)
 {
     return(jengaLine);
 }