This gist just includes my GameMaker IDE Code Editor theme. The theme was originally just throwing together some colours, but I thought it looked kinda alright! Storing this here firstly so I don't lose it, but if you like it for whatever reason, read below to set it up!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generic Error type as analogue of GM's `Struct.Exception`. | |
* | |
* @param {String} msg The readable message for this error. | |
* @param {Struct.Err|Struct.Exception|Undefined} [cause] The error which caused this one, if any. | |
* @param {Array<String>|Undefined} [__stacktrace] The stacktrace of this error, | |
*/ | |
function Err(msg, cause = undefined, __stacktrace = undefined) constructor { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {String} initialStateName Name of the state to execute first. | |
*/ | |
function FSM(initialStateName) constructor { | |
/** | |
* @ignore | |
*/ | |
self.states = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#macro EVENT_EMITTER_DEBUG_ASSERTIONS true | |
/** | |
* @param {String} ... Names of the events emitted by this emitter. | |
*/ | |
function EventEmitter() constructor { | |
self.listeners = {}; | |
self.oneTimeListeners = {}; |