LeedsJS/jackdaw

Get door to use a portal component

Closed this issue · 0 comments

When the player collides with the door they go to the next level.

There is code that exists in the specific level that makes this happen.

It would be good if it could be shifted out into a portal component that the door entity uses.

The portal component could listen for collisions.

If an entity collides with a portal it could be sent to the portals destination. (right now this will be another level name)

A portal could also require a key. If a key or keyName is specified on the entity that implements the portal then the portal would check if a colliding entity has the specified key before sending them to the destination.