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();
    }
}