Package com.aqpproject.worldmodel.game.entity

Examples of com.aqpproject.worldmodel.game.entity.WEMenu


    private void createEntities() {

        Singleton.getVisualisation().createMap(Singleton.getWorldModel().getMaps().get("MapMenu").getPath());
        Singleton.getVisualisation().setCameraPosition(m_decX, m_decY);
        m_worldEntities.put("bandeauY", new WEMenu("bandeauY", "bandeauY", new Vector2D(975, 1000), 0, 1));
        System.out.println(Singleton.getVisualisation().getSpriteSize("bandeauY").toString());

        float textWidth = calcWidth("High scores", "ar30whi");

        m_title = new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - textWidth / 2, m_resolution.y - 50, "High scores", "ar30whi");
        String selected_car = m_miniaturesList.get(m_currentSelectedMap);
        String display_name = m_displayNameList.get(selected_car);

        m_worldTextEntities.put("Map", new WEAlphaTextButton("Map", m_menuX + 50, m_resolution.y - 150, display_name, "ar30whi"));
        ((WEAlphaTextButton) m_worldTextEntities.get("Map")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Map")).setSelect(true);

        m_worldTextEntities.put("Quit", new WEAlphaTextButton("Quit", m_menuX + 50, m_resolution.y - 480, "Quit", "ar30whi"));
        ((WEAlphaTextButton) m_worldTextEntities.get("Quit")).m_setMInitialize(true);

        m_worldEntities.put("arrow_map", new WEMenu("arrow_map", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_qui", new WEMenu("arrow_quit", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 508), 0, 2));


        for (int i = 1; i <= 5; i++) {
            m_worldTextEntities.put("Player" + i, new WEAlphaTextButton("Player" + i, m_menuX + 50, m_resolution.y - 150 - 50 * i, "", "ar30whi"));
            ((WEAlphaTextButton) m_worldTextEntities.get("Player" + i)).m_setMInitialize(true);
View Full Code Here


    private void createEntities() {

        Singleton.getVisualisation().createMap(Singleton.getWorldModel().getMaps().get("MapMenu").getPath());
        Singleton.getVisualisation().setCameraPosition(1420, 1750);

        m_worldEntities.put("bandeauY1", new WEMenu("bandeauY1", "bandeauY", new Vector2D(975, 1000), 0, 1));

        float textWidth = calcWidth("Create game", "ar30whi");

        m_worldTextEntities.put("Title", new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - textWidth / 2, m_resolution.y - 50, "Create game", "ar30whi"));
        m_worldTextEntities.put("Mode", new WEAlphaTextButton("Mode", m_menuX + 50, m_resolution.y - 150, "Mode", "ar30whi"));
        m_worldTextEntities.put("ModeName", new WEAlphaTextButton("ModeName", m_menuX + m_menuWidth - 300, m_resolution.y - 150, m_modesList.get(m_gameMode), "ar30whi"));
        m_worldTextEntities.put("Map", new WEAlphaTextButton("Map", m_menuX + 50, m_resolution.y - 200, "Map", "ar30whi"));
        m_worldTextEntities.put("MapName", new WEAlphaTextButton("MapName", m_menuX + m_menuWidth - 300, m_resolution.y - 200, m_mapDisplayList.get(m_selectedMap), "ar30whi"));
        m_worldTextEntities.put("Players", new WEAlphaTextButton("Players", m_menuX + 50, m_resolution.y - 250, "Players #", "ar30whi"));
        m_worldTextEntities.put("PlayersNum", new WEAlphaTextButton("PlayersNum", m_menuX + m_menuWidth - 300, m_resolution.y - 250, String.valueOf(m_playersNum), "ar30whi"));
        m_worldTextEntities.put("Name", new WEAlphaTextButton("Name", m_menuX + 50, m_resolution.y - 350, "Name", "ar30whi"));
        m_worldTextEntities.put("Pseudo", new WEAlphaTextButton("Pseudo", m_menuX + m_menuWidth - 300, m_resolution.y - 350, "Pseudo", "ar30whi"));
        m_worldTextEntities.put("Car", new WEAlphaTextButton("Car", m_menuX + 50, m_resolution.y - 400, "Car", "ar30whi"));
        m_worldTextEntities.put("Ok", new WEAlphaTextButton("Ok", m_menuX + 50, m_resolution.y - 500, "Create", "ar30whi"));
        m_worldTextEntities.put("Cancel", new WEAlphaTextButton("Cancel", m_menuX + 50, m_resolution.y - 600, "Cancel", "ar30whi"));

        //Initialisation
        ((WEAlphaTextButton) m_worldTextEntities.get("Mode")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Mode")).setSelect(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("ModeName")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("ModeName")).setSelect(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Map")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("MapName")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Players")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("PlayersNum")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Name")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Pseudo")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Car")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Ok")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Cancel")).m_setMInitialize(true);

        //Car miniature
        m_worldEntities.put("car_mini", new WEMenu("car_mini", m_spritesNameList.get(Singleton.getOptionsController().getCar()), new Vector2D(m_minX + m_menuX + m_menuWidth - 300, m_resolution.y + m_minY - 428), 0, 1));


        //Arrows
        m_worldEntities.put("arrow_mode", new WEMenu("arrow_mode", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_map", new WEMenu("arrow_map", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 228), 0, 2));
        m_worldEntities.put("arrow_players", new WEMenu("arrow_players", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 278), 0, 2));
        m_worldEntities.put("arrow_name", new WEMenu("arrow_name", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 378), 0, 2));
        m_worldEntities.put("arrow_car", new WEMenu("arrow_car", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 428), 0, 2));
        m_worldEntities.put("arrow_ok", new WEMenu("arrow_ok", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 528), 0, 2));
        m_worldEntities.put("arrow_cancel", new WEMenu("arrow_cancel", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 628), 0, 2));


    }
View Full Code Here

    private void createEntities() {

        Singleton.getVisualisation().createMap(Singleton.getWorldModel().getMaps().get("MapMenu").getPath());
        Singleton.getVisualisation().setCameraPosition(1420, 1750);

        m_worldEntities.put("bandeauY", new WEMenu("bandeauY", "bandeauY", new Vector2D(975, 1000), 0, 1));

        //Texts creation
        float title_width = calcWidth("Multiplayer", "ar30whi");
        m_worldTextEntities.put("Title", new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - title_width / 2, m_resolution.y - 50, "Multiplayer", "ar30whi"));
        m_worldTextEntities.put("Create", new WEAlphaTextButton("Create", m_menuX + 50, m_resolution.y - 150, "Create", "ar30whi"));
        m_worldTextEntities.put("Join", new WEAlphaTextButton("Join", m_menuX + 50, m_resolution.y - 200, "Join", "ar30whi"));
        m_worldTextEntities.put("Cancel", new WEAlphaTextButton("Cancel", m_menuX + 50, m_resolution.y - 300, "Cancel", "ar30whi"));

        //Texts initialization
        ((WEAlphaTextButton) m_worldTextEntities.get("Create")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Create")).setSelect(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Join")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Cancel")).m_setMInitialize(true);

        //Arrows
        m_worldEntities.put("arrow_create", new WEMenu("arrow_create", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_join", new WEMenu("arrow_join", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 228), 0, 2));
        m_worldEntities.put("arrow_cancel", new WEMenu("arrow_cancel", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 328), 0, 2));
    }
View Full Code Here

    /**
     * Create the entities
     */
    private void createEntities() {

        m_worldEntities.put("logo", new WEMenu("logo", "logo", new Vector2D(-256, -128), 0, 1));
        Singleton.getVisualisation().setActorAlpha("logo", 0.0f);

        m_worldEntities.put("logo_titre_v2", new WEMenu("logo_titre_v2", "logo_titre_v2", new Vector2D(-512, -256), 0, 1));
        Singleton.getVisualisation().setActorAlpha("logo_titre_v2", 0.0f);

        m_worldEntities.put("start_deg", new WEMenu("start_deg", "start_deg", new Vector2D(-64, -320), 0, 1));
        Singleton.getVisualisation().setActorAlpha("start_deg", 0.0f);

    }
View Full Code Here

    private void createEntities() {

        Singleton.getVisualisation().createMap(Singleton.getWorldModel().getMaps().get("MapMenu").getPath());
        Singleton.getVisualisation().setCameraPosition(1420, 1750);

        m_worldEntities.put("bandeauY", new WEMenu("bandeauY", "bandeauY", new Vector2D(975, 1000), 0, 1));

        float textWidth = calcWidth("AQP Racing", "ar30whi");
        m_worldTextEntities.put("Title", new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - textWidth / 2, m_resolution.y - 50, "AQP Racing", "ar30whi"));
        m_worldTextEntities.put("Single", new WEAlphaTextButton("Single", m_menuX + 50, m_resolution.y - 150, "Singleplayer", "ar30whi"));
        m_worldTextEntities.put("Multi", new WEAlphaTextButton("Multi", m_menuX + 50, m_resolution.y - 200, "Multiplayer", "ar30whi"));
        m_worldTextEntities.put("HighScores", new WEAlphaTextButton("HighScores", m_menuX + 50, m_resolution.y - 250, "High Scores", "ar30whi"));
        m_worldTextEntities.put("Options", new WEAlphaTextButton("Options", m_menuX + 50, m_resolution.y - 300, "Options", "ar30whi"));
        m_worldTextEntities.put("Quit", new WEAlphaTextButton("Quit", m_menuX + 50, m_resolution.y - 350, "Quit", "ar30whi"));

        ((WEAlphaTextButton) m_worldTextEntities.get("Single")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Multi")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("HighScores")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Options")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Quit")).m_setMInitialize(true);

        ((WEAlphaTextButton) m_worldTextEntities.get("Single")).setSelect(true);

        //Arrows
        m_worldEntities.put("arrow_single", new WEMenu("arrow_single", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_continue", new WEMenu("arrow_multi", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 228), 0, 2));
        m_worldEntities.put("arrow_highscores", new WEMenu("arrow_highscores", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 278), 0, 2));
        m_worldEntities.put("arrow_options", new WEMenu("arrow_options", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 328), 0, 2));
        m_worldEntities.put("arrow_quit", new WEMenu("arrow_quit", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 378), 0, 2));


    }
View Full Code Here

        Singleton.getVisualisation().createMap(Singleton.getWorldModel().getMaps().get("MapMenu").getPath());
        Singleton.getVisualisation().setCameraPosition(m_decX, m_decY);

        //Bandeau
        m_worldEntities.put("bandeauY", new WEMenu("bandeauY", "bandeauY", new Vector2D(975, 1000), 0, 1));

        //Stars
        for (int i = 0; i < 5; i++) {
            m_worldEntities.put("vel" + i, new WEMenu("vel" + i, "bug", new Vector2D(m_minX + m_menuX + m_menuWidth - 32 * 5 - 10 + 32 * i, m_resolution.y + m_minY - 275), 0, 2));
            m_worldEntities.put("man" + i, new WEMenu("man" + i, "bug", new Vector2D(m_minX + m_menuX + m_menuWidth - 32 * 5 - 10 + 32 * i, m_resolution.y + m_minY - 325), 0, 2));
        }

        //Title
        float textWidth = calcWidth("Car selection", "ar30whi");
        m_title = new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - textWidth / 2, m_resolution.y - 50, "Car selection", "ar30whi");
        String selected_car = m_miniaturesList.get(m_currentSelectedCar);
        String display_name = m_displayNameList.get(selected_car);

        //Car, continue and quit texts
        m_car = new WEAlphaTextButton("Car", m_menuX + 50, m_resolution.y - 150, display_name, "ar30whi");
        m_car.setSelect(true);
        m_car.m_setMInitialize(true);

        m_quit = new WEAlphaTextButton("Quit", m_menuX + 50, m_resolution.y - 450, "Cancel", "ar30whi");
        m_quit.m_setMInitialize(true);

        String lib_select;
        if (Singleton.getOptionsController().getMode().equals("MONO")) {
            lib_select = "Start !";
        } else {
            lib_select = "Select";
        }

        m_continue = new WEAlphaTextButton("Continue", m_menuX + 50, m_resolution.y - 400, lib_select, "ar30whi");
        m_continue.m_setMInitialize(true);

        //Characteristics texts
        m_velocity = new WEAlphaTextButton("Velocity", m_menuX + 50, m_resolution.y - 250, "Velocity", "ar30whi");
        m_velocity.m_setMInitialize(true);
        m_maniability = new WEAlphaTextButton("Maniability", m_menuX + 50, m_resolution.y - 300, "Maniability", "ar30whi");
        m_maniability.m_setMInitialize(true);

        //Miniatures
        m_miniature = new WEMenu("Miniature", m_spritesList.get(selected_car), new Vector2D(m_minX + m_menuX + m_menuWidth - 170, m_resolution.y + m_minY - 150 - m_carHeight), 0, 1);

        //Arrows
        m_worldEntities.put("arrow_sel_car", new WEMenu("arrow_sel_car", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_continue", new WEMenu("arrow_continue", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 428), 0, 2));
        m_worldEntities.put("arrow_quit", new WEMenu("arrow_quit", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 478), 0, 2));
    }
View Full Code Here

                String selected_car = m_miniaturesList.get(m_currentSelectedCar);
                String display_name = m_displayNameList.get(selected_car);
                m_car.updateText(display_name);
                m_miniature.destroy();
                // Singleton.getVisualisation().deleteActor("Miniature", true);
                m_miniature = new WEMenu("Miniature", m_spritesList.get(selected_car), new Vector2D(m_minX + m_menuX + m_menuWidth - 170, m_resolution.y + m_minY - 150 - m_carHeight), 0, 1);;
                for (int i = 0; i < 5; i++) {
                    if (m_velocityList.get(m_miniaturesList.get(m_currentSelectedCar)) > i) {
                        Singleton.getVisualisation().updateActorFrame("vel" + i, 1);
                    } else {
                        Singleton.getVisualisation().updateActorFrame("vel" + i, 2);
View Full Code Here

    private void createEntities() {

        Singleton.getVisualisation().createMap(Singleton.getWorldModel().getMaps().get("MapMenu").getPath());
        Singleton.getVisualisation().setCameraPosition(1420, 1750);

        m_worldEntities.put("bandeauY1", new WEMenu("bandeauY1", "bandeauY", new Vector2D(975, 1000), 0, 1));

        float textWidth = calcWidth("Join game", "ar30whi");

        //Texts
        m_worldTextEntities.put("Title", new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - textWidth / 2, m_resolution.y - 50, "Join game", "ar30whi"));
        m_worldTextEntities.put("Port", new WEAlphaTextButton("Port", m_menuX + 50, m_resolution.y - 150, "Port", "ar30whi"));
        m_worldTextEntities.put("PortNum", new WEAlphaTextButton("PortNum", m_menuX + m_menuWidth - 300, m_resolution.y - 150, m_port, "ar30whi"));
        m_worldTextEntities.put("IP", new WEAlphaTextButton("IP", m_menuX + 50, m_resolution.y - 200, "IP", "ar30whi"));
        m_worldTextEntities.put("IPAddress", new WEAlphaTextButton("IPAddress", m_menuX + m_menuWidth - 300, m_resolution.y - 200, m_IPAddress, "ar30whi"));
        m_worldTextEntities.put("Name", new WEAlphaTextButton("Name", m_menuX + 50, m_resolution.y - 300, "Name", "ar30whi"));
        m_worldTextEntities.put("Pseudo", new WEAlphaTextButton("Pseudo", m_menuX + m_menuWidth - 300, m_resolution.y - 300, m_pseudo, "ar30whi"));
        m_worldTextEntities.put("Car", new WEAlphaTextButton("Car", m_menuX + 50, m_resolution.y - 350, "Car", "ar30whi"));
        m_worldTextEntities.put("Map", new WEAlphaTextButton("Map", m_menuX + 50, m_resolution.y - 400, "Map", "ar30whi"));
        m_worldTextEntities.put("MapName", new WEAlphaTextButton("MapName", m_menuX + m_menuWidth - 300, m_resolution.y - 400, "", "ar30whi"));
        m_worldTextEntities.put("Connect", new WEAlphaTextButton("Connect", m_menuX + 50, m_resolution.y - 500, "Connect", "ar30whi"));
        m_worldTextEntities.put("Cancel", new WEAlphaTextButton("Cancel", m_menuX + 50, m_resolution.y - 600, "Cancel", "ar30whi"));

        //Initialisation
        ((WEAlphaTextButton) m_worldTextEntities.get("Port")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Port")).setSelect(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("PortNum")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("PortNum")).setSelect(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("IP")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("IPAddress")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Name")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Pseudo")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Map")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("MapName")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Car")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Connect")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Cancel")).m_setMInitialize(true);

        //Car miniature
        m_worldEntities.put("car_mini", new WEMenu("car_mini", m_spritesNameList.get(Singleton.getOptionsController().getCar()), new Vector2D(m_minX + m_menuX + m_menuWidth - 300, m_resolution.y + m_minY - 378), 0, 1));

        //Arrows
        m_worldEntities.put("arrow_port", new WEMenu("arrow_port", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_IP", new WEMenu("arrow_IP", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 228), 0, 2));
        m_worldEntities.put("arrow_name", new WEMenu("arrow_name", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 328), 0, 2));
        m_worldEntities.put("arrow_car", new WEMenu("arrow_car", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 378), 0, 2));
        m_worldEntities.put("arrow_map", new WEMenu("arrow_map", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 428), 0, 2));
        m_worldEntities.put("arrow_connect", new WEMenu("arrow_connect", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 528), 0, 2));
        m_worldEntities.put("arrow_cancel", new WEMenu("arrow_cancel", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 628), 0, 2));
    }
View Full Code Here

TOP

Related Classes of com.aqpproject.worldmodel.game.entity.WEMenu

Copyright © 2018 www.massapicom. 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.