Skip to content

CachedClasses

const game: Game

Defined in: packages/isaacscript-common/src/core/cachedClasses.ts:11

A cached version of the class returned from the Game() constructor.

Use this instead of invoking the constructor again for a miniscule performance increase.

Caching the results of this constructor is safe, but caching other classes (like Level or Room) is not safe and can lead to the game crashing in certain situations.


const itemConfig: ItemConfig

Defined in: packages/isaacscript-common/src/core/cachedClasses.ts:21

A cached version of the class returned from the Isaac.GetItemConfig() constructor.

Use this instead of invoking the constructor again for a miniscule performance increase.

Caching the results of this constructor is safe, but caching other classes (like Level or Room) is not safe and can lead to the game crashing in certain situations.


const musicManager: MusicManager

Defined in: packages/isaacscript-common/src/core/cachedClasses.ts:31

A cached version of the class returned from the MusicManager() constructor.

Use this instead of invoking the constructor again for a miniscule performance increase.

Caching the results of this constructor is safe, but caching other classes (like Level or Room) is not safe and can lead to the game crashing in certain situations.


const sfxManager: SFXManager

Defined in: packages/isaacscript-common/src/core/cachedClasses.ts:41

A cached version of the class returned from the SFXManager() constructor.

Use this instead of invoking the constructor again for a miniscule performance increase.

Caching the results of this constructor is safe, but caching other classes (like Level or Room) is not safe and can lead to the game crashing in certain situations.


const fonts: object

Defined in: packages/isaacscript-common/src/core/cachedClasses.ts:49

An object containing all 7 vanilla fonts that are pre-loaded and ready to use.

For more information on the vanilla fonts and to see what they look like, see: https://wofsauge.github.io/IsaacDocs/rep/tutorials/Tutorial-Rendertext.html

readonly droid: Font

readonly pfTempestaSevenCondensed: Font

readonly teamMeatFont10: Font

readonly teamMeatFont12: Font

readonly teamMeatFont16Bold: Font

readonly terminus: Font

readonly upheaval: Font