diepAPI icon indicating copy to clipboard operation
diepAPI copied to clipboard

entityManager.entities will always be empty, unless within game.on('frame', ...)

Open Cazka opened this issue 3 years ago • 1 comments

// entities will be empty here
const entities = diepAPI.extensions.entityManager.entities;

diepAPI.apis.game.on('frame', () =>{
    // entities will not be empty here
    const entities = diepAPI.extensions.entityManager.entities;
});

Cazka avatar Dec 06 '22 21:12 Cazka

This needs to be updated. not sure how though :/

https://github.com/Cazka/diepAPI/blob/a02472d982d3ce126ce10646a6d2ae2681610b25/src/extensions/entity_manager.ts#L18-L21

Cazka avatar Dec 06 '22 21:12 Cazka