62 using System.Collections.Generic;
80 public override void Init () {
81 Debug.Log(
"Shuriken Initializing");
83 pNumber = sourceParticles.Length;
84 Debug.Log(
"Found: " + pNumber +
" particles");
89 particles[i].startColor = sourceParticles[i].color;
97 Renderer rd = pSystem.GetComponent<Renderer>();
101 Debug.Log(
"Shuriken finished initializing");
107 Debug.Log(
"Destroy Particles");
113 public override void SetColor(Color col, List<string> atoms,
string residue =
"All",
string chain =
"All"){
116 public override void SetColor(Color col,
int atomNum){
119 public override void SetRadii(List<string> atoms,
string residue =
"All",
string chain =
"All"){}
134 ParticleSystem.Particle[] currentParticles =
new ParticleSystem.Particle[
pNumber];
135 pSystem.GetParticles(currentParticles);
136 foreach(ParticleSystem.Particle p in currentParticles) {
137 Debug.Log(p.position.ToString());
138 Debug.Log(p.startColor.ToString());
140 Debug.Log(pSystem.GetComponent<Renderer>().enabled.ToString());
154 ParticleSystem.Particle[] currentParticles =
new ParticleSystem.Particle[
pNumber];
155 pSystem.GetParticles(currentParticles);
159 pSystem.SetParticles(currentParticles, pNumber);
180 pSystem.GetComponent<Renderer>().enabled =
true;
183 ParticleSystem.Particle[] currentParticles =
new ParticleSystem.Particle[
pNumber];
184 pSystem.GetParticles(currentParticles);
187 pSystem.SetParticles(currentParticles, pNumber);
195 pSystem.GetComponent<Renderer>().enabled =
false;
199 pSystem.GetComponent<Renderer>().shadowCastingMode = ShadowCastingMode.On;
200 pSystem.GetComponent<Renderer>().receiveShadows =
true;
203 pSystem.GetComponent<Renderer>().shadowCastingMode = ShadowCastingMode.Off;
204 pSystem.GetComponent<Renderer>().receiveShadows =
false;
228 pSystem.SetParticles(
particles, pNumber);
240 ParticleSystem.Particle[] currentParticles =
new ParticleSystem.Particle[
pNumber];
241 pSystem.GetParticles(currentParticles);
243 for (
int j=0; j<currentParticles.Length; j++){
247 currentParticles[j].lifetime = -1f;
250 currentParticles[j].lifetime = Mathf.Infinity;
256 pSystem.SetParticles(currentParticles, pNumber);
override void EnableShadows()
override void SetRadii(List< string > atoms, string residue="All", string chain="All")
override void Init()
Initializes this instance of the ParticleSystem Manager.
override void SetColor(Color col, int atomNum)
override GameObject GetBall(int id)
override void showHydrogens(bool hide)
override void EnableRenderers()
Enables this script and the renderer of its particle system.
override void DestroyAll()
static List< AtomModel > atomsTypelist
The type of each atom.
override void DisableRenderers()
Disables this script and the renderer of its particle system.
ParticleSystem.Particle[] particles
override void ResetIMDSimulationPositions()
override void SetColor(Color col, List< string > atoms, string residue="All", string chain="All")
override void SetRadii(int atomNum)
!WiP Includes FLAGS of GUI.
void CheckParticles()
Used for debugging.
static float radiusFactor
override void ResetPositions()
override void ToggleDistanceCueing(bool enabling)
static float radiusFactor
static Vector3 LITTLE_OFFSET
static float oldRadiusFactor
static bool bondsReadyToBeReset
override void ResetRadii()
Resets the radii of the particle balls as needed when it is changed through the GUI.
override void DisableShadows()
Particle[] sourceParticles
static List< float[]> atomsLocationlist
The coordinates of each atom.