-
-
Save ossra/06a9807c134ba128d8842bbca338bc9f to your computer and use it in GitHub Desktop.
This file contains 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
/* 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