Reduce amount of events

This commit is contained in:
Igor Babuschkin
2014-08-07 10:39:47 +02:00
committed by Tadej Novak
parent f1caef5a47
commit 84302d2375
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ var detector =
addEvent: function()
{
var num = Math.ceil(20 * Math.random());
var num = Math.max(3, Math.ceil(15 * Math.random()));
for (var i = 0; i < num; i++) {
var index = Math.round(Math.random() * (detector.tracks.length - 1));
@@ -279,7 +279,7 @@ var detector =
return;
}
var num = Math.min(30 * achievements.count.workers / 10, 30);
var num = Math.min(20 * achievements.count.workers / 10, 20);
for (var i = 0; i < num; i++) {
var index = Math.round(Math.random() * (detector.tracks.length - 1));
+1 -1
View File
@@ -57,7 +57,7 @@ ParticleEvent.prototype.draw = function(duration, init)
ctx.restore();
if (!init) {
this.alpha -= 0.02 / 16 * duration;
this.alpha -= 0.03 / 16 * duration;
}
};