refactor: app doesn't manage held item
This commit is contained in:
parent
faa2406039
commit
1d7e1cc1ee
|
@ -357,17 +357,6 @@ export class App extends decorate(class {}) {
|
|||
this.stage.camera = camera;
|
||||
// Avoid the initial 'lerp.
|
||||
camera.realPosition = camera.position;
|
||||
// Manage held item.
|
||||
entity.on('activeSlotIndexChanged', (oldIndex, newIndex) => {
|
||||
const oldItem = entity.itemInSlot(oldIndex);
|
||||
if (oldItem) {
|
||||
oldItem.wielder = null;
|
||||
}
|
||||
const newItem = entity.itemInSlot(newIndex);
|
||||
if (newItem) {
|
||||
newItem.wielder = entity;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user