|
79 | 79 | function meta:select(pat) |
80 | 80 | end |
81 | 81 |
|
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 | | - |
91 | 82 | ---Sync all then component of the eneity represent by a iter |
92 | 83 | ---@param iter number|ITER #ITER or entity id |
93 | 84 | ---@return table |
|
121 | 112 | function meta:update(tagname) |
122 | 113 | end |
123 | 114 |
|
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 | | - |
133 | 115 | local M = { |
134 | 116 | _MAXTYPE = 255, |
135 | 117 | _METHODS = meta, |
@@ -342,22 +324,15 @@ end |
342 | 324 | function meta:_object(ref, cv, index) |
343 | 325 | end |
344 | 326 |
|
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 | | - |
354 | 327 | ---@param pattern string |
355 | 328 | ---@param iter ITER |
356 | 329 | function meta:_read(pattern, iter) |
357 | 330 | end |
358 | 331 |
|
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 |
361 | 336 |
|
362 | 337 | ---@see ECSWorld:#first |
363 | 338 | function meta:_first(...) end |
|
0 commit comments