More precise removal of lasers when they go offscreen in demo game

This commit is contained in:
Viktor Lidholt
2015-09-03 16:13:39 -07:00
parent 876fb7b38b
commit bf179674ad

View File

@@ -167,7 +167,7 @@ class Laser extends GameObject {
Laser(GameObjectFactory f, int level, double r) : super(f) {
// Game object properties
radius = 10.0;
removeLimit = 640.0;
removeLimit = _gameSizeHeight + radius;
canDamageShip = false;
canBeDamaged = false;
impact = 1.0 + level * 0.5;