Ejemplo n.º 1
0
    public void OnHoverEnter(Transform t)
    {
        if (t.gameObject.name == "BackButton")
        {
            t.gameObject.GetComponent <Renderer>().material = backACtive;
        }
        else
        {
            //Debug.Log("---> " + t);
            GameObject   go = t.gameObject;
            BackboneUnit bu = (go.GetComponent("BackboneUnit") as BackboneUnit);
            if (bu != null)
            {
                //Debug.Log("      --> script");
                bu.SetBackboneUnitControllerHover(true);
            }

            //oldHoverMat = t.gameObject.GetComponent<Renderer>().material;
            //t.gameObject.GetComponent<Renderer>().material = yellowMat;
        }
        if (outText != null)
        {
            outText.text = "<b>Last Interaction:</b>\nHover Enter:" + t.gameObject.name;
        }
    }
Ejemplo n.º 2
0
    public void SetBackboneUnitControllerHover(bool value)
    {
        if (controllerHoverOn != value)
        {
            controllerHoverOn        = value;
            myResidue.residueHovered = value;

            BackboneUnit buAmide    = myResidue.amide_pf.GetComponent("BackboneUnit") as BackboneUnit;
            BackboneUnit buCalpha   = myResidue.calpha_pf.GetComponent("BackboneUnit") as BackboneUnit;
            BackboneUnit buCarbonyl = myResidue.carbonyl_pf.GetComponent("BackboneUnit") as BackboneUnit;

            BackboneUnit thisBBU = gameObject.GetComponent <BackboneUnit>();
            if (thisBBU != buAmide)
            {
                buAmide.SetBackboneUnitControllerHover(value);
            }
            if (thisBBU != buCalpha)
            {
                buCalpha.SetBackboneUnitControllerHover(value);
            }
            if (thisBBU != buCarbonyl)
            {
                buCarbonyl.SetBackboneUnitControllerHover(value);
            }

            UpdateRenderMode();
        }

        //controllerHoverOn = flag;
        //myResidue.residueHovered = flag;
        //UpdateRenderMode();
    }
Ejemplo n.º 3
0
    void HoverEnter(GameObject go)
    {
        // Debug.Log(" Hover Entering " + go.name + " GameObject");
        BackboneUnit bu = (go.GetComponent("BackboneUnit") as BackboneUnit);

        if (bu != null)
        {
            //Debug.Log("      --> script");
            bu.SetBackboneUnitControllerHover(true);
        }
    }
Ejemplo n.º 4
0
    void HoverExit()
    {
        GameObject go = lastHit.gameObject;
        //Debug.Log(" Hover Exiting " + go.name + " GameObject");
        BackboneUnit bu = (go.GetComponent("BackboneUnit") as BackboneUnit);

        if (bu != null)
        {
            bu.SetBackboneUnitControllerHover(false);
        }
    }