Closed oponder closed 8 years ago
_experimental _
Collidable now exposes a stream which can be used to handle collisions between objects in a functional reactive programmy way.
much wip. Still needs more clean up. buggy but funny
Allows for stuff like this:
function isMario(collision) { return (collision.entity.name == "MARIO"); } function cameFromAbove(collision) { return (collision.direction == "above"); } this.collisionStream.filter(isMario).filter(cameFromAbove).onValue(() => { console.log("I got hit from above by Mario!"); };
Now we're thinking with portals functions
noice
Going to close this for now, and revisit the concept at a later date.
_experimental _
Collidable now exposes a stream which can be used to handle collisions between objects in a functional reactive programmy way.
much wip. Still needs more clean up. buggy but funny
Allows for stuff like this:
Now we're thinking with
portalsfunctions