GameClass

A script class that defines the game mode. Only one instance of this class is made.

Kind: API page

Environments: Game

Game

Open the full Game reference

This is the first script that will be run.

The game script is responsible for creating and managing worlds.

Can receive events sent with sm.event.sendToGame.

Fields

Name Type Description
network Network A Network object that can be used to send messages between client and server.
storage Storage (Server side only.) A Storage object that can be used to store data for the next time loading this object after being unloaded.
data any Game start data.