46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using System.Collections;
|
|
using AibisDream.FixSystem;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public static class EngineYarnCommand
|
|
{
|
|
private static EngineSystem EngineSystem => FixSystemCenter.SystemDic.Get<EngineSystem>();
|
|
|
|
// 打开引擎盖
|
|
[YarnCommand("open_engine_cover")]
|
|
public static IEnumerator OpenEngineCover()
|
|
{
|
|
yield return EngineSystem.OpenCover();
|
|
}
|
|
|
|
// 打开引擎盖
|
|
[YarnCommand("close_engine_cover")]
|
|
public static IEnumerator CloseEngineCover()
|
|
{
|
|
yield return EngineSystem.CloseCover();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 踩油门
|
|
/// </summary>
|
|
/// <param name="targetSpeed">目标速度</param>
|
|
/// <param name="duration">用时</param>
|
|
/// <returns>协程</returns>
|
|
[YarnCommand("step_on_gas")]
|
|
public static IEnumerator StepOnGas(float targetSpeed, float duration)
|
|
{
|
|
return EngineSystem.StepOnGas(targetSpeed, duration);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 激活拉绳
|
|
/// </summary>
|
|
[YarnCommand("active_engine_pull")]
|
|
public static void ActivePull()
|
|
{
|
|
EngineSystem.ActivePull();
|
|
}
|
|
}
|
|
} |