Classes between Extensions
Posted: 25 Jan 2012, 00:28
Hello!
I have read a lot information about horribe Class Loader and want to ask advice about SFS2X.
I have GameZoneExtension.
And FightExtension - game room extension.
When user connects and login to GameZoneExtension it loads from DB information about user character and creates instance of GameCharacter class and fill it with loaded info.
Each new room with FightExtension should be able to get every user GameCharacter instance from GameZoneExtension.
So I should put jar with GameZoneExtension and FightExtension {SFS2X-DIR}/SFS2X/extensions/game/ and jar with GameCharacter to {SFS2X-DIR}/SFS2X/extensions/__lib__/. Am I right?
And every time I changed GameCharacter (or any other model class) I should restart SFS2X to apply changes?
P.S. So what for extension auto reloading? For simple server-side projects?
I have read a lot information about horribe Class Loader and want to ask advice about SFS2X.
I have GameZoneExtension.
And FightExtension - game room extension.
When user connects and login to GameZoneExtension it loads from DB information about user character and creates instance of GameCharacter class and fill it with loaded info.
Each new room with FightExtension should be able to get every user GameCharacter instance from GameZoneExtension.
So I should put jar with GameZoneExtension and FightExtension {SFS2X-DIR}/SFS2X/extensions/game/ and jar with GameCharacter to {SFS2X-DIR}/SFS2X/extensions/__lib__/. Am I right?
And every time I changed GameCharacter (or any other model class) I should restart SFS2X to apply changes?
P.S. So what for extension auto reloading? For simple server-side projects?