49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using System.Collections;
|
|
using AibisDream.FixSystem;
|
|
using UnityEngine;
|
|
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()
|
|
{
|
|
Debug.LogWarning("打开引擎盖命令已废弃,请尽快删除");
|
|
yield break;
|
|
}
|
|
|
|
// 打开引擎盖
|
|
[YarnCommand("close_engine_cover")]
|
|
public static IEnumerator CloseEngineCover()
|
|
{
|
|
Debug.LogWarning("关闭引擎盖命令已废弃,请尽快删除");
|
|
yield break;
|
|
}
|
|
|
|
/// <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.isPullActive = true;
|
|
}
|
|
}
|
|
} |