Skip to content

API Overview ​

Overview ​

This section outlines the core GMRoomLoader APIs, organized into four main parts:

Syntax ​

All functionality in RoomLoader and Payload is exposed through public PascalCase methods. No public variables are available.

Most State and Payload methods chain together via the Fluent Interface pattern.

js
// Initialize a room's data
RoomLoader.DataInit(rmExample);

// Load a room and store the returned Payload
payload = RoomLoader.Load(rmExample, x, y);

// Load a room centered and rotated by chaining State methods
payload = RoomLoader.MiddleCenter().Angle(90).Load(rmExample, x, y);

// Retrieve a loaded element ID through the Payload
tilemap = payload.GetTilemap("Tiles");

Private methods and variables use the __ prefix and should only be accessed if you know exactly what you're doing.