Skip to content

Commit

Permalink
Sync with published result of episode 16.
Browse files Browse the repository at this point in the history
  • Loading branch information
pomle committed Feb 25, 2020
1 parent 9e1d5ef commit c5e9b09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions public/js/EventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default class EventEmitter {
this.listeners.push(listener);
}

emit(name, ...values) {
emit(name, ...args) {
this.listeners.forEach(listener => {
if (listener.name === name) {
listener.callback(...values);
listener.callback(...args);
}
});
}
Expand Down
3 changes: 2 additions & 1 deletion public/js/traits/PlayerController.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default class PlayerController extends Trait {

setPlayer(entity) {
this.player = entity;
entity.stomper.events.listen('stomp', () => {

this.player.stomper.events.listen('stomp', () => {
this.score += 100;
});
}
Expand Down

0 comments on commit c5e9b09

Please sign in to comment.