hi^^
i am working on a plugin and i would like to know more about creating game objects..
in this post there is a info how to build your own object:
=> #18
-----------
So if i use this : ( i need to use this anyway )
do i still need to use this?:
sidenote: i allready use "new Self_Switches()", in my plugin @ Game_Event.prototype.initialize
or would that even be a bad idea to use both?
( i am not talking about any other functions from post #18 , because they are used anyway )
any info that let me understand this better might help thx!
edit:
in other words , my question is ..
is "DataManager.createGameObjects" only used to initialize the game Object? or is this needed for anything else aswell??
i am working on a plugin and i would like to know more about creating game objects..
in this post there is a info how to build your own object:
=> #18
-----------
So if i use this : ( i need to use this anyway )
JavaScript:
function Self_Switches() {
this.initialize.apply(this, arguments);
}
// i mean this part below here!
$selfSwitches = Object.create(Self_Switches.prototype);
Self_Switches.prototype.constructor = Self_Switches;
do i still need to use this?:
JavaScript:
var old_createGameObjects = DataManager.createGameObjects;
DataManager.createGameObjects = function() {
old_createGameObjects.call(this);
// i mean this part below here!
$selfSwitches = new Self_Switches();
};
JavaScript:
// add SelfSwitches data storage to event
var _Game_event_ini = Game_Event.prototype.initialize;
Game_Event.prototype.initialize = function(mapId, eventId) {
_Game_event_ini.call(this, mapId, eventId);
// i mean this here below!
this._SelfSwitches = new Self_Switches(mapId, eventId);
};
or would that even be a bad idea to use both?
( i am not talking about any other functions from post #18 , because they are used anyway )
any info that let me understand this better might help thx!
edit:
in other words , my question is ..
is "DataManager.createGameObjects" only used to initialize the game Object? or is this needed for anything else aswell??