Ejemplo n.º 1
0
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         RaycastHit hit;
         Ray        ray = _cam.ScreenPointToRay(Input.mousePosition);
         if (Physics.Raycast(ray, out hit))
         {
             if (hit.collider.tag == "Builder")
             {
                 Debug.Log(1);
                 Builder builder = hit.collider.GetComponent <Builder>();
                 builder.SpawnDetail();
                 builder.DetailScale();
                 builder.ActivationDetail();
             }
         }
     }
     else if (Input.GetMouseButton(0))
     {
     }
 }