Last active
August 29, 2015 14:25
-
-
Save timsgardner/10da9d05c4923ed06efb to your computer and use it in GitHub Desktop.
mappy late-bound component logic idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcomponent ProtagonistDriver [logic] | |
(Update [this] | |
(when-let [f (:update logic)] | |
(f this))) | |
(OnCollisionEnter [this that] | |
(when-let [f (:on-collision-enter logic)] | |
(f this that)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like this a lot. What would the updating API be like? I guess you could
but a more map/record like interface would be awesome. Like
The next question is where does state go? Is there a separate map? Do we just use fields?
I like where this is going.