Rovents Transformer
Required by Rovents to use Instanced events.
Installation
npm i @shagos/rovents-transformer
tsconfig.json
{
...
compilerOptions: {
...
plugins: [{"transform": "rovents-transformer"}]
}
}
Input
@EventHandler.Instanced()
class SomeInstancedClass {}
Output
@EventHandler.Instanced()
class SomeInstancedClass {
constructor() {
EventHandler.newInstance("SomeInstancedClass", this);
}
destroy() {
EventHandler.instanceDestroyed("SomeInstancedClass", this);
}
}