Hi there,
I have created a Zone extension .jar file that handles getting players into a game room and then starting the game once 4 players are present.
I've also made a Game extension .jar file that starts up a scheduled task once the game begins. To do this I need to call a 'startGame' method on the game extension from the Zone extension. I though the best way to do this is probably to use an interface and cast the reference to the rooms extension I receive like this:
IGameRoomExtension roomExt = (IGameRoomExtension)gameRoom.getExtension();
where IGameRoomExtension is an interface with the method 'startGame', but I've run into a problem. I am creating my jar files by right clicking on the package in Eclipse and choosing 'Export'. I have my zone classes in one package, and my room classes in another, so they both get exported to different .jar files. But then the interface needs to be available to both the room and the zone, which means putting it into its own package, and then it doesn't get compiled into either of the jar files.
Can anyone suggest the best way around this problem?
Is there an easier way of calling methods of a room extension from within a zone extension?
thanks,
Alex
Zone Extension > Room Extension communication
Yup, thats the correct way to do it 
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.