using System.Collections;
using System.Collections.Generic;
using DefaultNamespace.ProcessMode;
using MotionFramework;
using UnityEditor.VersionControl;
using UnityEngine;

public class test : MonoBehaviour
{
    // Start is called before the first frame update
    async void Start()
    {
        await System.Threading.Tasks.Task.Delay(2000);
     
        HHHH();  
        await System.Threading.Tasks.Task.Delay(2000);
        
        // MotionEngine.GetModule<ProcessManager>().ResetProcess(System.IO.File.ReadAllText(   Application.streamingAssetsPath + "/DataConfig/新流程.json"),ProcessMode.Teaching);
        // MotionEngine.GetModule<ProcessManager>().HandleClick("草泥马123");
        // await System.Threading.Tasks.Task.Delay(2000);
        // MotionEngine.GetModule<ProcessManager>().CalculateTotalScore();

    }


    public void HHHH()
    {
        // MotionEngine.GetModule<ProcessManager>().JumpToProcessAsync(4,1);
        MotionEngine.GetModule<ProcessManager>().HandleClick("对象1");
        MotionEngine.GetModule<ProcessManager>().HandleClick("对象2");
        MotionEngine.GetModule<ProcessManager>().HandleClick("正确");
        MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>(){"1","2","3","4"});
        // MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>(){"3"});
        // MotionEngine.GetModule<ProcessManager>().HandleClick("2");
         MotionEngine.GetModule<ProcessManager>().CalculateTotalScore();
        // MotionEngine.GetModule<ProcessManager>().HandleClick("1");
        // MotionEngine.GetModule<ProcessManager>().HandleClick("2");
        // MotionEngine.GetModule<ProcessManager>().HandleClick("3");
    }

    // void Update()
    // {
    //     if (Input.GetMouseButtonDown(0)) // 0 表示鼠标左键
    //     {
    //         Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); // 从鼠标位置发射射线
    //     
    //         RaycastHit hit;
    //         if (Physics.Raycast(ray, out hit))
    //         {
    //             Debug.Log("击中物体: " + hit.collider.name);
    //
    //             MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(hit.collider.name);
    //         }
    //     }
    // }
}
