Refactor chasing code into a generic target chaser
This commit is contained in:
@@ -1058,10 +1058,10 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
this.action_chaseplayer = function()
|
this.action_chaseplayer = function()
|
||||||
{
|
{
|
||||||
var movingstate = STATE_NONE;
|
var movingstate = STATE_NONE;
|
||||||
this.action_chasetarget(player,
|
this.chasetarget(player,
|
||||||
STATE_ALERTED,
|
STATE_ALERTED,
|
||||||
STATE_MOVING | STATE_RUNNING,
|
STATE_MOVING | STATE_RUNNING,
|
||||||
true);
|
true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user