Reworking the junkmap
This commit is contained in:
@@ -40,7 +40,8 @@ var Light = function(game, x, y, key, frame, radius, fade, color, flicker) {
|
|||||||
this.fade = radius * fade
|
this.fade = radius * fade
|
||||||
this.rect = new Phaser.Rectangle(this.x - radius, this.y - radius, radius * 2, radius * 2)
|
this.rect = new Phaser.Rectangle(this.x - radius, this.y - radius, radius * 2, radius * 2)
|
||||||
this.flicker = flicker;
|
this.flicker = flicker;
|
||||||
|
console.log("Light is ready");
|
||||||
|
console.log(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Lightes are a type of Phaser.Sprite
|
// Lightes are a type of Phaser.Sprite
|
||||||
@@ -899,7 +900,6 @@ GameState.prototype.updateShadowTexture = function() {
|
|||||||
|
|
||||||
// Iterate through each of the lights and draw the glow
|
// Iterate through each of the lights and draw the glow
|
||||||
this.staticLights.forEach(function(light) {
|
this.staticLights.forEach(function(light) {
|
||||||
console.log("Drawing light " + light);
|
|
||||||
// Don't draw lights that aren't on screen
|
// Don't draw lights that aren't on screen
|
||||||
var r1 = new Phaser.Rectangle(this.game.camera.x,
|
var r1 = new Phaser.Rectangle(this.game.camera.x,
|
||||||
this.game.camera.y,
|
this.game.camera.y,
|
||||||
|
|||||||
Reference in New Issue
Block a user