最新修改提交

This commit is contained in:
高铎 2025-09-28 15:59:02 +08:00
parent ca656cc960
commit 038d8735fb
11 changed files with 218 additions and 43 deletions

View File

@ -618,12 +618,118 @@ MonoBehaviour:
- {fileID: -4415988120714926337} - {fileID: -4415988120714926337}
- {fileID: -304499637217331559} - {fileID: -304499637217331559}
- {fileID: 8387026910049780223} - {fileID: 8387026910049780223}
- {fileID: 1817393580930511363}
m_FixedDuration: 0 m_FixedDuration: 0
m_EditorSettings: m_EditorSettings:
m_Framerate: 60 m_Framerate: 60
m_ScenePreview: 1 m_ScenePreview: 1
m_DurationMode: 0 m_DurationMode: 0
m_MarkerTrack: {fileID: 0} m_MarkerTrack: {fileID: 0}
--- !u!114 &746876422758225837
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fde0d25a170598d46a0b9dc16b4527a5, type: 3}
m_Name: ActivationPlayableAsset
m_EditorClassIdentifier:
--- !u!114 &1817393580930511363
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 21bf7f712d84d26478ebe6a299f21738, type: 3}
m_Name: Activation Track (2)
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips:
- m_Version: 1
m_Start: 1
m_ClipIn: 0
m_Asset: {fileID: 746876422758225837}
m_Duration: 6.708333333333335
m_TimeScale: 1
m_ParentTrack: {fileID: 1817393580930511363}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: 0
m_BlendOutDuration: 0
m_MixInCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_MixOutCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_BlendInCurveMode: 0
m_BlendOutCurveMode: 0
m_ExposedParameterNames: []
m_AnimationCurves: {fileID: 0}
m_Recordable: 0
m_PostExtrapolationMode: 0
m_PreExtrapolationMode: 0
m_PostExtrapolationTime: 0
m_PreExtrapolationTime: 0
m_DisplayName: Active
m_Markers:
m_Objects: []
m_PostPlaybackState: 3
--- !u!114 &3170496518164281449 --- !u!114 &3170496518164281449
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1

View File

@ -72598,6 +72598,8 @@ PlayableDirector:
value: {fileID: 1631532823} value: {fileID: 1631532823}
- key: {fileID: 8387026910049780223, guid: 7673c770b56d14045bb43ddb3c306327, type: 2} - key: {fileID: 8387026910049780223, guid: 7673c770b56d14045bb43ddb3c306327, type: 2}
value: {fileID: 1631532822} value: {fileID: 1631532822}
- key: {fileID: 1817393580930511363, guid: 7673c770b56d14045bb43ddb3c306327, type: 2}
value: {fileID: 96000086}
m_ExposedReferences: m_ExposedReferences:
m_References: [] m_References: []
--- !u!114 &745638600 --- !u!114 &745638600
@ -245403,7 +245405,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -20} m_AnchoredPosition: {x: 10, y: -20}
m_SizeDelta: {x: 100, y: 25} m_SizeDelta: {x: 123.3156, y: 25}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!1 &2445884765684690209 --- !u!1 &2445884765684690209
GameObject: GameObject:

View File

@ -317,30 +317,30 @@ namespace DongWuYiXue.DaoNiaoShu
}; };
} }
public void ShowImgQuestion(int id, int score, int scoreId, Action nextFun) //public void ShowImgQuestion(int id, int score, int scoreId, Action nextFun)
{ //{
ImgSelectQuestionPanel imgSelectQuestionPanel = GameManager.Instance.uiManager.GetUI<ImgSelectQuestionPanel>(); // ImgSelectQuestionPanel imgSelectQuestionPanel = GameManager.Instance.uiManager.GetUI<ImgSelectQuestionPanel>();
imgSelectQuestionPanel.ShowImgQuestion(id); // imgSelectQuestionPanel.ShowImgQuestion(id);
imgSelectQuestionPanel.nextAction = nextFun; // imgSelectQuestionPanel.nextAction = nextFun;
imgSelectQuestionPanel.subAction = isTrue => // imgSelectQuestionPanel.subAction = isTrue =>
{ // {
//if (main_gameModel.modeType == ModeType.KaoHe) // //if (main_gameModel.modeType == ModeType.KaoHe)
//{ // //{
if (isTrue) // if (isTrue)
{ // {
AddScore(score, scoreId); // AddScore(score, scoreId);
} // }
else // else
{ // {
AddScore(0, scoreId); // AddScore(0, scoreId);
} // }
//} // //}
//else // //else
//{ // //{
// Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = isTrue }); // // Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = isTrue });
//} // //}
}; // };
} //}
//public void ShowDragQuestion(int id, int score, int scoreId, Action nextFun) //public void ShowDragQuestion(int id, int score, int scoreId, Action nextFun)
//{ //{
// DragQuestionPanel dragQuestionPanel = GameManager.Instance.uiManager.GetUI<DragQuestionPanel>(); // DragQuestionPanel dragQuestionPanel = GameManager.Instance.uiManager.GetUI<DragQuestionPanel>();
@ -359,6 +359,27 @@ namespace DongWuYiXue.DaoNiaoShu
// }; // };
//} //}
public void ShowImgQuestion(string stepName, int id, int score, int scoreId, Action nextFun)
{
ImgSelectQuestionPanel imgSelectQuestionPanel = GameManager.Instance.uiManager.GetUI<ImgSelectQuestionPanel>();
imgSelectQuestionPanel.ShowImgQuestion(id, stepName);
imgSelectQuestionPanel.nextAction = nextFun;
imgSelectQuestionPanel.subAction = isTrue =>
{
if (isTrue)
{
GameManager.Instance.kaoheManager.AddScore(score, scoreId, (s, t) => {
GameManager.Instance.uiManager.GetUI<ScorePanel>().SetScore(s.ToString(), t.ToString());
});
}
else
{
GameManager.Instance.kaoheManager.AddScore(0, scoreId, null);
}
};
}
public void ShowDragQuestion(string stepName, int id, int scoreId, int score, Action nextFun) public void ShowDragQuestion(string stepName, int id, int scoreId, int score, Action nextFun)
{ {
DragQuestionPanel dragQuestionPanel = GameManager.Instance.uiManager.GetUI<DragQuestionPanel>(); DragQuestionPanel dragQuestionPanel = GameManager.Instance.uiManager.GetUI<DragQuestionPanel>();

View File

@ -58,7 +58,7 @@ namespace DongWuYiXue.DaoNiaoShu
avPro.PlayVideo("daoNiaoShu/Videos/开头动画.mp4", () => avPro.PlayVideo("daoNiaoShu/Videos/开头动画.mp4", () =>
{ {
GameManager.Instance.transform.FindFirst("初始动画").gameObject.SetActive(false); GameManager.Instance.transform.FindFirst("初始动画").gameObject.SetActive(false);
fsm.ShowTip(0); //fsm.ShowTip(0);
if (fsm.main_gameModel.modeType == ModeType.ShiXun) if (fsm.main_gameModel.modeType == ModeType.ShiXun)
{ {
fsm.nextState = true; fsm.nextState = true;

View File

@ -23,7 +23,7 @@ namespace DongWuYiXue.DaoNiaoShu
cor = Game.Instance.IEnumeratorManager.Run(3.0f, () => cor = Game.Instance.IEnumeratorManager.Run(3.0f, () =>
{ {
isChaGuan = true; isChaGuan = true;
avProValue.gameObject.SetActive(true); //avProValue.gameObject.SetActive(true);
}); });
} }
public override void OnStateStay() public override void OnStateStay()

View File

@ -11,14 +11,14 @@ namespace DongWuYiXue.DaoNiaoShu
fsm.ShowCamera("WuPinZhunBei_Camera"); fsm.ShowCamera("WuPinZhunBei_Camera");
if (fsm.main_gameModel.modeType == ModeType.ShiXun) if (fsm.main_gameModel.modeType == ModeType.ShiXun)
{ {
fsm.ShowImgQuestion(0, 3, 0, () => fsm.ShowImgQuestion("操作前准备》物品准备", 0, 3, 0, () =>
{ {
fsm.nextState = true; fsm.nextState = true;
}); });
} }
if (fsm.main_gameModel.modeType == ModeType.KaoHe) if (fsm.main_gameModel.modeType == ModeType.KaoHe)
{ {
fsm.ShowImgQuestion(0, 3, 0, () => fsm.ShowImgQuestion("操作前准备》物品准备", 0, 3, 0, () =>
{ {
fsm.nextState = true; fsm.nextState = true;
}); });

View File

@ -15,6 +15,9 @@ namespace DongWuYiXue.DaoNiaoShu
Button subBtn; Button subBtn;
Button resetBtn; Button resetBtn;
int id; int id;
string stepName;
public override void Init(IUIManager uictrl) public override void Init(IUIManager uictrl)
{ {
base.Init(uictrl); base.Init(uictrl);
@ -32,11 +35,20 @@ namespace DongWuYiXue.DaoNiaoShu
if (imgSelectManagers[id].Check()) if (imgSelectManagers[id].Check())
{ {
subAction?.Invoke(true); subAction?.Invoke(true);
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
} }
else else
{ {
subAction?.Invoke(false); //subAction?.Invoke(false);
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = false });
if (MVC.GetModel<Main.GameModel>().modeType == ModeType.ShiXun)
{
ChatUI.Instance.SendAI("用户位于:" + stepName + ",用户的作答为:" + imgSelectManagers[id].GetYourAnswer() + ",请对用户的作答进行解析,并介绍本步骤正确答案和意义,字数控制在100字以内。", null);
}
else
{
subAction?.Invoke(false);
}
} }
subBtn.interactable = false; subBtn.interactable = false;
resetBtn.interactable = false; resetBtn.interactable = false;
@ -44,6 +56,7 @@ namespace DongWuYiXue.DaoNiaoShu
} }
private void Next() private void Next()
{ {
ChatUI.Instance.CloseChatTxt();
SetActive(false); SetActive(false);
subBtn.interactable = true; subBtn.interactable = true;
resetBtn.interactable = true; resetBtn.interactable = true;
@ -64,13 +77,14 @@ namespace DongWuYiXue.DaoNiaoShu
} }
} }
} }
public void ShowImgQuestion(int id) public void ShowImgQuestion(int id,string stepName)
{ {
SetActive(true); SetActive(true);
nextBtn.gameObject.SetActive(false); nextBtn.gameObject.SetActive(false);
subBtn.interactable = true; subBtn.interactable = true;
resetBtn.interactable = true; resetBtn.interactable = true;
this.id = id; this.id = id;
this.stepName = stepName;
for (int i = 0; i < imgSelectManagers.Length; i++) for (int i = 0; i < imgSelectManagers.Length; i++)
{ {
if (i == id) if (i == id)

View File

@ -9,7 +9,7 @@ using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using ZXKFramework; using ZXKFramework;
using static System.Net.Mime.MediaTypeNames; using static System.Net.Mime.MediaTypeNames;
namespace DongWuYiXue.DaoNiaoShu namespace DongWuYiXue.DaoNiaoShu
{ {
public class TipPanel : UIBase public class TipPanel : UIBase
{ {
@ -25,6 +25,8 @@ namespace DongWuYiXue.DaoNiaoShu
Button downBtn; Button downBtn;
ScrollRect scrollRect; ScrollRect scrollRect;
Coroutine coroutine; Coroutine coroutine;
float hei;
public override void Init(IUIManager uictrl) public override void Init(IUIManager uictrl)
{ {
base.Init(uictrl); base.Init(uictrl);
@ -32,6 +34,7 @@ namespace DongWuYiXue.DaoNiaoShu
upBtn = transform.FindFirst<Button>("upBtn"); upBtn = transform.FindFirst<Button>("upBtn");
downBtn = transform.FindFirst<Button>("downBtn"); downBtn = transform.FindFirst<Button>("downBtn");
scrollRect = transform.FindFirst<ScrollRect>("Scroll View"); scrollRect = transform.FindFirst<ScrollRect>("Scroll View");
upBtn.onClick.AddListener(MoveUp); upBtn.onClick.AddListener(MoveUp);
downBtn.onClick.AddListener(MoveDown); downBtn.onClick.AddListener(MoveDown);
} }
@ -44,6 +47,7 @@ namespace DongWuYiXue.DaoNiaoShu
public void ShowTip(int i) public void ShowTip(int i)
{ {
SetActive(true); SetActive(true);
Game.Instance.IEnumeratorManager.Stop(coroutine); Game.Instance.IEnumeratorManager.Stop(coroutine);
tip.text = str[i].Replace("<br>", "\n"); tip.text = str[i].Replace("<br>", "\n");
//Debug.Log(Regex.Replace(Regex.Replace(tip.text, @"<color=[^>]*>", ""), @"</color>", "").Length + "==" + (Regex.Replace(Regex.Replace(tip.text, @"<color=[^>]*>", ""), @"</color>", "").Length + 70 - 1) / 70); //Debug.Log(Regex.Replace(Regex.Replace(tip.text, @"<color=[^>]*>", ""), @"</color>", "").Length + "==" + (Regex.Replace(Regex.Replace(tip.text, @"<color=[^>]*>", ""), @"</color>", "").Length + 70 - 1) / 70);
@ -51,6 +55,8 @@ namespace DongWuYiXue.DaoNiaoShu
//{ //{
// coroutine = Game.Instance.IEnumeratorManager.Run(Scroll((int)(scrollRect.content.rect.height + 56 - 1) / 56)); // coroutine = Game.Instance.IEnumeratorManager.Run(Scroll((int)(scrollRect.content.rect.height + 56 - 1) / 56));
//} //}
scrollRect.normalizedPosition = new Vector2(0, 1);
hei = scrollRect.content.rect.height;
container.position = p1.position; container.position = p1.position;
coroutine = Game.Instance.IEnumeratorManager.Run(Scroll()); coroutine = Game.Instance.IEnumeratorManager.Run(Scroll());
} }
@ -79,18 +85,44 @@ namespace DongWuYiXue.DaoNiaoShu
} }
IEnumerator Scroll() IEnumerator Scroll()
{ {
scrollRect.normalizedPosition = new Vector2(0, 1); //scrollRect.normalizedPosition = new Vector2(0, 1);
yield return new WaitForSeconds(1); yield return new WaitForSeconds(1);
//Debug.Log(scrollRect.content.rect.height); //Debug.Log(scrollRect.content.rect.height)
if (scrollRect.content.rect.height > 57) //if (scrollRect.content.rect.height > 57)
//{
// int i = (int)(scrollRect.content.rect.height + 56 - 1) / 56;
// for (int j = 0; j < i; j++)
// {
// //Debug.Log((int)scrollRect.normalizedPosition.y);
// if ((int)scrollRect.normalizedPosition.y == 0) yield break;
// yield return new WaitForSeconds(13f);
// scrollRect.normalizedPosition -= new Vector2(0, 1 - (1 / i));
// }
//}
//--------------------------------------------------------------------Ð޸ĺó-----------------------------------------
if (scrollRect.content.rect.height > 80)
{ {
int i = (int)(scrollRect.content.rect.height + 56 - 1) / 56; if (scrollRect.normalizedPosition.y > 0)
for (int j = 0; j < i; j++)
{ {
//Debug.Log((int)scrollRect.normalizedPosition.y); yield return new WaitForSeconds(17.0f);
if ((int)scrollRect.normalizedPosition.y == 0) yield break; float y = (hei - 80) / scrollRect.content.rect.height;
yield return new WaitForSeconds(13f); hei -= 80;
scrollRect.normalizedPosition -= new Vector2(0, 1 - (1 / i)); if (hei <= 80 && hei > 0)
{
hei = 80;
}
scrollRect.normalizedPosition = new Vector2(0, y);
if (null != coroutine)
{
Game.Instance.IEnumeratorManager.Stop(coroutine);
coroutine = null;
}
coroutine = Game.Instance.IEnumeratorManager.Run(Scroll());
}
else
{
Game.Instance.IEnumeratorManager.Stop(coroutine);
} }
} }
} }

View File

@ -115,7 +115,7 @@ Material:
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueOffset: 0 - _QueueOffset: 0
- _ReceiveShadows: 1 - _ReceiveShadows: 1
- _Smoothness: 0.8 - _Smoothness: 0.25
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1