Package com.aqpproject.tools

Examples of com.aqpproject.tools.Vector2D


    @Override
    public void resetEntity(String entityName, Vector2D position, float rotation) {
        WorldEntity we = m_state.getWorldEntities().get(entityName);
        if (we instanceof WECar) {
            Singleton.getPhysics().resetBody(entityName, position, new Vector2D(), rotation);

        }
    }
View Full Code Here


        return m_sprites.get(name).getRealCenter();
    }

    @Override
    public Vector2D getSpriteSize(String name) {
        return new Vector2D(m_sprites.get(name).getWidth(), m_sprites.get(name).getHeight());
    }
View Full Code Here

        m_actors.get(actorName).setShadowSize(shadowSize);
    }

    @Override
    public Vector2D getResolution() {
        return new Vector2D(m_application.getGraphics().getWidth(), m_application.getGraphics().getHeight());
    }
View Full Code Here

                    float velY = Singleton.getPhysics().getLinearVelocity("player" + i).y;
                    boolean isPoweredDown = car_list.get(i - 1).getPowerDown();
                    boolean isBoosted = car_list.get(i - 1).getBoost();
                    boolean isColliding = car_list.get(i - 1).getColliding();
                    boolean isStatic = car_list.get(i - 1).getIsStaticContact();
                    Vector2D point = car_list.get(i - 1).getContactPoint();
                    Item it = car_list.get(i - 1).getInventory().peek();
                    String type;
                    Integer num_item;

                    if (it == null) {
                        type = "null";
                        num_item = 0;
                    } else {
                        type = it.getType().toString();
                        switch (type) {
                            case "BOMB":
                                type = "Bomb";
                                break;
                            case "MISSILE":
                                type = "Missile";
                                break;
                            case "MINE":
                                type = "Mine";
                                break;
                            case "POWERDOWN":
                                type = "PowerDown";
                                break;
                            case "BOOST":
                                type = "Boost";
                                break;
                            case "TROLL":
                                type = "Troll";
                                break;
                        }
                        num_item = Integer.parseInt(it.getName().substring(4));

                    }
                    theOutput += ";" + name + ";" + posX + ";" + posY + ";" + rot + ";" + velX + ";" + velY + ";" + isPoweredDown + ";" + isBoosted + ";" + isColliding + ";" + point.x + ";" + point.y + ";" + isStatic + ";" + type + ";" + num_item;
                }
                WECar troll_emitter = ((RaceGameState) Singleton.getWorldModel().getState()).getTrollEmitter();
                String troll_emitter_name = "null";
                if (troll_emitter != null) {
                    troll_emitter_name = troll_emitter.getName();
                }

                boolean isTrolling = ((RaceGameState) Singleton.getWorldModel().getState()).getIsTrolling();

                //Items
                ArrayList<String> itemList = new ArrayList<>();
                for (String s : ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().keySet()) {
                    itemList.add(s);
                }
                ArrayList<String> missileList = new ArrayList<>();
                ArrayList<String> bombList = new ArrayList<>();
                ArrayList<String> mineList = new ArrayList<>();
                ArrayList<String> dynamicObjectList = new ArrayList<>();
                for (String s : itemList) {
                    if (s.startsWith("Missile_") && !s.endsWith("_Explosion")) {
                        missileList.add(s);
                    }
                    if (s.startsWith("Bomb_") && !s.endsWith("_Explosion")) {
                        bombList.add(s);
                    }
                    if (s.startsWith("Mine_") && !s.endsWith("_Explosion")) {
                        mineList.add(s);
                    }
                    if (s.startsWith("dynamic")) {
                        dynamicObjectList.add(s);
                    }
                }
                //Missiles
                theOutput += ";" + missileList.size();
                for (String s : missileList) {
                    Vector2D itemPos = Singleton.getPhysics().getBodyPosition(s);
                    float itemRot = Singleton.getVisualisation().getActor(s).rotation;
                    String emitter = ((WEMissile) ((RaceGameState) (Singleton.getWorldModel().getState())).getWorldEntities().get(s)).getEmitter().getName();
                    theOutput += ";" + s + ";" + itemPos.x + ";" + itemPos.y + ";" + itemRot + ";" + emitter;
                }
                //Bombs
                theOutput += ";" + bombList.size();
                for (String s : bombList) {
                    Vector2D itemPos = Singleton.getPhysics().getBodyPosition(s);
                    float itemRot = Singleton.getVisualisation().getActor(s).rotation;
                    String emitter = ((WEBomb) ((RaceGameState) (Singleton.getWorldModel().getState())).getWorldEntities().get(s)).getEmitter().getName();
                    theOutput += ";" + s + ";" + itemPos.x + ";" + itemPos.y + ";" + itemRot + ";" + emitter;
                }
                //Mines
                theOutput += ";" + mineList.size();
                for (String s : mineList) {
                    Vector2D itemPos = Singleton.getPhysics().getBodyPosition(s);
                    float itemRot = Singleton.getVisualisation().getActor(s).rotation;
                    theOutput += ";" + s + ";" + itemPos.x + ";" + itemPos.y + ";" + itemRot;
                }
                //Dynamic objects
                theOutput += ";" + dynamicObjectList.size();
                for (String s : dynamicObjectList) {
                    Vector2D itemPos = Singleton.getPhysics().getBodyPosition(s);
                    float itemRot = Singleton.getVisualisation().getActor(s).rotation;
                    theOutput += ";" + s + ";" + itemPos.x + ";" + itemPos.y + ";" + itemRot;
                }
                //Troll
                theOutput += ";" + isTrolling + ";" + troll_emitter_name;
View Full Code Here

                    }
                } else {
                    ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).getInventory().deleteAll();
                    ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).getInventory().updateMiniatures();
                }
                ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).setSparklingPosition(new Vector2D(pointX, pointY), isStatic);
                ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).setColliding(isColliding);

                Singleton.getPhysics().setLinearVelocity(actorName, new Vector2D(velX, velY));
                Singleton.getPhysics().setBodyPosition(actorName, new Vector2D(posX, posY));
                Singleton.getPhysics().setRotation(actorName, rot);
                if (!((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).getPowerDown() && isPoweredDown) {
                    ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).applyPowerDown();
                } else if (((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).getPowerDown() && !isPoweredDown) {
                    ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).deletePowerDown();
                }
                if (!((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).getBoost() && isBoosted) {
                    ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).applyBoost();
                } else if (((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).getBoost() && !isBoosted) {
                    ((RaceGameState) Singleton.getWorldModel().getState()).getCars().get(i).deleteBoost();
                }
            } catch (NullPointerException e) {
                System.out.println("error update actor");
            }
        }


        //Update missilesingleton.getWorldModel().
        Set<String> currentItemList = ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().keySet();
        ArrayList<String> newItemList = new ArrayList();
        ArrayList<String> currentMissileList = new ArrayList();
        ArrayList<String> currentBombList = new ArrayList();
        ArrayList<String> currentMineList = new ArrayList();
        ArrayList<String> currentDynamicObjectList = new ArrayList();
        for (String it : currentItemList) {
            if (it.startsWith("Missile_") && !it.endsWith("_Explosion")) {
                currentMissileList.add(it);
            } else if (it.startsWith("Bomb_") && !it.endsWith("_Explosion")) {
                currentBombList.add(it);
            } else if (it.startsWith("Mine_") && !it.endsWith("_Explosion")) {
                currentMineList.add(it);
            } else if (it.startsWith("dynamic")) {
                currentDynamicObjectList.add(it);
            }
        }



        int cptMissiles = Integer.parseInt(st.nextToken());
        for (int i = 0; i < cptMissiles; i++) {
            String missileName = st.nextToken();
            Float posX = Float.parseFloat(st.nextToken());
            Float posY = Float.parseFloat(st.nextToken());
            Float rot = Float.parseFloat(st.nextToken());
            String emitter = st.nextToken();
            newItemList.add(missileName);
            if (((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().containsKey(missileName)) {
                Singleton.getPhysics().setBodyPosition(missileName, new Vector2D(posX, posY));
                Singleton.getPhysics().setRotation(missileName, rot);
            } else {
                ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().put(missileName, new WEMissile(missileName, new Vector2D(posX, posY), rot, (WECar) ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().get(emitter), ((RaceGameState) Singleton.getWorldModel().getState())));
            }
        }
        int cptBomb = Integer.parseInt(st.nextToken());
        for (int i = 0; i < cptBomb; i++) {
            String bombName = st.nextToken();
            Float posX = Float.parseFloat(st.nextToken());
            Float posY = Float.parseFloat(st.nextToken());
            Float rot = Float.parseFloat(st.nextToken());
            String emitter = st.nextToken();
            newItemList.add(bombName);
            if (((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().containsKey(bombName)) {
                Singleton.getPhysics().setBodyPosition(bombName, new Vector2D(posX, posY));
                Singleton.getPhysics().setRotation(bombName, rot);
                //Singleton.getVisualisation().updateActor(missileName, posX, posY, rot);
            } else {
                ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().put(bombName, new WEBomb(bombName, new Vector2D(posX, posY), rot, (WECar) ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().get(emitter), ((RaceGameState) Singleton.getWorldModel().getState())));
            }
        }
        int cptMine = Integer.parseInt(st.nextToken());
        for (int i = 0; i < cptMine; i++) {
            String mineName = st.nextToken();
            Float posX = Float.parseFloat(st.nextToken());
            Float posY = Float.parseFloat(st.nextToken());
            Float rot = Float.parseFloat(st.nextToken());
            newItemList.add(mineName);
            if (!((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().containsKey(mineName)) {
                ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().put(mineName, new WEMine(mineName, new Vector2D(posX, posY), rot, null, ((RaceGameState) Singleton.getWorldModel().getState())));
            }
        }
        int cptDynamicObjects = Integer.parseInt(st.nextToken());
        for (int i = 0; i < cptDynamicObjects; i++) {
            String dynamicObjectName = st.nextToken();
            Float posX = Float.parseFloat(st.nextToken());
            Float posY = Float.parseFloat(st.nextToken());
            Float rot = Float.parseFloat(st.nextToken());
            newItemList.add(dynamicObjectName);
            if (((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().containsKey(dynamicObjectName)) {
                Singleton.getPhysics().setBodyPosition(dynamicObjectName, new Vector2D(posX, posY));
                Singleton.getPhysics().setRotation(dynamicObjectName, rot);
                //Singleton.getVisualisation().updateActor(missileName, posX, posY, rot);
            } else {
                //rien
            }
        }

        boolean isTrolling = Boolean.parseBoolean(st.nextToken());
        String emitter = st.nextToken();
        if (isTrolling) {
            ((RaceGameState) Singleton.getWorldModel().getState()).activateTroll((WECar) ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().get(emitter));
        }

        //Finish list
        int cptFinish = Integer.parseInt(st.nextToken());
        ArrayList<String> nameList = new ArrayList<>();
        ArrayList<Long> timeList = new ArrayList<>();

        for (int i = 0; i < cptFinish; i++) {
            nameList.add(st.nextToken());
            timeList.add(Long.parseLong(st.nextToken()));
        }

        ((RaceGameState) Singleton.getWorldModel().getState()).setFinishNames(nameList);
        ((RaceGameState) Singleton.getWorldModel().getState()).setFinishTimes(timeList);

        //Suppression des items
        for (String str : currentMissileList) {
            if (newItemList.indexOf(str) < 0) {
                ((WEMissile) ((RaceGameState) Singleton.getWorldModel().getState()).getWorldEntities().get(str)).startStaticContact(new Vector2D(0, 0), new Vector2D(0, 0));
                // Singleton.getVisualisation().deleteActor(str,false);
                // ((RaceGameState)Singleton.getWorldModel().getState()).getWorldEntities().get(str).setActive(false);
            }
        }
        for (String str : currentBombList) {
View Full Code Here

    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

    public void control(Control control, String entity) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Vector2D getCameraPosition() {
        return new Vector2D();
    }
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("Options", "ar30whi");
        m_worldTextEntities.put("Title", new WEAlphaTextButton("Title", m_menuX + m_menuWidth / 2 - textWidth / 2, m_resolution.y - 50, "Options", "ar30whi"));
        m_worldTextEntities.put("MusicVolume", new WEAlphaTextButton("MusicVolume", m_menuX + 50, m_resolution.y - 150, "Music Volume", "ar30whi"));
        m_worldTextEntities.put("FXVolume", new WEAlphaTextButton("FXVolume", m_menuX + 50, m_resolution.y - 250, "FX Volume", "ar30whi"));
        m_worldTextEntities.put("Accept", new WEAlphaTextButton("Accept", m_menuX + 50, m_resolution.y - 350, "Accept", "ar30whi"));
        m_worldTextEntities.put("Cancel", new WEAlphaTextButton("Cancel", m_menuX + 50, m_resolution.y - 400, "Cancel", "ar30whi"));

        //Texts initialization
        ((WEAlphaTextButton) m_worldTextEntities.get("MusicVolume")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("FXVolume")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Accept")).m_setMInitialize(true);
        ((WEAlphaTextButton) m_worldTextEntities.get("Cancel")).m_setMInitialize(true);

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

        //Arrows
        m_worldEntities.put("arrow_music_volume", new WEMenu("arrow_music_volume", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 178), 0, 1));
        m_worldEntities.put("arrow_fx_volume", new WEMenu("arrow_fx_volume", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 278), 0, 2));
        m_worldEntities.put("arrow_accept", new WEMenu("arrow_accept", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 378), 0, 2));
        m_worldEntities.put("arrow_cancel", new WEMenu("arrow_cancel", "arrow", new Vector2D(m_minX + m_menuX + 10, m_resolution.y + m_minY - 428), 0, 2));

        //Speakers
        m_worldEntities.put("speaker_music", new WEMenu("speaker_music", "speaker", new Vector2D(m_minX + m_menuX + 50, m_resolution.y + m_minY - 228), 0, 1));
        m_worldEntities.put("speaker_fx", new WEMenu("speaker_fx", "speaker", new Vector2D(m_minX + m_menuX + 50, m_resolution.y + m_minY - 328), 0, 1));

        //Barre de volume musique
        int i = 1;
        m_barsList.put("music_bar" + i, new WEMenu("music_bar" + i, "bar_left", new Vector2D(m_minX + m_menuX + 100, m_resolution.y + m_minY - 228), 0, 1));
        for (i = 2; i < 100; i++) {
            m_barsList.put("music_bar" + i, new WEMenu("music_bar" + i, "bar", new Vector2D(m_minX + m_menuX + 100 + i * 2, m_resolution.y + m_minY - 228), 0, 1));
        }
        m_barsList.put("music_bar" + i, new WEMenu("music_bar" + i, "bar_right", new Vector2D(m_minX + m_menuX + 300, m_resolution.y + m_minY - 228), 0, 1));

        //Barre de volume fx
        i = 1;
        m_barsList.put("fx_bar" + i, new WEMenu("fx_bar" + i, "bar_left", new Vector2D(m_minX + m_menuX + 100, m_resolution.y + m_minY - 328), 0, 1));
        for (i = 2; i < 100; i++) {
            m_barsList.put("fx_bar" + i, new WEMenu("fx_bar" + i, "bar", new Vector2D(m_minX + m_menuX + 100 + i * 2, m_resolution.y + m_minY - 328), 0, 1));
        }
        m_barsList.put("fx_bar" + i, new WEMenu("fx_bar" + i, "bar_right", new Vector2D(m_minX + m_menuX + 300, m_resolution.y + m_minY - 328), 0, 1));

        updateBars();
    }
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

* @author Clément
*/
public class WEBomb extends WorldPhysicEntity {

    public WEBomb(String name, Vector2D pos, float rotation, WECar emitter, RaceGameState state) {
        super(name, "bomb", pos, rotation, new Vector2D(32, 32), 0, 0, 0, 1);
        m_emitter = emitter;
        m_lastVelocity = emitter.getLinearVelocity().translate(getDirection().scale(300.f));
        Singleton.getPhysics().setLinearVelocity(name, m_lastVelocity);
        m_state = state;
        m_boundsCount = 0;
View Full Code Here

TOP

Related Classes of com.aqpproject.tools.Vector2D

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.