Increase view size when alerted, go concerned instead of alerted when player is below the light threshold but within view

This commit is contained in:
2014-06-15 15:32:21 -07:00
parent d59616632d
commit b322fece65

View File

@@ -1311,17 +1311,17 @@ GameState.prototype.update = function()
this.aiSprites.forEach(_inner_collide, this);
this.updateShadowTexture();
function _draw_viewrect(x) {
var r = x.viewRectangle();
if ( r == null )
return;
this.shadowTexture.context.fillStyle = 'rgb(128, 128, 128)';
this.shadowTexture.context.fillRect(r.left,
r.top,
r.width,
r.height);
}
this.aiSprites.forEach(_draw_viewrect, this);
// function _draw_viewrect(x) {
// var r = x.viewRectangle();
// if ( r == null )
// return;
// this.shadowTexture.context.fillStyle = 'rgb(128, 128, 128)';
// this.shadowTexture.context.fillRect(r.left,
// r.top,
// r.width,
// r.height);
// }
// this.aiSprites.forEach(_draw_viewrect, this);
if (game.time.fps !== 0) {
this.fpsText.setText(game.time.fps + ' FPS');