示例#1
0
 /// <summary>
 /// Switch the protein representation to Hyperball. Used in switch mode (LOD).
 /// </summary>
 public void ToNotParticle()
 {
     if (UIData.atomtype != UIData.AtomType.particleball && UIData.atomtype != previous_AtomType)
     {
         previous_AtomType = UIData.atomtype;
         previous_BondType = UIData.bondtype;
     }
     DisplayMolecule.ToNotParticle(previous_AtomType, previous_BondType);
 }
示例#2
0
 /// <summary>
 /// Switch the protein representation to Particle. Used in switch mode (LOD).
 /// </summary>
 public void ToParticle()
 {
     if (UIData.atomtype != UIData.AtomType.particleball)
     {
         previous_AtomType = UIData.atomtype;
         previous_BondType = UIData.bondtype;
     }
     DisplayMolecule.ToParticle();
     // Debug.Log("ToParticle()");
 }
示例#3
0
        public static void ToNotParticle(UIData.AtomType previousType, UIData.BondType previousBondType)
        {
            if (previousType != UIData.AtomType.noatom && UIData.atomtype != previousType)
            {
                GameObject shObject = GameObject.FindGameObjectWithTag("ShurikenParticleManager");
                ShurikenParticleManager shManager = shObject.GetComponent <ShurikenParticleManager>();
                shManager.pSystem.GetComponent <Renderer>().enabled = false;
                shManager.enabled = false;

                UIData.atomtype         = previousType;
                UIData.bondtype         = previousBondType;
                UIData.resetBondDisplay = true;
                UIData.resetDisplay     = true;
                if (UIData.atomtype == UIData.AtomType.sphere)
                {
                    UIData.isCubeToSphere = true;
                    UIData.isSphereToCube = false;
                }
                else
                {
                    UIData.isCubeToSphere = false;
                    UIData.isSphereToCube = true;
                }

                if (UIData.atomtype == UIData.AtomType.hyperball)
                {
                    GameObject   hbmObject = GameObject.FindGameObjectWithTag("HBallManager");
                    HBallManager hbManager = hbmObject.GetComponent <HBallManager>();
                    BallUpdate.resetRadii = true;
                    hbManager.EnableRenderers();
                    hbManager.enabled = true;
                }

                Debug.Log("ToHyperBall()");
                Debug.Log(UIData.atomtype.ToString());
                Debug.Log(UIData.bondtype.ToString());
            }
        }