最新修改提交
This commit is contained in:
parent
b09af4e2c2
commit
797abebf95
@ -69804,7 +69804,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5206904217386052552, guid: f5f8e47786f2ac047b17154888dd753d,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5206904217386052555, guid: f5f8e47786f2ac047b17154888dd753d,
|
||||
type: 3}
|
||||
|
||||
@ -272,30 +272,51 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
Unlight(value);
|
||||
GameManager.Instance.interactionManager.DisableInteraction(value);
|
||||
}
|
||||
public void ShowTxtQuestion(int id, int score, int scoreId, Action nextFun)
|
||||
//public void ShowTxtQuestion(int id, int score, int scoreId, Action nextFun)
|
||||
//{
|
||||
// TxtSelectQuestionPanel txtSelectQuestionPanel = GameManager.Instance.uiManager.GetUI<TxtSelectQuestionPanel>();
|
||||
// txtSelectQuestionPanel.ShowImgQuestion(id);
|
||||
// txtSelectQuestionPanel.nextAction = nextFun;
|
||||
// txtSelectQuestionPanel.subAction = isTrue =>
|
||||
// {
|
||||
// if (main_gameModel.modeType == ModeType.KaoHe)
|
||||
// {
|
||||
// if (isTrue)
|
||||
// {
|
||||
// AddScore(score, scoreId);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// AddScore(0, scoreId);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = isTrue });
|
||||
// }
|
||||
// };
|
||||
//}
|
||||
|
||||
public void ShowTxtQuestion(string stepName, int id, int scoreId, int score, Action nextFun)
|
||||
{
|
||||
TxtSelectQuestionPanel txtSelectQuestionPanel = GameManager.Instance.uiManager.GetUI<TxtSelectQuestionPanel>();
|
||||
txtSelectQuestionPanel.ShowImgQuestion(id);
|
||||
txtSelectQuestionPanel.ShowImgQuestion(id, stepName);
|
||||
txtSelectQuestionPanel.nextAction = nextFun;
|
||||
txtSelectQuestionPanel.subAction = isTrue =>
|
||||
txtSelectQuestionPanel.subAction = isTure =>
|
||||
{
|
||||
if (main_gameModel.modeType == ModeType.KaoHe)
|
||||
if (isTure)
|
||||
{
|
||||
if (isTrue)
|
||||
{
|
||||
AddScore(score, scoreId);
|
||||
GameManager.Instance.kaoheManager.AddScore(score, scoreId, (s, t) => {
|
||||
GameManager.Instance.uiManager.GetUI<ScorePanel>().SetScore(s.ToString(), t.ToString());
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
AddScore(0, scoreId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = isTrue });
|
||||
GameManager.Instance.kaoheManager.AddScore(0, scoreId, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void ShowImgQuestion(int id, int score, int scoreId, Action nextFun)
|
||||
{
|
||||
ImgSelectQuestionPanel imgSelectQuestionPanel = GameManager.Instance.uiManager.GetUI<ImgSelectQuestionPanel>();
|
||||
|
||||
@ -14,7 +14,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
fsm.ShowCamera("暴露阴茎1_Camera");
|
||||
fsm.ShowTip(0);
|
||||
fsm.PlayBgm(0);
|
||||
fsm.ShowSpeakPanel("꿨흙돔쿱밗》괬쨋綾쑤", "셨崎쉥관튄蕨빈股箕", new Vector3(-220f, 235f), 2, 0, 3, (c) =>
|
||||
fsm.ShowSpeakPanel("插入导尿管》暴露阴茎", "请助手继续将包皮向后推压,暴露阴茎2-5cm", new Vector3(-220f, 235f), 2, 0, 3, (c) =>
|
||||
{
|
||||
fsm.Hide("女助手文字位置");
|
||||
fsm.ShowCamera("暴露阴茎2_Camera");
|
||||
|
||||
@ -39,7 +39,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
GameManager.Instance.uiManager.ShowUI<StartKaoHePanel>();
|
||||
GameManager.Instance.uiManager.GetUI<StartKaoHePanel>().callback = () =>
|
||||
{
|
||||
fsm.ShowTxtQuestion(0, 3, 0, () =>
|
||||
fsm.ShowTxtQuestion("²¡Àý¡·²¡Àý¡·²½Öè1",0, 0, 3, () =>
|
||||
{
|
||||
PlayVideo();
|
||||
});
|
||||
@ -65,7 +65,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
fsm.ShowTxtQuestion(1, 3, 1, () =>
|
||||
fsm.ShowTxtQuestion("²¡Àý¡·²¡Àý¡·²½Öè1",1, 1, 3, () =>
|
||||
{
|
||||
fsm.nextState = true;
|
||||
});
|
||||
|
||||
@ -16,7 +16,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
this.Log("进入测量方法状态");
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
fsm.ShowTxtQuestion(2, 3, 0, () =>
|
||||
fsm.ShowTxtQuestion("测量导尿管》测量方法》步骤1",2, 0, 3, () =>
|
||||
{
|
||||
niaoDaoKou_Btn = GameManager.Instance.transform.FindFirst<Button>("尿道口按钮");
|
||||
niaoDaoKou_Btn.onClick.RemoveAllListeners();
|
||||
|
||||
@ -65,7 +65,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
}
|
||||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||||
{
|
||||
fsm.ShowTxtQuestion(3, 3, 5, () =>
|
||||
fsm.ShowTxtQuestion("²åÈëµ¼Äò¹Ü¡·²å¹Ü¡·²½Öè2",3, 5, 3, () =>
|
||||
{
|
||||
fsm.nextState = true;
|
||||
});
|
||||
|
||||
@ -18,6 +18,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
rightImg = transform.FindFirst<Image>("Right");
|
||||
falseImg = transform.FindFirst<Image>("False");
|
||||
toggle.onValueChanged.AddListener(OnValueChanged);
|
||||
transform.name = transform.FindFirst<Text>("Num").text;
|
||||
}
|
||||
public void SetRightColor()
|
||||
{
|
||||
|
||||
@ -2,6 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using ZXKFramework;
|
||||
namespace DongWuYiXue.DaoNiaoShu
|
||||
{
|
||||
public class TxtSelectManager : MonoBehaviour
|
||||
@ -48,5 +49,19 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
if (array1.Length != array2.Length) return false; // 如果长度不同,返回false
|
||||
return array1.SequenceEqual(array2); // 使用SequenceEqual判断内容是否完全相同
|
||||
}
|
||||
public string GetYourAnswer()
|
||||
{
|
||||
TxtOption[] yourSelect = txtOptions.ToList().FindAll(e => e.isSelect == true).ToArray();
|
||||
string str = "";
|
||||
for (int i = 0; i < yourSelect.Length; i++)
|
||||
{
|
||||
str += yourSelect[i].name;
|
||||
}
|
||||
if(string.IsNullOrEmpty(str))
|
||||
{
|
||||
return "¿Õ";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -14,6 +14,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
Button nextBtn;
|
||||
Button subBtn;
|
||||
int id;
|
||||
string stepName;
|
||||
public override void Init(IUIManager uictrl)
|
||||
{
|
||||
base.Init(uictrl);
|
||||
@ -28,26 +29,36 @@ namespace DongWuYiXue.DaoNiaoShu
|
||||
if (txtSelectManagers[id].Check())
|
||||
{
|
||||
subAction?.Invoke(true);
|
||||
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
||||
}
|
||||
else
|
||||
{
|
||||
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = false });
|
||||
if (MVC.GetModel<Main.GameModel>().modeType == ModeType.ShiXun)
|
||||
{
|
||||
ChatUI.Instance.SendAI("用户位于:" + stepName + ",用户的作答为:" + txtSelectManagers[id].GetYourAnswer() + ",请对用户的作答进行解析,并介绍本步骤正确答案和意义,字数控制在100字以内。", null);
|
||||
}
|
||||
else
|
||||
{
|
||||
subAction?.Invoke(false);
|
||||
}
|
||||
}
|
||||
subBtn.gameObject.SetActive(false);
|
||||
nextBtn.gameObject.SetActive(true);
|
||||
}
|
||||
private void Next()
|
||||
{
|
||||
ChatUI.Instance.CloseChatTxt();
|
||||
SetActive(false);
|
||||
subBtn.gameObject.SetActive(true);
|
||||
nextBtn.gameObject.SetActive(false);
|
||||
nextAction?.Invoke();
|
||||
}
|
||||
public void ShowImgQuestion(int id)
|
||||
public void ShowImgQuestion(int id, string stepName)
|
||||
{
|
||||
SetActive(true);
|
||||
subBtn.gameObject.SetActive(true);
|
||||
this.id = id;
|
||||
this.stepName = stepName;
|
||||
for (int i = 0; i < txtSelectManagers.Length; i++)
|
||||
{
|
||||
if (i == id)
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user