Updated project to luxe 2025.11.1
This commit is contained in:
@ -29,7 +29,16 @@ class Modifier {
|
||||
editor_tick(delta: Num) : None {}
|
||||
|
||||
get(entity: Entity) : Data { Mod.get(entity, Modifier.id) }
|
||||
each(fn: Fn) {
|
||||
|
||||
list() : List {
|
||||
var list = []
|
||||
each {|entity: Entity, unused|
|
||||
list.add(entity)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
each(fn: Fn) : None {
|
||||
var count = attached_count
|
||||
for(idx in 0 ... count) {
|
||||
var inst = Block.get_at(_block, idx)
|
||||
@ -38,7 +47,8 @@ class Modifier {
|
||||
fn.call(entity, data)
|
||||
}
|
||||
}
|
||||
each(start: Num, count: Num, fn: Fn) {
|
||||
|
||||
each(start: Num, count: Num, fn: Fn) : None {
|
||||
for(idx in start ... start + count) {
|
||||
var inst = Block.get_at(_block, idx)
|
||||
var data = Block.instance(_block, inst)
|
||||
@ -58,6 +68,7 @@ class API {
|
||||
static system(entity: Entity) : System { World.get_system(Entity.get_world(entity), Modifier.id) }
|
||||
static count(world: World) : Num { system_in(world).attached_count }
|
||||
static each(world: World, fn: Fn) : System { system_in(world).each(fn) }
|
||||
static with(world: World) : List { system_in(world).list() }
|
||||
static get : APIGet { APIGetter }
|
||||
static set : APISet { APISetter }
|
||||
static connect : APIWireConnect { APIWireConnects }
|
||||
|
||||
Reference in New Issue
Block a user