框架上传
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICommand : IBelongToArchitecture,ICanSetArchitecture,ICanGetSystem,ICanGetData,ICanGetUtility,ICanSendCommand,ICanSendEvent, ICanSendQuery
|
||||
{
|
||||
void Execute();
|
||||
}
|
||||
|
||||
public abstract class AbstractCommand : ICommand
|
||||
{
|
||||
private IArchitecture mArchitecture;
|
||||
|
||||
IArchitecture IBelongToArchitecture.GetArchitecture()
|
||||
{
|
||||
return mArchitecture;
|
||||
}
|
||||
|
||||
void ICanSetArchitecture.SetArchitecture(IArchitecture architecture)
|
||||
{
|
||||
mArchitecture = architecture;
|
||||
|
||||
}
|
||||
|
||||
void ICommand.Execute()
|
||||
{
|
||||
OnExecute();
|
||||
}
|
||||
|
||||
protected abstract void OnExecute();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user