Browse Source

Small clean-ups

Rename variable, and remove unnecessary check.
universalis
parent
commit
e81b359aaf
1 changed files with 10 additions and 12 deletions
  1. +10
    -12
      dice/dice.js

+ 10
- 12
dice/dice.js View File

@@ -662,21 +662,19 @@
this.__selectorAnimate(this.running);
};

this.dieBox.prototype.rollDice = function(notation, coords, boost, beforeRoll, afterRoll) {
var vectors = this.generateVectors(notation, coords, boost);
this.dieBox.prototype.rollDice = function(rollSpec, coords, boost, beforeRoll, afterRoll) {
var vectors = this.generateVectors(rollSpec, coords, boost);
this.rolling = true;
if (beforeRoll) {
beforeRoll.call(this, vectors, notation);
}
if (afterRoll) {
this.clear();
this.roll(vectors, function(result) {
if (afterRoll) {
afterRoll.call(this, notation, result);
}
this.rolling = false;
});
beforeRoll.call(this, vectors, rollSpec);
}
this.clear();
this.roll(vectors, function(result) {
if (afterRoll) {
afterRoll.call(this, rollSpec, result);
}
this.rolling = false;
});
};

this.dieBox.prototype.rnd = function() {


Loading…
Cancel
Save