Exemple #1
0
 public static void ResetVariable()
 {
     day             = "第一天";
     star            = 60;
     isInPingFen     = false;
     medicineTime    = 0;
     ZhiLiaoTime     = 0;
     JianChaTime     = -2;
     wenZhenTime     = 1;
     WarningTime     = 0;
     IsCreateRecord1 = false;
     IsCreateRecord2 = false;
     IsRemoveBDG     = false;
     IsInEICU        = false;
     IsInPt          = false;
     IsInMenZhen     = false;
     IsDone33        = false;
     IsDone40        = false;
     IsDone46        = false;
     IsDone51        = false;
     IsDone57        = false;
     IsDone52        = false;
     isAgain         = false;
     PatientChaTi.ResetChaTi();
     PatientZhiLiao.ResetZhiLiao();
     IsShowAnswer     = false;
     TodayTiWen       = 37.8f;
     TodayXueYa1      = 134;
     TodayXueYa2      = 86;
     TodayHuXi        = 24;
     TodayXueYang     = 98;
     TodayXinLv       = 102;
     IsBeRed          = false;
     IsMenZhenAsk     = false;
     IsFinishTodayAsk = false;
     IsJumpChaTiTip   = false;
     AllNeedUI.Instance.starText.text = "100";
     IsOccur33 = false;
 }
Exemple #2
0
 /// <summary>
 /// 重新游戏
 /// </summary>
 public void ReStart()
 {
     PatientZhiLiao.ResetZhiLiao();
     PatientChaTi.ResetChaTi();
     AllStaticVariable.ResetVariable();
 }
    //结束当日工作
    public void FinishJob()
    {
        AllNeedUI.Instance.BingQingRecord.SetActive(false);
        AllNeedUI.Instance.missionList.SetActive(false);
        AllNeedUI.Instance.BingShiCollect.SetActive(false);
        AllNeedUI.Instance.ChaTiPanel.SetActive(false);
        AllNeedUI.Instance.ZhiLiaoPanel.SetActive(false);
        AllNeedUI.Instance.SureFinishPanel.SetActive(false);
        DestroyChildrenOfCanvas();
        switch (AllStaticVariable.day)
        {
        case "第一天":
            //播放慢的节奏音效
            AllNeedUI.Instance.SlowAudio.enabled = true;
            AllNeedUI.Instance.FastAudio.enabled = false;
            if (!JudgeTime())
            {
                return;
            }
            AllNeedUI.Instance.Wendu1.fillAmount = 0.09f;
            AllNeedUI.Instance.Value1.fillAmount = 0.12f;
            PatientChaTi.CheckHasMiss();
            PatientZhiLiao.CheckHasMiss();
            MonoWay.Instance.ReFreshBingShi();
            AllStaticVariable.day = "第二天";
            PatientChaTi.ResetChaTi();
            PatientZhiLiao.ResetZhiLiao();
            AllStaticVariable.medicineTime = 1;
            AllNeedUI.Instance.Date.text   = "第2天";
            AllStaticVariable.ZhiLiaoTime  = 4;
            AllStaticVariable.JianChaTime  = 1;
            //修改治疗图标顺序
            Transform[] item1 = { AllNeedUI.Instance.ZhiLiaoItems[7], AllNeedUI.Instance.ZhiLiaoItems[8] };
            MonoWay.Instance.PreferItem(item1);
            Transform[] ChaItem1 =
            {
                AllNeedUI.Instance.ChaTiItems[10]
            };
            MonoWay.Instance.PreferChaTiItem(ChaItem1);
            //刷新查体&治疗剩余项目
            AllNeedUI.Instance.ZhiLiaoLeftLabel.text =
                AllStaticVariable.LeftZhiLiaoNum[AllStaticVariable.ZhiLiaoTime - 1];
            AllNeedUI.Instance.ChaTiLeftLabel.text =
                AllStaticVariable.LeftChaTiNum[AllStaticVariable.JianChaTime + 1];
            MonoWay.Instance.HeiPing();
            break;

        case "第二天":
            //播放慢的节奏音效
            AllNeedUI.Instance.SlowAudio.enabled = true;
            AllNeedUI.Instance.FastAudio.enabled = false;
            AllNeedUI.Instance.Wendu1.fillAmount = 0.24f;
            AllNeedUI.Instance.Value1.fillAmount = 0.28f;
            PatientChaTi.CheckHasMiss();
            PatientZhiLiao.CheckHasMiss();
            MonoWay.Instance.ReFreshBingShi();
            AllStaticVariable.day = "第三天";
            PatientChaTi.ResetChaTi();
            PatientZhiLiao.ResetZhiLiao();
            AllStaticVariable.medicineTime = 2;
            AllNeedUI.Instance.Date.text   = "第3天";
            AllStaticVariable.ZhiLiaoTime  = 5;
            AllStaticVariable.JianChaTime  = 2;
            //修改治疗图标顺序
            Transform[] item2 = { AllNeedUI.Instance.ZhiLiaoItems[5], AllNeedUI.Instance.ZhiLiaoItems[8], AllNeedUI.Instance.ZhiLiaoItems[7] };
            MonoWay.Instance.PreferItem(item2);
            Transform[] ChaItem2 =
            {
                AllNeedUI.Instance.ChaTiItems[5], AllNeedUI.Instance.ChaTiItems[10]
            };
            MonoWay.Instance.PreferChaTiItem(ChaItem2);
            //刷新查体&治疗剩余项目
            AllNeedUI.Instance.ZhiLiaoLeftLabel.text =
                AllStaticVariable.LeftZhiLiaoNum[AllStaticVariable.ZhiLiaoTime - 1];
            AllNeedUI.Instance.ChaTiLeftLabel.text =
                AllStaticVariable.LeftChaTiNum[AllStaticVariable.JianChaTime + 1];
            MonoWay.Instance.HeiPing();
            break;

        case "第三天":
            //播放慢的节奏音效
            AllNeedUI.Instance.SlowAudio.enabled = true;
            AllNeedUI.Instance.FastAudio.enabled = false;
            AllNeedUI.Instance.Wendu1.fillAmount = 0.848f;
            AllNeedUI.Instance.Value1.fillAmount = 0.87f;
            CheckMissChoicDay3();
            PatientChaTi.CheckHasMiss();
            PatientZhiLiao.CheckHasMiss();
            MonoWay.Instance.ReFreshBingShi();
            //创建4—6天查体记录
            CreateBodyResult.Day4To6();
            AllStaticVariable.day = "第七天";
            PatientChaTi.ResetChaTi();
            PatientZhiLiao.ResetZhiLiao();
            AllStaticVariable.medicineTime = 3;
            AllNeedUI.Instance.Date.text   = "第7天";
            AllStaticVariable.ZhiLiaoTime  = 6;
            AllStaticVariable.JianChaTime  = 3;
            //修改治疗图标顺序
            Transform[] item3 = { AllNeedUI.Instance.ZhiLiaoItems[7], AllNeedUI.Instance.ZhiLiaoItems[5] };
            MonoWay.Instance.PreferItem(item3);
            //修改查体图标顺序
            Transform[] ChaItem3 =
            {
                AllNeedUI.Instance.ChaTiItems[10], AllNeedUI.Instance.ChaTiItems[7]
            };
            MonoWay.Instance.PreferChaTiItem(ChaItem3);
            //刷新查体&治疗剩余项目
            AllNeedUI.Instance.ZhiLiaoLeftLabel.text =
                AllStaticVariable.LeftZhiLiaoNum[AllStaticVariable.ZhiLiaoTime - 1];
            AllNeedUI.Instance.ChaTiLeftLabel.text =
                AllStaticVariable.LeftChaTiNum[AllStaticVariable.JianChaTime + 1];
            MonoWay.Instance.HeiPing();
            break;

        case "第七天":
            //播放慢的节奏音效
            AllNeedUI.Instance.SlowAudio.enabled = true;
            AllNeedUI.Instance.FastAudio.enabled = false;
            AllNeedUI.Instance.Wendu1.fillAmount = 1f;
            AllNeedUI.Instance.Value1.fillAmount = 1f;
            CheckMissChoicDay7();
            PatientChaTi.CheckHasMiss();
            PatientZhiLiao.CheckHasMiss();
            MonoWay.Instance.ReFreshBingShi();
            AllStaticVariable.day = "第八天";
            PatientChaTi.ResetChaTi();
            PatientZhiLiao.ResetZhiLiao();
            AllStaticVariable.medicineTime = 4;
            AllNeedUI.Instance.Date.text   = "第8天";
            AllStaticVariable.ZhiLiaoTime  = 7;
            AllStaticVariable.JianChaTime  = 4;
            //修改治疗图标顺序
            Transform[] item7 = { AllNeedUI.Instance.ZhiLiaoItems[8], AllNeedUI.Instance.ZhiLiaoItems[7], AllNeedUI.Instance.ZhiLiaoItems[5] };
            MonoWay.Instance.PreferItem(item7);
            //修改检查图标
            Transform[] ChaTitem7 = { AllNeedUI.Instance.ChaTiItems[10] };
            MonoWay.Instance.PreferChaTiItem(ChaTitem7);
            //刷新查体&治疗剩余项目
            AllNeedUI.Instance.ZhiLiaoLeftLabel.text =
                AllStaticVariable.LeftZhiLiaoNum[AllStaticVariable.ZhiLiaoTime - 1];
            AllNeedUI.Instance.ChaTiLeftLabel.text =
                AllStaticVariable.LeftChaTiNum[AllStaticVariable.JianChaTime + 1];
            MonoWay.Instance.HeiPing();
            break;

        case "第八天":
            //播放快的节奏音效
            AllNeedUI.Instance.SlowAudio.enabled = false;
            AllNeedUI.Instance.FastAudio.enabled = true;
            AllNeedUI.Instance.FastAudio.volume  = 0.5f;
            StartCoroutine(EmergencyDelay());
            AllNeedUI.Instance.Wendu2.fillAmount = 0.38f;
            AllNeedUI.Instance.Value2.fillAmount = 0.5f;
            CheckMissChoicDay8();
            PatientChaTi.CheckHasMiss();
            PatientZhiLiao.CheckHasMiss();
            MonoWay.Instance.ReFreshBingShi();
            AllStaticVariable.day = "第九天";
            PatientChaTi.ResetChaTi();
            PatientZhiLiao.ResetZhiLiao();
            AllNeedUI.Instance.Date.text = "第9天";
            //刷新查体剩余项目
            AllNeedUI.Instance.ChaTiLeftLabel.text   = "0";
            AllNeedUI.Instance.ZhiLiaoLeftLabel.text = "0";
            MonoWay.Instance.HeiPing();
            break;

        case "第九天":
            //播放慢的节奏音效
            AllNeedUI.Instance.SlowAudio.enabled = true;
            AllNeedUI.Instance.FastAudio.enabled = false;
            AllStaticVariable.ZhiLiaoTime        = 9;
            AllStaticVariable.JianChaTime        = 6;
            //治疗按钮状态取消
            AllNeedUI.Instance.mainMenuToggles[4].GetComponent <Toggle>().isOn = false;
            //修改查体图标顺序
            Transform[] ChaItem9 =
            {
                AllNeedUI.Instance.ChaTiItems[12], AllNeedUI.Instance.ChaTiItems[3], AllNeedUI.Instance.ChaTiItems[4]
            };
            MonoWay.Instance.PreferChaTiItem(ChaItem9);
            AllNeedUI.Instance.ChaTiItems[12].gameObject.SetActive(true);
            AllNeedUI.Instance.ChaTiItems[9].gameObject.SetActive(false);
            //刷新查体剩余项目
            AllNeedUI.Instance.ChaTiLeftLabel.text =
                AllStaticVariable.LeftChaTiNum[AllStaticVariable.JianChaTime + 1];
            AllNeedUI.Instance.Wendu2.fillAmount = 1f;
            AllNeedUI.Instance.Value2.fillAmount = 1f;
            AllStaticVariable.IsInPt             = false;
            AllStaticVariable.IsInMenZhen        = true;
            MonoWay.Instance.ReFreshBingShi();
            AllStaticVariable.day = "两周后";
            PatientChaTi.ResetChaTi();
            PatientZhiLiao.ResetZhiLiao();
            AllNeedUI.Instance.Date.text = "2周后";
            MonoWay.Instance.HeiPing();
            MonoWay.Instance.OpenTip("请点击病史采集或患者查体");
            break;
        }
    }