private void MessegeBox_OnOkButtonClickEvent() { if (GameMng.GetDiamondNumber() >= GameMng.selectedExam.examDiamondPrice) { GameMng.Instance.RemoveDiamond(GameMng.selectedExam.examDiamondPrice); myPanel.Hide(); GameMng.Instance.ShowExam(); } else { Setting.MessegeBox.SetMessege("الماس کافی نداری"); } }
public void HintClick() { if (QuestionList[CurrentQuestionIndex].structure != QuestionStruct.WordGame) { if (GameMng.GetDiamondNumber() < 5) { Setting.notificationMessage.Show("الماس کافی نداری".faConvert()); } else { hintButton.gameObject.SetActive(false); GameMng.Instance.RemoveDiamond(5); Setting.notificationMessage.Show("5 تا الماس استفاده کردی ".faConvert()); if (QuestionList[CurrentQuestionIndex].correctAnswer == 2 || QuestionList[CurrentQuestionIndex].correctAnswer == 3) { if (QuestionList[CurrentQuestionIndex].structure == QuestionStruct.Choice) { ChoiceQuestionButtons[0].gameObject.SetActive(false); ChoiceQuestionButtons[3].gameObject.SetActive(false); } else { PicQuestionButtons[0].gameObject.SetActive(false); PicQuestionButtons[3].gameObject.SetActive(false); } } else { if (QuestionList[CurrentQuestionIndex].structure == QuestionStruct.Choice) { ChoiceQuestionButtons[1].gameObject.SetActive(false); ChoiceQuestionButtons[2].gameObject.SetActive(false); } else { PicQuestionButtons[1].gameObject.SetActive(false); PicQuestionButtons[2].gameObject.SetActive(false); } } } } }