29 lines
850 B
C#
29 lines
850 B
C#
using System;
|
|
using System.Collections;
|
|
using UnityEngine;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream.FixSystem
|
|
{
|
|
public static class FixSystemYarnCommand
|
|
{
|
|
[YarnCommand("switch_fix_system_to")]
|
|
public static IEnumerator SwitchFixSystemTo(string targetStateStr, string extraArg = "")
|
|
{
|
|
// 字符串转枚举
|
|
if (!Enum.TryParse<FixState>(targetStateStr, out var targetState))
|
|
{
|
|
Debug.Log($"{targetStateStr}不在FixState枚举中");
|
|
yield break;
|
|
}
|
|
|
|
yield return FixSystemCenter.StateMachine.SwitchState(targetState, extraArg);
|
|
}
|
|
|
|
[YarnCommand("play_clinic_cut")]
|
|
public static IEnumerator PlayClinicCut()
|
|
{
|
|
yield return FixSystemCenter.StateMachine.PlayClinicCut();
|
|
}
|
|
}
|
|
} |