These two methods do basically the same:
|
changeMoveEachLR(group, move, dir) { |
|
group = this.getGroupByName_(group); |
|
if ((move === "rand") && (group.length>0)) { |
|
move = this.getNewChangedMove(move, group[0].current_move, false); |
|
} |
|
group.forEach(sprite => { |
|
this.changeMoveLR(sprite, move, dir); |
|
}); |
|
} |
|
|
|
doMoveEachLR(group, move, dir) { |
|
group = this.getGroupByName_(group); |
|
if ((move === "rand") && (group.length>0)) { |
|
move = this.getNewChangedMove(move, group[0].current_move, true); |
|
} |
|
group.forEach(sprite => { |
|
this.doMoveLR(sprite, move, dir); |
|
}); |
|
} |
So does this method, but it doesn't account for the "rand" case:
|
setPropEach(group, property, val) { |
|
group = this.getGroupByName_(group); |
|
group.forEach(function (sprite){ |
|
this.setProp(sprite, property, val); |
|
}, this); |
|
} |
These two methods do basically the same:
dance-party/src/p5.dance.js
Lines 563 to 581 in f0c34bc
So does this method, but it doesn't account for the "rand" case:
dance-party/src/p5.dance.js
Lines 851 to 856 in f0c34bc