Fixing a bug where lights disappeared too soon
This commit is contained in:
@@ -164,8 +164,6 @@
|
|||||||
"name":"FountainGuard",
|
"name":"FountainGuard",
|
||||||
"properties":
|
"properties":
|
||||||
{
|
{
|
||||||
"can_move":"false",
|
|
||||||
"collide_with_player":"true",
|
|
||||||
"sprite_group":"townsfolk-female",
|
"sprite_group":"townsfolk-female",
|
||||||
"sprite_name":"townsfolk-female-3"
|
"sprite_name":"townsfolk-female-3"
|
||||||
},
|
},
|
||||||
@@ -181,7 +179,7 @@
|
|||||||
"name":"FountainPerson",
|
"name":"FountainPerson",
|
||||||
"properties":
|
"properties":
|
||||||
{
|
{
|
||||||
"can_move":"false"
|
|
||||||
},
|
},
|
||||||
"type":"",
|
"type":"",
|
||||||
"visible":true,
|
"visible":true,
|
||||||
|
|||||||
@@ -630,7 +630,6 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
return false;
|
return false;
|
||||||
var sprrect = new Phaser.Rectangle(spr.x, spr.y, 32, 32);
|
var sprrect = new Phaser.Rectangle(spr.x, spr.y, 32, 32);
|
||||||
if ( viewrect.intersects(sprrect) || viewrect.containsRect(sprrect) ) {
|
if ( viewrect.intersects(sprrect) || viewrect.containsRect(sprrect) ) {
|
||||||
console.log("I SEE YOU YOU FUCKER");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -940,7 +939,6 @@ GameState.prototype.updateShadowTexture = function() {
|
|||||||
this.game.camera.width,
|
this.game.camera.width,
|
||||||
this.game.camera.height);
|
this.game.camera.height);
|
||||||
if ( ! light.rect.intersects(r1) ) {
|
if ( ! light.rect.intersects(r1) ) {
|
||||||
console.log("Light does not appear on camera");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user