All Projects → gm-core → event-horizon

gm-core / event-horizon

Licence: other
Custom global event firing/subscribing in GameMaker: Studio 2

Programming Languages

Yacc
648 projects

Projects that are alternatives of or similar to event-horizon

Cphalcon7
Dao7 - Web framework for PHP7.x,项目接洽 QQ 176013762
Stars: ✭ 237 (+1381.25%)
Mutual labels:  events
laravel-attribute-observer
Observe (and react to) attribute changes made on Eloquent models.
Stars: ✭ 59 (+268.75%)
Mutual labels:  events
handytools
A series of libraries to extend GameMaker 2022 LTS
Stars: ✭ 45 (+181.25%)
Mutual labels:  gamemaker
Watermill
Building event-driven applications the easy way in Go.
Stars: ✭ 3,504 (+21800%)
Mutual labels:  events
docker eventer
A Docker container to notify about Docker events written in Python
Stars: ✭ 14 (-12.5%)
Mutual labels:  events
chronosjs
JS Channels (Events / Commands / Reqest-Response / Courier) Mechanism
Stars: ✭ 35 (+118.75%)
Mutual labels:  events
React Native Add Calendar Event
Create, view or edit events in react native using the standard iOS / Android dialogs
Stars: ✭ 225 (+1306.25%)
Mutual labels:  events
Wortuhr ESP8266
Wortuhr mit ESP8266 WeMos D1 mini und NeoPixel WS2812B LEDs mit mp3 Sounds, Animationen, Transitions, Events und Spiele
Stars: ✭ 33 (+106.25%)
Mutual labels:  events
penn-clubs
Official React-based website for Penn Labs' club directory and events listings.
Stars: ✭ 41 (+156.25%)
Mutual labels:  events
Sublime-GameMaker-Studio-Language-Bundle
A sublime bundle for GameMaker Language (GML)
Stars: ✭ 32 (+100%)
Mutual labels:  gamemaker
Cqrs Clean Eventual Consistency
CQRS, using Clean Architecture, multiple databases and Eventual Consistency
Stars: ✭ 247 (+1443.75%)
Mutual labels:  events
blur-shaders
A collection of blur shader examples, with a written tutorial.
Stars: ✭ 33 (+106.25%)
Mutual labels:  gamemaker
ZSFakeTouch
Simulate touch events for iOS 模拟点击
Stars: ✭ 104 (+550%)
Mutual labels:  events
Php Sse
A simple and efficient library implemented HTML5's server-sent events by PHP, is used to real-time push events from server to client, and easier than Websocket, instead of AJAX request.
Stars: ✭ 237 (+1381.25%)
Mutual labels:  events
tiny-typed-emitter
Fully type-checked NodeJS EventEmitter
Stars: ✭ 96 (+500%)
Mutual labels:  events
Vue Events
Simple event handling for Vue.js
Stars: ✭ 234 (+1362.5%)
Mutual labels:  events
Tech-Conferences
Overview of upcoming and past tech conferences
Stars: ✭ 42 (+162.5%)
Mutual labels:  events
sk
💀 GameMaker skeleton animation
Stars: ✭ 19 (+18.75%)
Mutual labels:  gamemaker
vcenter-connector
Extend vCenter with OpenFaaS
Stars: ✭ 29 (+81.25%)
Mutual labels:  events
easyappointments-integrations
📅 Various platform integration packages of Easy!Appointments
Stars: ✭ 29 (+81.25%)
Mutual labels:  events

Event Horizon

Custom, memory-managed events for GameMaker: Studio and GameMaker: Studio 2

Version 2.0.0

Usage

To use Event Horizon, download the latest release, and import the .yymps package into your project. For detailed instructions, see this page.

Once imported to your project, you can use any of the API functions below. No further setup required.

API

event_add_listener(eventName, eventMethod)

Add an event listener which will call eventMethod when the provided eventName event is fired with event_fire().

This function returns a struct to be passed to event_remove_listener() to clean up later.

@desc Add a listener to an event. Provide the event name, and either a number representing the user event number, or a combo of event category and type. See examples for info.
@param {String} eventName    The name of the event to add a listener to
@param {Method} eventMethod  The method/function to run when the event is fired
@returns {Struct}            A struct describing the listener for use with event_remove_listener()
@example

// Listen for the "hurtPlayer" event and subtract 1 from health when it fires
var listener = event_add_listener("hurtPlayer", function() {
  health -= 1;
});

event_remove_listener(listener)

Removes an event listener. Use this to clean up an event listener added with event_add_listener(). listener is the returned value from event_add_listener().

This should run on the destroy or clean up event of an object, or when you no longer want the listener to run.

@param {Struct} listener  The listener to remove as returned from event_add_listener
@example

// Create and then remove a listener
var listener = event_add_listener("hurtPlayer", function() {
  health -= 1;
});

event_remove_listener(listener);

event_fire(eventName [, eventData])

Fires an event, running all listeners that are currently set up for the event. Optionally, provide a value which will be passed in to the method for all listeners as the first argument.

@param {String} eventName
@param {Mixed} optionalData

event_system_debug()

Prints out debugging information about the event system to the console.

GM Core

Event Horizon is a part of the GM Core project.

License

Copyright (c) 2017 Michael Barrett

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].