// Set's the sprite renderer color to the generator specific color. private void Start() { SubstanceGenerator particleGenerator = GetComponentInChildren <SubstanceGenerator>(); SpriteRenderer rend = GetComponentInChildren <SpriteRenderer>(); Color substanceColor = particleGenerator.particleSubstance.particleColor; rend.color = substanceColor; }
private void Start() { emitter = GetComponentInChildren <SubstanceGenerator>(); }