| 12345678910111213141516171819202122 |
- --[[
- ECS System class
- @author : Eiyeron Fulmincendii
- A System (also seen as Processor) is an object or function that'll check for every entities that has its required Components
- and processes routines with them, such as rendering sprites for every entities that has related components (like Sprite, Transform, etc...)
- ]]--
- local class = require("class")
- local object = require("object")
- local __sid = 0
- local system = class(object)
- local function make_system(...)
- local s = class(system, ...)
- __sid = __sid + 1
- -- System Unique ID, if you don't want to break everything, you should avoid editing this value.
- s.__sid = __sid
- return s
- end
- return make_system
|