Files
plugin-library/Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs
2025-03-31 11:16:52 +08:00

21 lines
541 B
C#

using UnityEngine;
namespace Stary.Evo
{
public interface ICanSendCommand: IBelongToArchitecture
{
}
public static class CanSendCommandExtension
{
public static void SendCommand<T>(this ICanSendCommand self) where T :class, ICommand, new()
{
self.GetArchitecture().SendCommand<T>();
}
public static void SendCommand<T>(this ICanSendCommand self,T command) where T : ICommand
{
self.GetArchitecture().SendCommand<T>(command);
}
}
}