This commit is contained in:
parent
8338b2dbc0
commit
e499103b4e
|
@ -16,19 +16,9 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
public class GameLauncher : MonoBehaviour
|
||||
{
|
||||
[Tooltip("在编辑器下模拟运行")]
|
||||
public bool SimulationOnEditor = true;
|
||||
|
||||
public string sceneName;
|
||||
void Awake()
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
SimulationOnEditor = false;
|
||||
#endif
|
||||
// 初始化控制台
|
||||
//if (Application.isEditor || Debug.isDebugBuild)
|
||||
// DeveloperConsole.Initialize();
|
||||
|
||||
// 初始化框架
|
||||
MotionEngine.Initialize(this, HandleMotionFrameworkLog);
|
||||
}
|
||||
|
@ -44,12 +34,6 @@ public class GameLauncher : MonoBehaviour
|
|||
// 更新框架
|
||||
MotionEngine.Update();
|
||||
}
|
||||
void OnGUI()
|
||||
{
|
||||
// 绘制控制台
|
||||
//if (Application.isEditor || Debug.isDebugBuild)
|
||||
// DeveloperConsole.Draw();
|
||||
}
|
||||
|
||||
private async void CreateGameModules()
|
||||
{
|
||||
|
|
|
@ -10,20 +10,20 @@ using UnityEngine;
|
|||
public class MessageManager : MonoBehaviour
|
||||
{
|
||||
public TMP_Text text;
|
||||
async void Start()
|
||||
{
|
||||
|
||||
async void Start()
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||
if ( MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Teaching || MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Assessment)
|
||||
if (MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Teaching || MotionEngine.GetModule<AnimationProcessManager>().GetProcessMode() == ProcessMode.Assessment)
|
||||
{
|
||||
this.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
MotionEngine.GetModule<AnimationProcessManager>().OnSendMessagePrompt += SendMessagePrompt;
|
||||
}
|
||||
|
||||
|
||||
private void SendMessagePrompt(string message)
|
||||
{
|
||||
text.text = message;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -38,6 +38,9 @@ namespace DefaultNamespace.ProcessMode
|
|||
public event CompleteEventHandler OnCompleteEvent;
|
||||
|
||||
public event UIEventHandler OnUIEvent;
|
||||
/// <summary>
|
||||
/// 右上角消息通知
|
||||
/// </summary>
|
||||
public event SendMessagePrompt OnSendMessagePrompt;
|
||||
|
||||
|
||||
|
@ -53,12 +56,6 @@ namespace DefaultNamespace.ProcessMode
|
|||
Enum.TryParse(type, true, out currentMode);
|
||||
}
|
||||
|
||||
public void ClearProcess()
|
||||
{
|
||||
processes.Clear();
|
||||
}
|
||||
|
||||
|
||||
public void AddStepToProcess(string type, AnimationStep step)
|
||||
{
|
||||
if (processes.ContainsKey(type))
|
||||
|
@ -556,6 +553,7 @@ namespace DefaultNamespace.ProcessMode
|
|||
actions.Add(new ActionWithDescription(targetObjects, action, actionData.Description, actionData.IsSequential, stepData.StepDescription));
|
||||
}
|
||||
|
||||
//通过接口获取分数数据
|
||||
// AnimationStep step = new AnimationStep(stepData.StepDescription, _sceneStepData.taskList[0].stepList[index].defaultScore, actions);
|
||||
AnimationStep step = new AnimationStep(stepData.StepDescription,stepData.Score , actions);
|
||||
index++;
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace.ProcessMode
|
||||
{
|
||||
public class IncorrectClick
|
||||
{
|
||||
public GameObject ClickedObject { get; set; }
|
||||
public int StepIndex { get; set; }
|
||||
public int ActionIndex { get; set; } // 新增:动作索引
|
||||
|
||||
public IncorrectClick(GameObject clickedObject, int stepIndex, int actionIndex)
|
||||
{
|
||||
ClickedObject = clickedObject;
|
||||
StepIndex = stepIndex;
|
||||
ActionIndex = actionIndex;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e49a83ec6ff240d38d3b702d006793b2
|
||||
timeCreated: 1718155453
|
|
@ -1,85 +0,0 @@
|
|||
// using UnityEngine;
|
||||
// using UnityEngine.UI;
|
||||
//
|
||||
// namespace DefaultNamespace.ProcessMode
|
||||
// {
|
||||
// public class ProcessUIManager : MonoBehaviour
|
||||
// {
|
||||
// public Text trainingTextBox; // 培训模式的文本框
|
||||
// public Text practiceTextBox; // 练习模式的文本框
|
||||
// public GameObject highlightObject; // 高亮对象,用于教学模式
|
||||
//
|
||||
// public AnimationProcessManager processManager; // 流程管理器实例
|
||||
//
|
||||
// private void Start()
|
||||
// {
|
||||
// processManager = new AnimationProcessManager(); // 传递UIManager实例
|
||||
// }
|
||||
//
|
||||
// private void Update()
|
||||
// {
|
||||
// if (Input.GetMouseButtonDown(0))
|
||||
// {
|
||||
// GameObject clickedObject = DetectClickedObject();
|
||||
// if (clickedObject != null)
|
||||
// {
|
||||
// processManager.HandleClick(clickedObject);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 检测点击的对象
|
||||
// /// </summary>
|
||||
// /// <returns>点击的对象</returns>
|
||||
// private GameObject DetectClickedObject()
|
||||
// {
|
||||
// Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
// RaycastHit hit;
|
||||
// if (Physics.Raycast(ray, out hit))
|
||||
// {
|
||||
// return hit.collider.gameObject;
|
||||
// }
|
||||
//
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 显示培训步骤信息
|
||||
// /// </summary>
|
||||
// /// <param name="step">当前步骤</param>
|
||||
// public void ShowTrainingStep(AnimationStep step)
|
||||
// {
|
||||
// if (trainingTextBox != null)
|
||||
// {
|
||||
// trainingTextBox.text = step.Description;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 显示练习步骤信息
|
||||
// /// </summary>
|
||||
// /// <param name="step">当前步骤</param>
|
||||
// public void ShowPracticeStep(AnimationStep step)
|
||||
// {
|
||||
// if (practiceTextBox != null)
|
||||
// {
|
||||
// practiceTextBox.text = step.Description;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 高亮显示下一个需要点击的地方(教学模式)
|
||||
// /// </summary>
|
||||
// /// <param name="step">当前步骤</param>
|
||||
// public void HighlightNextStep(AnimationStep step)
|
||||
// {
|
||||
// if (highlightObject != null)
|
||||
// {
|
||||
// highlightObject.SetActive(true);
|
||||
// // 假设你有一个方法来定位高亮对象
|
||||
// // highlightObject.transform.position = ...;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7ebad6a729d44621873e93e1cd6f2b60
|
||||
timeCreated: 1717742043
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace.ProcessMode
|
||||
{
|
||||
[ScriptDescription("场景的流程启动器")]
|
||||
public class SceneProcessLauncher : MonoBehaviour
|
||||
{
|
||||
private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 51f73ee94f284a86b677a6bc74544094
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue