public void ApplyNewFeedbackStepInstant(ShipLifeFeedbacksStep step) { //smokeParticlesMainModule.startColor = step.smokeColor; currentFeedbackStep = step; if (smokeParticleSystem != null) { smokeParticlesMainModule.startColor = currentFeedbackStep.smokeColor; smokeParticlesMainModule.startSize = currentFeedbackStep.smokeSize; smokeParticlesEmissionModule.rateOverTime = currentFeedbackStep.smokeEmissionSpeed; if (currentFeedbackStep.smokeEmissionSpeed == 0) { smokeParticleSystem.gameObject.SetActive(false); } } if (fireParticleSystem != null) { fireParticlesMainModule.startSize = currentFeedbackStep.fireSize; fireParticlesEmissionModule.rateOverTime = currentFeedbackStep.fireEmissionSpeed; if (currentFeedbackStep.fireEmissionSpeed == 0) { fireParticleSystem.gameObject.SetActive(false); } } }
public void ApplyNewFeedbackStep(ShipLifeFeedbacksStep step) { //smokeParticlesMainModule.startColor = step.smokeColor; currentFeedbackStep = step; if (currentFeedbackStep.smokeEmissionSpeed > 0 && smokeParticleSystem != null) { if (!smokeParticleSystem.gameObject.activeInHierarchy) { smokeParticleSystem.gameObject.SetActive(true); } } if (currentFeedbackStep.fireEmissionSpeed > 0 && fireParticleSystem != null) { if (!fireParticleSystem.gameObject.activeInHierarchy) { fireParticleSystem.gameObject.SetActive(true); } } }