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);
|
||||
},
|
||||
|
||||
stopInforming: (synchronized) => {
|
||||
stopInformingAbout: (synchronized) => {
|
||||
this.$$synchronizer.stopSynchronizing(synchronized);
|
||||
},
|
||||
|
||||
|
|
|
@ -52,13 +52,13 @@ export default class Universe {
|
|||
const onCurrentRoomChanged = (oldRoom, newRoom) => {
|
||||
if (oldRoom) {
|
||||
const room = this.room(oldRoom);
|
||||
entity.stopInforming(room);
|
||||
entity.stopInformingAbout(room);
|
||||
room.removeEntity(entity);
|
||||
}
|
||||
if (newRoom) {
|
||||
const room = this.room(newRoom);
|
||||
room.addEntity(entity);
|
||||
entity.startInforming(room);
|
||||
entity.startInformingAbout(room);
|
||||
}
|
||||
};
|
||||
entity.on('currentRoomChanged', onCurrentRoomChanged);
|
||||
|
|
Loading…
Reference in New Issue
Block a user