46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using AibisDream.Framework;
|
|
using UnityEngine;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream.FixSystem
|
|
{
|
|
public static class FixYarnCommandEx
|
|
{
|
|
[YarnCommand("start_system")]
|
|
public static void StartSystem(string systemName, string dataKey)
|
|
{
|
|
switch (systemName)
|
|
{
|
|
case "BodyModuleSystem":
|
|
StartBodyModuleSystem(dataKey);
|
|
break;
|
|
case "GearSystem":
|
|
StartGearSystem(dataKey);
|
|
break;
|
|
case "EngineSystem":
|
|
StartGearSystem(dataKey);
|
|
break;
|
|
default:
|
|
Debug.Log($"该系统不存在: {systemName}");
|
|
break;
|
|
}
|
|
}
|
|
|
|
private static void StartBodyModuleSystem(string dataKey)
|
|
{
|
|
var bodySystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
|
bodySystem.CurDataKey = dataKey;
|
|
bodySystem.Load();
|
|
}
|
|
|
|
private static void StartGearSystem(string dataKey)
|
|
{
|
|
var gearSystem = FixSystemCenter.SystemDic.Get<GearSystem>();
|
|
}
|
|
|
|
private static void StartEngineSystem(string dataKey)
|
|
{
|
|
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
|
}
|
|
}
|
|
} |