Examples of GamePlugin


Examples of com.barrybecker4.game.common.plugin.GamePlugin

     * Factory method to create the game controller via reflection.
     * The server should not have a ui component.
     */
    private void createController(String gameName) {

        GamePlugin plugin = PluginManager.getInstance().getPlugin(gameName);
        GameContext.loadResources(gameName);

        // for now, also create a corresponding viewer. The server should really not have knowledge of a UI component.
        // fix this by doing plugin.getModelInstance, then getting the controller from that.
        GamePanel panel  = plugin.getPanelInstance();
        panel.init(null);
        GameBoardViewer viewer = panel.getViewer();

        controller_ = viewer.getController();
    }
View Full Code Here

Examples of com.barrybecker4.game.common.plugin.GamePlugin

     * be loaded for the game specified.
     * @param gameName the current game
     */
    public static void loadResources(String gameName) {
        log(0, "loadGameResources gameName=" + gameName);             // NON-NLS
        GamePlugin plugin = PluginManager.getInstance().getPlugin(gameName);
        assert plugin!=null : "Could not find plugin for " + gameName;
        log(0, "plugin = " + plugin);     // NON-NLS
        log(0, "gameName=" + gameName + " plugin=" + plugin)// NON-NLS
        String resourcePath = plugin.getMsgBundleBase();
        log(2, "searching for "+ resourcePath);          // NON-NLS

        messageContext_.setLogger(logger_);
        messageContext_.setDebugMode(debug_);
        messageContext_.addResourcePath(resourcePath);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.