4 using System.Collections.Generic;
33 List<GenericManager> managerList =
new List<GenericManager>();
35 if(hbManager == null){
36 GameObject hbManagerObj = GameObject.FindGameObjectWithTag(
"HBallManager");
39 managerList.Add(hbManager);
41 if(spManager == null){
42 GameObject spManagerObj = GameObject.FindGameObjectWithTag(
"SphereManager");
45 managerList.Add(spManager);
47 if(cubeManager == null){
48 GameObject cubeManagerObj = GameObject.FindGameObjectWithTag(
"CubeManager");
49 cubeManager = cubeManagerObj.GetComponent<
CubeManager>();
51 managerList.Add(cubeManager);
53 if(shManager == null){
54 GameObject psObj = GameObject.FindGameObjectWithTag(
"ShurikenParticleManager");
57 managerList.Add(shManager);
59 if(hbmeshManager == null){
60 GameObject hbmeshManagerObj = GameObject.FindGameObjectWithTag(
"HBallMeshManager");
63 managerList.Add(hbmeshManager);
66 if(lineManager == null){
67 GameObject lineManagerObj = GameObject.FindGameObjectWithTag(
"LineManager");
68 lineManager = lineManagerObj.GetComponent<
LineManager>();
70 managerList.Add(lineManager);
72 if(cubeBondManager == null){
73 GameObject cubeBondManagerObj = GameObject.FindGameObjectWithTag(
"CubeBondManager");
76 managerList.Add(cubeBondManager);
78 if(hStickManager == null){
79 GameObject hStickManagerObj = GameObject.FindGameObjectWithTag(
"HStickManager");
80 hStickManager = hStickManagerObj.GetComponent<
HStickManager>();
82 managerList.Add(hStickManager);
85 if(hStickMeshManager == null){
86 GameObject hStickMeshManagerObj = GameObject.FindGameObjectWithTag(
"HStickMeshManager");
89 managerList.Add(hStickMeshManager);
100 if(box&&box.GetComponent <Rigidbody>()==null) {
101 box.AddComponent<Rigidbody>();
102 box.GetComponent<Rigidbody>().useGravity =
false;
103 box.GetComponent<Rigidbody>().interpolation = RigidbodyInterpolation.Interpolate;
104 box.GetComponent<Rigidbody>().drag = 0.6f;
106 if(box&&box.GetComponent <SpringJoint>()==null) {
107 box.AddComponent<SpringJoint>();
108 box.GetComponent<SpringJoint>().spring = 5;
119 if(box&&box.GetComponent <SpringJoint>())
120 Object.Destroy (box.GetComponent <SpringJoint>());
121 if(box&&box.GetComponent <Rigidbody>())
122 Object.Destroy (box.GetComponent <Rigidbody>());
129 List<GenericManager> managers = GetManagers();
135 List<GenericManager> managers = GetManagers();
142 if(bondManager != null){
147 if(hbManager != null){
150 if(spManager != null){
153 if(cubeManager != null){
156 if(shManager != null){
159 if(hbmeshManager != null){
162 if(lineManager != null){
165 if(cubeBondManager != null){
168 if(hStickManager != null){
171 if(hStickMeshManager != null){
178 List<GenericManager> managers = GetManagers();
205 if(bondManager != null){
213 if(bondManager != null)
224 if(bondManager != null )
349 DestroyAllAtomsAndBonds();
abstract void Init()
Initializes this instance of the manager.
static ShurikenParticleManager shManager
override void DestroyAll()
static HBallManager hbManager
static SphereManager spManager
static void DestroyOxySphere()
static void ToggleDistanceCueing(bool enabling)
override void DestroyAll()
static void HideMolecule()
static void DestroySugarRibs()
abstract void DestroyAll()
override void DestroyAll()
Disable and destroys all the Hyperballs
override void DestroyAll()
Disable and destroys all the Hyperballs and Sticks.
static HBallMeshManager hbmeshManager
abstract void ResetRadii()
override void EnableRenderers()
Enables the renderers for the entire set of balls and sticks.
static HStickMeshManager hStickMeshManager
static void ClearMemory()
static void DestroyRingBlending()
override void DestroyAll()
static void DeletePhysics()
override void DestroyAll()
static void DestroyBonds()
static void DestroyAtomsAndBonds()
abstract void EnableRenderers()
Enables the renderers for all objects managed by the instance of the manager.
static void InitManagers()
abstract void showHydrogens(bool hide)
static CubeBondManager cubeBondManager
static void showHydrogens(bool hide)
static HStickManager hStickManager
static LineManager lineManager
override void DestroyAll()
Disable and destroys all the Sticks.
static bool resetInteractive
static void setCurrentAtomManager(GenericManager manager)
static bool toggle_HIDE_HYDROGEN
abstract void DisableRenderers()
Disables the renderers for all objects managed by the instance of the manager.
static ElectrostaticManager getElectrostaticManager()
static void setCurrentBondManager(GenericManager manager)
static void DestroyAllAtomsAndBonds()
static Dictionary< string, GameObject[]> atomsByChar
!WiP Includes FLAGS of GUI.
static CubeManager cubeManager
static void ChangeRepresentation(UIData.AtomType newAtomType, UIData.BondType newBondType=UIData.BondType.nobond)
override void DestroyAll()
override void DestroyAll()
static List< GenericManager > GetManagers()
Gets the list of active managers based on the atom type provided and based on the bond type in UIData...
static SurfaceManager getSurfaceManager()
static GenericManager getCurrentBondManager()
void DisplayAtoms(UIData.AtomType type_atom, bool force_display=false)
override void EnableRenderers()
Enables the renderers for all objects managed by the instance of the manager.
static void ShowMolecule()
static GenericManager getCurrentAtomManager()
abstract void ToggleDistanceCueing(bool enabling)