Cazka / diepAPI

An API for https://diep.io
MIT License
15 stars 8 forks source link

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

Open Cazka opened 1 year ago

Cazka commented 1 year ago
// 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 commented 1 year ago

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

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