pass a UI to NAT entryProcessors

This commit is contained in:
2022-06-27 18:22:57 +00:00
parent 9f1e337069
commit 7e7053e132
13 changed files with 21 additions and 19 deletions

View File

@@ -9,7 +9,7 @@
(super
->[archive e]
?(and (tagsMatch archive e tagFilterString) (hasComponent e Images))
->[archive e]
->[archive e &opt ui]
(unless (sprites.exists e.id)
(when !(hasComponent e Positions)
(addComponent archive e Positions (new Map)))
@@ -21,7 +21,7 @@
(dictSet sprites e.id sprite))))
(set onRemoveEntry
->[archive e]
->[archive e &opt ui]
{
(.kill (dictGet sprites e.id))
(sprites.remove e.id)

View File

@@ -94,7 +94,7 @@
(prop &mut :EntrySpriteSystem spriteSystem)
(set spriteSystem (new EntrySpriteSystem "!done" "Playground-MAIN" this controller))
(archive.addSystem spriteSystem)
(archive.processSystems))
(archive.processSystems this))
(method &override :Void update [:Float elapsed]
(super.update elapsed)

View File

@@ -6,7 +6,7 @@
(super
->[archive e]
?(and !(hasComponent e Images) (hasComponent e Name))
->[archive e]
->[archive e &opt ui]
{
(let [name (readComponent e Name)
sprite (new FlxText 0 0 0 name 16)