Class "Global Functions"
Constructors
Game () {: aria-label='Constructors' }
Returns a Game object.
???- example "Example Code" Example usage:
MusicManager () {: aria-label='Constructors' }
MusicManager MusicManager ( ) {: .copyable aria-label='Constructors' }
Returns a MusicManager object.
???- example "Example Code" Example usage:
Random () {: aria-label='Constructors' }
int Random ( ) {: .copyable aria-label='Constructors' }
Returns a random integer. (0 to 2^32)
RandomVector () {: aria-label='Constructors' }
Vector RandomVector ( ) {: .copyable aria-label='Constructors' }
Returns a random vector with length 1. Multiply this vector by a number for larger random vectors.
SFXManager () {: aria-label='Constructors' }
SFXManager SFXManager ( ) {: .copyable aria-label='Constructors' }
Returns a SFXManager object.
???- example "Example Code" Example usage:
GetPtrHash () {: aria-label='Constructors' }
int GetPtrHash ( Objectobject ) {: .copyable aria-label='Constructors' }
Returns a hash-value of the pointer given as an input value. Valid inputs are any Isaac object, including :::lua Entity
, :::lua Room
, :::lua RNG
, :::lua Sprite
, :::lua Game
etc.
It can be used to easily compare two entities, making equality checks very easy.
Example:
If you spawn a certain entity, save it in a variable and then compare it to the :::lua entity
parameter in :::lua MC_ENTITY_TAKE_DMG
, this comparison will never be true even if both variables refer to the exact same entity in the game. :::lua GetPtrHash()
turns pointer into a fixed number, which makes comparisons easier.
???- example "Example Code" Example on check if two entities saved in different variables are the same.
Last updated