refactor: API
This commit is contained in:
parent
af32353790
commit
6914485cb5
|
@ -53,11 +53,11 @@ export default (flecks) => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
startInforming: (synchronized) => {
|
startInformingAbout: (synchronized) => {
|
||||||
this.$$synchronizer.startSynchronizing(synchronized);
|
this.$$synchronizer.startSynchronizing(synchronized);
|
||||||
},
|
},
|
||||||
|
|
||||||
stopInforming: (synchronized) => {
|
stopInformingAbout: (synchronized) => {
|
||||||
this.$$synchronizer.stopSynchronizing(synchronized);
|
this.$$synchronizer.stopSynchronizing(synchronized);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -52,13 +52,13 @@ export default class Universe {
|
||||||
const onCurrentRoomChanged = (oldRoom, newRoom) => {
|
const onCurrentRoomChanged = (oldRoom, newRoom) => {
|
||||||
if (oldRoom) {
|
if (oldRoom) {
|
||||||
const room = this.room(oldRoom);
|
const room = this.room(oldRoom);
|
||||||
entity.stopInforming(room);
|
entity.stopInformingAbout(room);
|
||||||
room.removeEntity(entity);
|
room.removeEntity(entity);
|
||||||
}
|
}
|
||||||
if (newRoom) {
|
if (newRoom) {
|
||||||
const room = this.room(newRoom);
|
const room = this.room(newRoom);
|
||||||
room.addEntity(entity);
|
room.addEntity(entity);
|
||||||
entity.startInforming(room);
|
entity.startInformingAbout(room);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
entity.on('currentRoomChanged', onCurrentRoomChanged);
|
entity.on('currentRoomChanged', onCurrentRoomChanged);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user