本文整理汇总了C#中Patient.MyDiagnosis方法的典型用法代码示例。如果您正苦于以下问题:C# Patient.MyDiagnosis方法的具体用法?C# Patient.MyDiagnosis怎么用?C# Patient.MyDiagnosis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patient
的用法示例。
在下文中一共展示了Patient.MyDiagnosis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ManagerPatientLeave
/// <summary>
/// Leave the facility happily, and award points
/// </summary>
/// <param name="p"></param>
public void ManagerPatientLeave(Patient p)
{
//update the amount of patients.
currentPatients--;
//update the amount of patients that have been seen.
scorePatientsSeen++;
//spawn another patient if we are down to 0.
if (currentPatients <= 0)
{
ManagerPatientSpawn();
}
//listPatients.Remove(p);
//perform some kind of animation
//Determine if the initial assessment of the patient was correct.
bool rm = (p.InitialAssessmentGetRM() == p.MyDiagnosis().AnswerRespiratoryMetabolic);
bool aa = (p.InitialAssessmentGetAA() == p.MyDiagnosis().AnswerAcidosisAlkalosis);
//update score
scoreCorrectDiagnoses++;
if (rm && aa)
{
scoreCorrectInitialAssessment++;
}
gameplayUI.PatientFeedback().PatientFeedback(p, rm, aa);
gameplayUI.PatientFeedback().gameObject.SetActive(true);
Time.timeScale = 0;
//gain/increase points based on level of satisfaction
UpdateSatisfactionScore(6);
UpdatePatientsTreated();
//inform abg that the diagnosis is no longer being used.
//abg.PatientDiagnosisComplete(p.MyDiagnosis());
p.PersonMove(locationExit.position, "Exit");
}
示例2: PatientFeedback
public void PatientFeedback(Patient p, bool initRMCorrect, bool initAACorrect)
{
string colorRM, colorAA;
//inform the title to add the name of the patient to it's text.
languagetextTitle.AddThisText(p.name);
//textfieldName.text = p.name;
imagePatientID.sprite = p.PatientPhotoID();
if (initRMCorrect)
{
colorRM = hexColorCorrect;
//textfieldInitialRM.color = colorCorrect;
}
else
{
colorRM = hexColorWrong;
//textfieldInitialRM.color = colorWrong;
}
if (initAACorrect)
{
colorAA = hexColorCorrect;
//textfieldInitialAA.color = colorCorrect;
}
else
{
colorAA = hexColorWrong;
//textfieldInitialAA.color = colorWrong;
}
if (initRMCorrect && initAACorrect)
{
languagetextSuccessLevel.SwitchCurrentText(2);
//display the correct sprite
imageInitial.sprite = spriteCorrect;
//display the correct object
correctInitialAssessmentObject.SetActive(true);
//set the bool for time bonus to true.
timebonus = true;
}
else
{
languagetextSuccessLevel.SwitchCurrentText(1);
//display the incorrect initial sprite
imageInitial.sprite = spriteIncorrect;
//deactivate the correct object
correctInitialAssessmentObject.SetActive(false);
//set the bool for time bonus to false
timebonus = false;
}
//display the initial diagnosis text.
textfieldInitialAssessment.text = "<color=" + colorRM +">" + p.InitialAssessmentGetRM() + "</color> " + "<color=" + colorAA + ">" + p.InitialAssessmentGetAA() + "</color>";
//textfieldInitialRM.text = p.InitialAssessmentGetRM();
//textfieldInitialAA.text = p.InitialAssessmentGetAA();
//display the correct answer for the final diagnosis
textfieldDiagnosisFinal.text ="<color=" + hexColorCorrect +">" + p.MyDiagnosis().AnswerRespiratoryMetabolic + " " + p.MyDiagnosis().AnswerAcidosisAlkalosis + " " + p.MyDiagnosis().AnswerCompensation + "</color>";
//make sure that the final diagnosis sprite always displays correct.
imageDiagnosis.sprite = spriteCorrect;
}