Skip to content

Instantly share code, notes, and snippets.

@ossra

ossra/RMMZ-ES6 Secret

Created Aug 18, 2020
Embed
What would you like to do?
/* mixin function within plugin class */
mixin (proto, object) {
this.base[proto.constructor.name] = { };
for (const name of Object.keys(object)) {
this.base[proto.constructor.name][name] = proto[name];
}
Object.assign(proto, object);
}
/* calling the mixin function from the plugin class */
plugin.namespace.mixin(Spriteset_Base.prototype, { // {
/* ====================================================== | Spriteset_Base | */
/* < update > -------------------------------------------------------------------- */
update () {
plugin.namespace.base.Spriteset_Base.update.call(this);
},
}); // }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment