import * as orbit from "orbitjs";
const BUS = new orbit.Bus("Main");
class PlayerJoinEvent extends orbit.Event {
public name: string;
constructor(name: string) {
super("PlayerJoinEvent");
this.name = name;
}
}
PlayerJoinEvent.link(BUS)
BUS.on<PlayerJoinEvent>("PlayerJoinEvent", async event => {
console.log("Player Joined: " + event.name);
});
BUS.on("PlayerJoinEvent", async () => {
console.log("Another Player joined");
});
BUS.post(
new PlayerJoinEvent("Bob")
);
This repository was archived by the owner on Mar 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Super fast event system
License
tokio-js/orbit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Super fast event system
Resources
License
Stars
Watchers
Forks
Releases
No releases published