private void GivePointsToPlayer(float pPointsToGive) { if (pPointsToGive < 0) { LevelManager?.AddDeath(); } else if (pPointsToGive > 0) { LevelManager?.AddHealed(); } LevelManager?.AddPoints((int)pPointsToGive); AilmentUI.CreateScorePopUpText((int)pPointsToGive); StartCoroutine(PointsUIManager.UpdateUI((int)pPointsToGive)); }
public void Death() { PlayDeathParticles(); FindObjectOfType <PlayerActionController>().StopAction(GetComponent <AilmentController>()); var ailmentController = GetComponent <AilmentController>(); ailmentController.StopEmmittingOngoing(); ailmentController.IsActionActive = false; IsDead = true; LevelManager?.AddDeath(); //LevelManager?.AddPoints(-(ailmentConfig.PointsWhenHealed)); //AilmentUIController.CreateScorePopUpText(-(ailmentConfig.PointsWhenHealed)); ailmentController.PlayDeathClothSound(); MovementController.GetOutOfBed(); StretchersController.IsDead = true; StretchersController.OnStretchers = true; if (LevelManager.TimeOver) { LevelManager.CheckIfAllPatientsAreDone(); } }