框架上传
This commit is contained in:
21
Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs
Normal file
21
Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user