public void ReceiveCommand(int entityId, ECSDefine.SystemType systemType, BaseSystem.SystemExpandData expandData) { BaseCommand command = PopCommand(systemType); if (command != null) { command.FillIn(entityId, systemType, expandData); cacheCommandList.Add(command); } }
public void RequireCommand(int entityId, ECSDefine.SystemType systemType, BaseSystem.SystemExpandData expandData) { BaseCommand command = PopCommand(systemType); if (command != null) { command.FillIn(entityId, systemType, expandData); sendCommandList.Add(command); ExecuteSystemUnit.ExecuteSystem(entityId, systemType, expandData); } }
public List <BaseCommand> PopSendCommands() { List <BaseCommand> commands = new List <BaseCommand>(); for (int index = 0; index < sendCommandList.Count; index++) { BaseCommand command = sendCommandList[index]; ECSDefine.SystemType systemType = command.GetSystemType(); BaseCommand sendCommand = PopCommand(systemType); if (sendCommand != null) { sendCommand.FillIn(command.GetEntityId(), systemType, command.GetExpandData()); } PushCommand(systemType, command); } sendCommandList.Clear(); return(commands); }