Associates values to the entities in screen-object that match the supplied function. Returns the entities that were changed.
(e! :player? main-screen :health 10)
Source
(defn e!
[filter-fn screen-object & args]
(swap! (:entities screen-object)
(fn [entities]
(vec (for [e entities]
(if (filter-fn e)
(apply assoc e args)
e)))))
(e filter-fn screen-object))