Skip to content

Commit 3f17721

Browse files
committed
remove api sync, singleton
1 parent 51bd416 commit 3f17721

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

meta/3rd/luaecs/library/ecs.lua

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,6 @@ end
7979
function meta:select(pat)
8080
end
8181

82-
---Sync C memory data to the iter which contains the index id and component id by then pattern the entity meet.
83-
---Read component with in, and write component to C which with out.
84-
---This is a additional featur, we use select most times.
85-
---@param pat string #pattern whcih the iter specified entity meet.
86-
---@param iter ITER # {pool index, cid}
87-
---@see ECSWorld#_sync
88-
function meta:sync(pat, iter)
89-
end
90-
9182
---Sync all then component of the eneity represent by a iter
9283
---@param iter number|ITER #ITER or entity id
9384
---@return table
@@ -121,15 +112,6 @@ end
121112
function meta:update(tagname)
122113
end
123114

124-
---Select a singleton component. Singleton component only hava a instance, the pool index is 1.
125-
---`pattern` and `iter` must gived or not the same time.
126-
---@param name string Component name
127-
---@param pattern? string #key [opt inout] , opt is : or ?, inout is in, out, update, like t:in, b:out, id?update. **Used to select other component into the Singleton Component.
128-
---@param iter? table # when give, is update and return it.
129-
---@return table {1, cid, component...}
130-
function meta:singleton(name, pattern, iter)
131-
end
132-
133115
local M = {
134116
_MAXTYPE = 255,
135117
_METHODS = meta,
@@ -342,22 +324,15 @@ end
342324
function meta:_object(ref, cv, index)
343325
end
344326

345-
---C API
346-
---Sync data from iter to C memory.
347-
---@param iter userdata #iter function
348-
---@param t ITER
349-
---@return table
350-
---@see ECSWorld#sync
351-
function meta:_sync(iter, t)
352-
end
353-
354327
---@param pattern string
355328
---@param iter ITER
356329
function meta:_read(pattern, iter)
357330
end
358331

359-
---No use
360-
function meta:submit(...) end
332+
---C API
333+
---Commit an mod of a group iter with out or new
334+
---@param iter ITER
335+
function meta:submit(iter) end
361336

362337
---@see ECSWorld:#first
363338
function meta:_first(...) end

0 commit comments

Comments
 (0)