Stop chasing me if you can't see me at the end of your path
This commit is contained in:
@@ -1605,32 +1605,32 @@ GameState.prototype.update = function()
|
|||||||
this.aiSprites.forEach(_inner_collide, this);
|
this.aiSprites.forEach(_inner_collide, this);
|
||||||
this.updateShadowTexture();
|
this.updateShadowTexture();
|
||||||
|
|
||||||
// if ( this.aiSprites.debug == true ) {
|
if ( this.aiSprites.debug == true ) {
|
||||||
// function _draw_viewrect(x) {
|
function _draw_viewrect(x) {
|
||||||
// var r = x.viewRectangle();
|
var r = x.viewRectangle();
|
||||||
// if ( r == null )
|
if ( r == null )
|
||||||
// return;
|
return;
|
||||||
// this.shadowTexture.context.fillStyle = 'rgb(128, 128, 128)';
|
this.shadowTexture.context.fillStyle = 'rgb(128, 128, 128)';
|
||||||
// this.shadowTexture.context.fillRect(r.left,
|
this.shadowTexture.context.fillRect(r.left,
|
||||||
// r.top,
|
r.top,
|
||||||
// r.width,
|
r.width,
|
||||||
// r.height);
|
r.height);
|
||||||
// }
|
}
|
||||||
// this.aiSprites.forEach(_draw_viewrect, this);
|
this.aiSprites.forEach(_draw_viewrect, this);
|
||||||
// function _draw_aipath(x) {
|
function _draw_aipath(x) {
|
||||||
// var p = x.path;
|
var p = x.path;
|
||||||
// if ( p == null )
|
if ( p == null )
|
||||||
// return;
|
return;
|
||||||
// this.shadowTexture.context.fillStyle = 'rgb(255, 128, 128)';
|
this.shadowTexture.context.fillStyle = 'rgb(255, 128, 128)';
|
||||||
// p.forEach(function(r) {
|
p.forEach(function(r) {
|
||||||
// this.shadowTexture.context.fillRect(r.start.x,
|
this.shadowTexture.context.fillRect(r.start.x,
|
||||||
// r.start.y,
|
r.start.y,
|
||||||
// r.end.x - r.start.x,
|
r.end.x - r.start.x,
|
||||||
// r.end.y - r.start.y);
|
r.end.y - r.start.y);
|
||||||
// }, this);
|
}, this);
|
||||||
// }
|
}
|
||||||
// this.aiSprites.forEach(_draw_aipath, this);
|
this.aiSprites.forEach(_draw_aipath, this);
|
||||||
// }
|
}
|
||||||
if (game.time.fps !== 0) {
|
if (game.time.fps !== 0) {
|
||||||
this.fpsText.setText(game.time.fps + ' FPS');
|
this.fpsText.setText(game.time.fps + ' FPS');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user