Permalink
Browse files

Effect refactored

  • Loading branch information...
hugeen committed Nov 22, 2012
1 parent f3add6b commit 7a8961f2590e44b2d4efd8c3b6ec736ec71402a4
Showing with 16 additions and 11 deletions.
  1. +10 −10 game/components/effects/blood.js
  2. +6 −1 game/entities/monster.js
@@ -14,19 +14,19 @@ define([
});
var options = {
- maxParticles: 75,
- size: 10,
- sizeRandom: 3,
- speed: 6,
+ maxParticles: 50,
+ size: 7,
+ sizeRandom: 4,
+ speed: 4,
speedRandom: 2,
- lifeSpan: 15,
- lifeSpanRandom: 2,
+ lifeSpan: 12,
+ lifeSpanRandom: 4,
angle: 55,
angleRandom: 12,
- startColour: [155, 5, 3, 0.9],
- startColourRandom: [200, 5, 10, 0.5],
- endColour: [200, 0, 0, 0.7],
- endColourRandom: [255, 8, 15, 0.7],
+ startColour: [204, 17, 0, 1],
+ startColourRandom: [204, 17, 0, 1],
+ endColour: [204, 0, 17, 1],
+ endColourRandom: [204, 17, 0, 1],
sharpness: 2,
sharpnessRandom: 5,
spread: 5,
View
@@ -4,9 +4,14 @@ define([
], function(_, Crafty) {
return {
- create: function(type, line) {
+ create: function(type, line, wave) {
var monster = Crafty.e("NonPlayableCharacter, "+type);
monster.moveToLine(line);
+ if(typeof wave !== "undefined") {
+ monster.bind("Death", function() {
+ wave.killMonster();
+ });
+ }
return monster;
}
};

0 comments on commit 7a8961f

Please sign in to comment.