Esempio n. 1
0
    public void RegSystem(int entityId, ECSDefine.SystemType systemType)
    {
        BaseEntity entity = ECSUnit.GetEntity(entityId);

        if (entity == null)
        {
            Debug.LogError($"[ECSModule] RegSystem Fail. Entity Is nil. entityId:{entityId}");
            return;
        }

        int        systemId = systemIdDistributionChunk.Pop();
        BaseSystem system   = CreateFunctionSystem(systemType, systemId);

        if (system == null)
        {
            return;
        }

        system.FillInExecute(entityId);
    }