Class "Global Functions"⚓︎
Constructors⚓︎
Color ()⚓︎
Color Color ( float R, float G, float B, float A, int RO, int GO, int BO )⚓︎
Constructor for the "Color" class.
When using the Font class, use KColor() instead.
Colors are made of three separate components, tint, colorize and offset. Tint acts like a color multiplicator. Offset is a color which is added after the tint is applied. Colorize is complicated. See the SetColorize()
function for a detailed description.
R, G, B and A accept numbers between 0 and 1.
RO, GO and BO accept numbers between -255 and 255.
Entity·Ptr ()⚓︎
EntityPtr EntityPtr ( Entity )⚓︎
Entity·Ref ()⚓︎
EntityRef EntityRef ( Entity )⚓︎
Font ()⚓︎
Font Font ( )⚓︎
Constructor for the "Font" class.
Example Code
Example usage.
1 2 3 |
|
Game ()⚓︎
Game Game ( )⚓︎
Returns a Game object.
Example Code
Example usage:
1 2 |
|
KColor ()⚓︎
KColor KColor ( float red, float green, float blue, float alpha )⚓︎
Constructor for the "KColor" class. Notes: "KColor" is only used in the Font class. For most other situations you will need to use the Color() constructor.
Music·Manager ()⚓︎
MusicManager MusicManager ( )⚓︎
Returns a MusicManager object.
Example Code
Example usage:
1 |
|
Projectile·Params ()⚓︎
ProjectileParams ProjectileParams ( )⚓︎
Register·Mod ()⚓︎
Mod Reference RegisterMod ( string modName, int apiVersion )⚓︎
Method to define a mod in the game. This needs to be defined to handle callbacks and save data in your mod.
Returns a table which acts as the Mod Reference.
Example Code
1 |
|
RNG ()⚓︎
RNG RNG ( )⚓︎
Sprite ()⚓︎
Sprite Sprite ( )⚓︎
SFXManager ()⚓︎
SFXManager SFXManager ( )⚓︎
Returns a SFXManager object.
Example Code
Example usage:
1 |
|
Vector ()⚓︎
Vector Vector ( float , float )⚓︎
Functions⚓︎
Random ()⚓︎
int Random ( )⚓︎
Returns a random integer. (0 to 2^32)
Random·Vector ()⚓︎
Vector RandomVector ( )⚓︎
Returns a random vector with length 1. Multiply this vector by a number for larger random vectors.
Get·Ptr·Hash ()⚓︎
int GetPtrHash ( Objectobject )⚓︎
Returns a hash-value of the pointer given as an input value. Valid inputs are any Isaac object, including Entity
, Room
, RNG
, Sprite
, 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 entity
parameter in MC_ENTITY_TAKE_DMG
, this comparison will never be true even if both variables refer to the exact same entity in the game. GetPtrHash()
turns pointer into a fixed number, which makes comparisons easier.
Example Code
Example on check if two entities saved in different variables are the same.
1 2 3 4 5 6 7 8 |
|