3 Commits

Author SHA1 Message Date
Gary Tierney e5a6638e2f Add support for player / npc following
Implements a new MobExtension plugin which adds 'follow', and 'chase'
mixins that allow the mob to follow behind another mob, and chase them
while keeping at a safe distance to fire projectiles.  Also adds a new
public method 'raycast' to CollisionManager, for drawing a line through
the world using bresenham's line algorithm whille checking for any impenetrable
objects.
2017-01-02 04:11:13 +00:00
Gary Tierney baa12ca446 Add a mob extension plugin for walking to entities
Adds a new mob extension plugin which creates a walk_to() method on
Mobs to allow walking to another entity (accounting for the size of the
entity) with an optional facing position.
2017-01-02 03:39:02 +00:00
Gary Tierney b047d0197a Add a plugin which allows creating mixins for Mobs
Adds a mob-extension plugin, which allows creating modules as mixins to
be monkey-patched into the Mob class.  Having a standard method of doing
this prevents confusing problems with mixin name conflicts, by allowing
the plugin to raise an error that 2 mixins with the same name exist.
2017-01-01 08:13:09 +00:00