38 lines
997 B
C#
38 lines
997 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DefaultNamespace.ProcessMode;
|
|
using Framework.Manager;
|
|
using MotionFramework;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class PanelTaskPromptComponent : MonoBehaviour
|
|
{
|
|
private Button _button;
|
|
private void Awake()
|
|
{
|
|
_button=this.GetComponent<Button>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
// 确保按钮引用有效
|
|
if (_button == null)
|
|
{
|
|
Debug.LogWarning("PanelTaskPromptComponent: Button reference is null");
|
|
return;
|
|
}
|
|
|
|
_button.onClick.AddListener(delegate
|
|
{
|
|
// 确保 ProcessManager 存在且当前模式匹配
|
|
var processManager = MotionEngine.GetModule<ProcessManager>();
|
|
if (processManager != null && processManager._currentMode == ProcessMode.教学模式)
|
|
{
|
|
TutorialGuideManager.Instance?.TriggerNextGuide();
|
|
}
|
|
});
|
|
}
|
|
}
|