示例#1
0
    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);
        }
    }
示例#2
0
    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);
        }
    }
示例#3
0
    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);
    }