Pyro's Awesome Lasers (for Kall)

Hello everyone!
Sorry I've been off the forum for so long, I had no internet connection for the last 2 weeks... But nevermind that!
You should check out this demo! I built this for Kalladdolf whom asked me for help to make this. This code is an example of how to create lasers which are limited in lenght by walls and can be triped by object passing by. This uses a single canvas to draw all lasers and the screen's position does not matter; The lasers will always be drawn properly as long as they are set-up correctly.
Unfortunately, since this uses a canvas actor and since the code has to do a lot of collision checking, using this in an excessive manner or simply making the canvas too big may cause some lagging in your game. Therefore you must use this with caution!
--pyro
Sorry I've been off the forum for so long, I had no internet connection for the last 2 weeks... But nevermind that!
You should check out this demo! I built this for Kalladdolf whom asked me for help to make this. This code is an example of how to create lasers which are limited in lenght by walls and can be triped by object passing by. This uses a single canvas to draw all lasers and the screen's position does not matter; The lasers will always be drawn properly as long as they are set-up correctly.
Unfortunately, since this uses a canvas actor and since the code has to do a lot of collision checking, using this in an excessive manner or simply making the canvas too big may cause some lagging in your game. Therefore you must use this with caution!
--pyro