예제 #1
0
    private void UpdateSelection()
    {
        if (getSelectKey())
        {
            //SELECT

            if (lastHit != null)
            {
                GameObject   go = lastHit.gameObject;
                BackboneUnit bu = (go.GetComponent("BackboneUnit") as BackboneUnit);
                if (bu != null)
                {
                    bu.SetMyResidueSelect(true);
                }
            }
        }

        if (getDeselectKey())
        {
            // DESELECT

            if (lastHit != null)
            {
                GameObject   go = lastHit.gameObject;
                BackboneUnit bu = (go.GetComponent("BackboneUnit") as BackboneUnit);
                if (bu != null)
                {
                    bu.SetMyResidueSelect(false);
                }
            }
        }
    }
예제 #2
0
 public void OnHoverBDown(Transform t)
 {
     {
         //Debug.Log("---> " + t);
         GameObject   go = t.gameObject;
         BackboneUnit bu = (go.GetComponent("BackboneUnit") as BackboneUnit);
         if (bu != null)
         {
             //Debug.Log("      --> script");
             bu.SetMyResidueSelect(true);
         }
         //t.gameObject.GetComponent<Renderer>().material = oldHoverMat;
     }
 }