You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am playing with sprite.js and I would like to extend sprite objects to include some methods, say jump(), reset() etc.. I know similar methods already exist in sprite, however, I would like to customize and encapsulate them and make my game more object oriented. I tried to go with prototypal inheritance approach, however sprite prototype is not reachable in the global scope and constructor takes several parameters, therefore I can not do something like
My javascript skills are quite poor, so maybe I am missing something. How would you suggest I extend Sprite?
I believe making Sprite extendible in some way would add more value to sprite.js, because it would be applicable to frameworks more.
Thanks for your help and for awesome library.
Tadas
The text was updated successfully, but these errors were encountered:
Hi,
I am playing with sprite.js and I would like to extend sprite objects to include some methods, say jump(), reset() etc.. I know similar methods already exist in sprite, however, I would like to customize and encapsulate them and make my game more object oriented. I tried to go with prototypal inheritance approach, however sprite prototype is not reachable in the global scope and constructor takes several parameters, therefore I can not do something like
My javascript skills are quite poor, so maybe I am missing something. How would you suggest I extend Sprite?
I believe making Sprite extendible in some way would add more value to sprite.js, because it would be applicable to frameworks more.
Thanks for your help and for awesome library.
Tadas
The text was updated successfully, but these errors were encountered: