ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.33k stars 254 forks source link

Add function to remove all lights #47

Closed albinodervall closed 9 years ago

albinodervall commented 9 years ago

If you use the same instance of ROT.Lighting with different sets of lights or just want to switch to another set of light, there's no function to clear all lights. This pull request solves that by wrapping for this._lights = {}; in a function which provides a more intuitive interface to clear all lights.

ondras commented 9 years ago

Sounds like a useful addition. Thanks!