Skip to content
This repository has been archived by the owner on Sep 16, 2018. It is now read-only.

Introduced a convenience function for creating patrolling NPCs #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Jan 22, 2015

I just noticed commit 90deeba and wondered whether a function like this would be useful.

Just a proposal for now, and untested.

It seems all patrolling NPCs need to be assigned to their patrol
instance and call block/unblock in their talk function. The new
NPCPatrol:create_npc function does both things.

npc = patrol:create_npc(talk, update)
@bjorn
Copy link
Member Author

bjorn commented Jan 22, 2015

Actually I think the talk and update functions could even be added as parameters to the NPCPatrol:new function, unless there is reason not to do this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants