NAT playground run systems when changes are made
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
->[archive e]
|
->[archive e]
|
||||||
?(and (tagsMatch archive e tagFilterString) (hasComponent e Images))
|
?(and (tagsMatch archive e tagFilterString) (hasComponent e Images))
|
||||||
->[archive e]
|
->[archive e]
|
||||||
{
|
(unless (sprites.exists e.id)
|
||||||
(when !(hasComponent e Positions)
|
(when !(hasComponent e Positions)
|
||||||
(addComponent archive e Positions (new Map)))
|
(addComponent archive e Positions (new Map)))
|
||||||
(withWritableComponents archive e [positions Positions]
|
(withWritableComponents archive e [positions Positions]
|
||||||
@@ -18,8 +18,7 @@
|
|||||||
(dictSet positions positionKey (object x 0.0 y 0.0 z 0.0))))
|
(dictSet positions positionKey (object x 0.0 y 0.0 z 0.0))))
|
||||||
(let [sprite (new EntrySprite positionKey archive e controller)]
|
(let [sprite (new EntrySprite positionKey archive e controller)]
|
||||||
(playState.entryGroup.add sprite)
|
(playState.entryGroup.add sprite)
|
||||||
(dictSet sprites e.id sprite))
|
(dictSet sprites e.id sprite))))
|
||||||
})
|
|
||||||
|
|
||||||
(set onRemoveEntry
|
(set onRemoveEntry
|
||||||
->[archive e]
|
->[archive e]
|
||||||
|
|||||||
@@ -169,7 +169,8 @@
|
|||||||
|
|
||||||
(method handleChanges [:Archive archive :ChangeSet changeSet]
|
(method handleChanges [:Archive archive :ChangeSet changeSet]
|
||||||
(doFor e changeSet
|
(doFor e changeSet
|
||||||
// TODO process the WikipediaImageSystem and run spriteSystem process on newly created entries that get one
|
// process the WikipediaImageSystem and run spriteSystem process on newly created entries that get one
|
||||||
|
(archive.processSystems)
|
||||||
|
|
||||||
// Entries whose data changed to remove them from the sprite pool will already have been removed
|
// Entries whose data changed to remove them from the sprite pool will already have been removed
|
||||||
// by refreshEntry()
|
// by refreshEntry()
|
||||||
|
|||||||
Reference in New Issue
Block a user