Hi there!
I'm making a plugin, and i have a doubt:
What is the best practice?
or
Make my own function with the code and call it inside instead of putting the whle code.
Or it is irrelevant?
I'm making a plugin, and i have a doubt:
What is the best practice?
Code:
var _Elii_Game_Timer_update = Game_Timer.prototype.update;
Game_Timer.prototype.update = function(sceneActive) {
_Elii_Game_Timer_update.call(this, sceneActive);
MY CODE STUFF HERE
or
Make my own function with the code and call it inside instead of putting the whle code.
Code:
var _Elii_Game_Timer_update = Game_Timer.prototype.update;
Game_Timer.prototype.update = function(sceneActive) {
_Elii_Game_Timer_update.call(this, sceneActive);
$gameTimer.myFunction();
Or it is irrelevant?