public void DealWithResValue(float resValue, float sleepValue) { float res = resValue; float sleep = sleepValue; res *= CheckStressPun(); socialAcumulado += res; if (socialAcumulado >= 100) { estsocial += socialAcumulado - 100; CheckStress(); if (!StressManager.socialEstressado) { SatisfactionManager.satisfacaoSocial++; } socialAcumulado = 0; } else if (socialAcumulado < 100) { estsocial -= sleep; } if (estsocial < 0) { estsocial = 0f; } SatisfactionManager.GetInstance().CallEventUpdateResiliences(); }
public void DealWithResValue(float resValue, float sleepValue) { float res = resValue; float sleep = sleepValue; res *= CheckStressPun(); fisicoAcumulado += res; if (fisicoAcumulado >= 100) { estFisico += fisicoAcumulado - 100; CheckStress(); if (!StressManager.fisicoEstressado) { SatisfactionManager.satisfacaoFisico++; } fisicoAcumulado = 0; } else if (fisicoAcumulado < 100) { estFisico -= sleep; } if (estFisico < 0) { estFisico = 0f; } SatisfactionManager.GetInstance().CallEventUpdateResiliences(); }