Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit d47b204

Browse files
committed
totyuu
1 parent 7309dc3 commit d47b204

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

rankingMaker.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
export default class RankingMaker {
1+
import ComponentBase from "./componentBase";
2+
import controllerModel from "./model/controllerModel";
3+
4+
export default class RankingMaker extends ComponentBase {
25
constructor() {
6+
super();
7+
8+
this.subscribe("rankingState", this.make);
39
}
4-
make(controllers) {
10+
11+
make() {
12+
const controllers = controllerModel.controllers;
513
const controllerNames = Object.keys(controllers);
614
// indexが順位となっている
715
// [ { hp: 100, name: "xxx" }, { hp: 80, name: "xxx" }, ...]
@@ -22,10 +30,14 @@ export default class RankingMaker {
2230
// { name: getStates(), ... }
2331
const onis = {};
2432
controllerNames.filter(name => {
25-
return controllers[name].linkedOrb !== null && controllers[name].isOni
33+
return controllers[name].linkedOrb !== null && controllers[name].isOni;
2634
}).forEach(name => {
2735
onis[name] = controllers[name].getStates();
2836
});
29-
return { ranking, onis };
37+
38+
const rankingDetails = { ranking, onis };
39+
controllerNames.forEach(controllerName => {
40+
41+
});
3042
}
3143
}

0 commit comments

Comments
 (0)