Examples of Npc


Examples of com.coffeerpg.npc.NPC

    bufferGraphics = offscreen.getGraphics();

    /* init the player */
    p = new Player(360, 300);
    /* init the other GUI elements */
    npc = new NPC(690, 420);

    /* init the map */
    mainMap = new GameMap(this);
    addKeyListener(this);
    addKeyListener(p);
View Full Code Here

Examples of entidades.NPC

     * hables.
     *
     * @param profesor NPC - El profesor que te ha retado.
     */
    private void retoCombate(final Entity param) {
        NPC profesor = (NPC) param;
        DataManager.setRival(profesor.name);
        profeReto = true;
        if (gameReady2) {
            ResourceManager.getMusic("reto").loop();
            setNpcText(profesor.getFrase());
            muestraDialogo(npcText);
            gameReady2 = false;
        }
    }
View Full Code Here

Examples of entidades.NPC

    /**
     * Método para crear y añadir los NPC
     */
    private void crearNPC() {
        player = new Jugador(120, 92, ResourceManager.getParameter("SpriteProtagonista"), 42, 57);
        NPC npc1 = new NPC(124, 80, ResourceManager.getParameter("SpriteNPC_mas01"), 45, 57, DIR_ABA, "npc1", "npc1_p");
        NPC npc2 = new NPC(116, 48, ResourceManager.getParameter("SpriteNPC_mas02"), 48, 60, DIR_DER, "npc2", "npc2_p");
        NPC npc3 = new NPC(115, 54, ResourceManager.getParameter("SpriteNPC_fem01"), 48, 57, DIR_IZQ, "npc3", "npc3_p");
        NPC npc4 = new NPC(115, 76, ResourceManager.getParameter("SpriteNPC_fem02"), 42, 60, DIR_DER, "npc4", "npc4_p");
        NPC npc5 = new NPC(115, 42, ResourceManager.getParameter("SpriteNPC_mas06"), 48, 60, DIR_DER, "npc5", "npc5_p");
        NPC npc6 = new NPC(125, 20, ResourceManager.getParameter("SpriteNPC_mas07"), 42, 60, DIR_IZQ, "npc6", "npc6_p");
        NPC npc7 = new NPC(106, 6, ResourceManager.getParameter("SpriteNPC_mas08"), 42, 60, DIR_IZQ, "npc7", "npc7_p");
        NPC npc8 = new NPC(104, 6, ResourceManager.getParameter("SpriteNPC_fem05"), 42, 60, DIR_DER, "npc8", "npc8_p");
        NPC npc9 = new NPC(121, 5, ResourceManager.getParameter("SpriteNPC_mas13"), 42, 60, DIR_ARR, "npc9", "npc9_p");
        NPC npc10 = new NPC(83, 13, ResourceManager.getParameter("SpriteNPC_mas03"), 42, 57, DIR_ARR, "npc10", "npc10_p");
        NPC npc11 = new NPC(47, 4, ResourceManager.getParameter("SpriteNPC_fem04"), 42, 60, DIR_ABA, "npc11", "npc11_p");
        NPC npc12 = new NPC(45, 13, ResourceManager.getParameter("SpriteNPC_mas14"), 42, 60, DIR_ARR, "npc12", "npc12_p");
        NPC npc13 = new NPC(43, 13, ResourceManager.getParameter("SpriteNPC_mas04"), 42, 57, DIR_ARR, "npc13", "npc13_p");
        NPC npc14 = new NPC(41, 13, ResourceManager.getParameter("SpriteNPC_fem03"), 45, 57, DIR_ARR, "npc14", "npc14_p");
        NPC npc15 = new NPC(37, 13, ResourceManager.getParameter("SpriteNPC_mas05"), 42, 60, DIR_IZQ, "npc15", "npc15_p");
        NPC npc16 = new NPC(2, 7, ResourceManager.getParameter("SpriteNPC_mas12"), 42, 60, DIR_IZQ, "npc16", "npc16_p");
        NPC npc17 = new NPC(124, 63, ResourceManager.getParameter("SpriteNPC_mas11"), 45, 57, DIR_IZQ, "npc17", "npc17_p");
        NPC npc18 = new NPC(9, 13, ResourceManager.getParameter("SpriteNPC_mas10"), 42, 60, DIR_ARR, "npc18", "npc18_p");
        NPC npc19 = new NPC(7, 13, ResourceManager.getParameter("SpriteNPC_mas09"), 48, 60, DIR_ARR, "npc19", "npc19_p");
        NPC npc20 = new NPC(57, 7, ResourceManager.getParameter("SpriteNPC_mas15"), 42, 60, DIR_ABA, "npc20", "npc20_p");
        julio1 = new NPC(120, 67, ResourceManager.getParameter("SpriteNPC_Profe_Julio"), 42, 57, DIR_ABA, "julio1", "julio1_p");
        monica = new NPC(120, 32, ResourceManager.getParameter("SpriteNPC_Profe_Monica"), 42, 57, DIR_ABA, "monica", "monica_p");
        nacho = new NPC(120, 10, ResourceManager.getParameter("SpriteNPC_Profe_Nacho"), 42, 57, DIR_ABA, "nacho", "nacho_p");
        quim = new NPC(71, 8, ResourceManager.getParameter("SpriteNPC_Profe_Quim"), 42, 57, DIR_DER, "quim", "quim_p");
        julio2 = new NPC(38, 8, ResourceManager.getParameter("SpriteNPC_Profe_Julio"), 42, 57, DIR_DER, "julio2", "julio2_p");

        arrayNPC.add(npc1);
        arrayNPC.add(npc2);
        arrayNPC.add(npc3);
        arrayNPC.add(npc4);
View Full Code Here

Examples of entidades.NPC

    /**
     * Método para crear y añadir los NPC
     */
    private void crearNPC() {
        player = new Jugador(20, 5, ResourceManager.getParameter("SpriteProtagonista"), 42, 57);
        NPC julio = new NPC(17, 8, ResourceManager.getParameter("SpriteNPC_Profe_Julio"), 42, 57, DIR_DER, "julio", "julio_c");
        NPC monica = new NPC(17, 11, ResourceManager.getParameter("SpriteNPC_Profe_Monica"), 42, 57, DIR_DER, "monica", "monica_c");
        NPC quim = new NPC(23, 8, ResourceManager.getParameter("SpriteNPC_Profe_Quim"), 42, 57, DIR_IZQ, "quim", "quim_c");
        NPC nacho = new NPC(23, 11, ResourceManager.getParameter("SpriteNPC_Profe_Nacho"), 42, 57, DIR_IZQ, "nacho", "nacho_c");
        NPC npc1 = new NPC(13, 11, ResourceManager.getParameter("SpriteNPC_mas11"), 45, 57, DIR_ARR, "npc1", "npc1_c");
        NPC npc2 = new NPC(27, 11, ResourceManager.getParameter("SpriteNPC_fem05"), 42, 60, DIR_IZQ, "npc2", "npc2_c");
        NPC npc3 = new NPC(31, 11, ResourceManager.getParameter("SpriteNPC_mas08"), 42, 60, DIR_IZQ, "npc3", "npc3_c");
        NPC npc4 = new NPC(5, 17, ResourceManager.getParameter("SpriteNPC_mas07"), 42, 60, DIR_ABA, "npc4", "npc4_c");
        NPC npc5 = new NPC(9, 17, ResourceManager.getParameter("SpriteNPC_mas02"), 48, 60, DIR_DER, "npc5", "npc5_c");
        NPC npc6 = new NPC(13, 17, ResourceManager.getParameter("SpriteNPC_mas04"), 42, 57, DIR_DER, "npc6", "npc6_c");
        NPC npc7 = new NPC(27, 17, ResourceManager.getParameter("SpriteNPC_mas05"), 42, 60, DIR_IZQ, "npc7", "npc7_c");
        NPC npc8 = new NPC(31, 17, ResourceManager.getParameter("SpriteNPC_mas10"), 42, 60, DIR_ABA, "npc8", "npc8_c");
        NPC npc9 = new NPC(35, 17, ResourceManager.getParameter("SpriteNPC_mas09"), 48, 60, DIR_ABA, "npc9", "npc9_c");
        NPC npc10 = new NPC(5, 23, ResourceManager.getParameter("SpriteNPC_mas01"), 45, 57, DIR_ABA, "npc10", "npc10_c");
        NPC npc11 = new NPC(9, 23, ResourceManager.getParameter("SpriteNPC_mas14"), 42, 60, DIR_ABA, "npc11", "npc11_c");
        NPC npc12 = new NPC(13, 23, ResourceManager.getParameter("SpriteNPC_mas13"), 42, 60, DIR_ABA, "npc12", "npc12_c");
        NPC npc13 = new NPC(27, 23, ResourceManager.getParameter("SpriteNPC_mas12"), 42, 60, DIR_IZQ, "npc13", "npc13_c");

        arrayNPC.add(npc1);
        arrayNPC.add(npc2);
        arrayNPC.add(npc3);
        arrayNPC.add(npc4);
View Full Code Here

Examples of games.stendhal.client.entity.NPC

   * @param g2d
   *            The graphics to drawn on.
   */
  @Override
  protected void drawTop(final Graphics2D g2d, final int x, final int y, final int width, final int height) {
    NPC npc = (NPC) entity;
    super.drawTop(g2d, x, y, width, height);
       
    if (npc.getIdea() != null) {
      Sprite sprite = SpriteStore.get().getSprite("data/sprites/ideas/" + npc.getIdea() + ".png");
      sprite.draw(g2d, x + (width * 3 / 4), y - 10);
    }

   
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.NPC

    final Player player2 = PlayerTestHelper.createPlayer("player2");
    processor.addPlayer(player2);
    zone.add(player2);

    final NPC npc = new SpeakerNPC("npc");
    zone.add(npc);
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.NPC

    final BarMaidNPC barmaidConfigurator = new BarMaidNPC();

    final StendhalRPZone zone = new StendhalRPZone("testzone");
    barmaidConfigurator.configureZone(zone, null);
    assertFalse(zone.getNPCList().isEmpty());
    final NPC barMaid = zone.getNPCList().get(0);
    assertThat(barMaid.getName(), is("Siandra"));
    assertThat(barMaid.getDescription(), is("You see a pretty young bar maid."));
  }
View Full Code Here

Examples of gwlpr.database.entities.Npc

    public void edit(Npc npc) throws NonexistentEntityException, Exception {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Npc persistentNpc = em.find(Npc.class, npc.getId());
            Weapon weaponsOld = persistentNpc.getWeapons();
            Weapon weaponsNew = npc.getWeapons();
            if (weaponsNew != null) {
                weaponsNew = em.getReference(weaponsNew.getClass(), weaponsNew.getId());
                npc.setWeapons(weaponsNew);
            }
View Full Code Here

Examples of gwlpr.database.entities.Npc

    public void destroy(Integer id) throws NonexistentEntityException {
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Npc npc;
            try {
                npc = em.getReference(Npc.class, id);
                npc.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The npc with id " + id + " no longer exists.", enfe);
            }
            Weapon weapons = npc.getWeapons();
            if (weapons != null) {
                weapons.getNpcCollection().remove(npc);
                weapons = em.merge(weapons);
            }
            em.remove(npc);
View Full Code Here

Examples of net.citizensnpcs.api.npc.NPC

        else if (((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getEntityType() == EntityType.WOLF) {
            ((Wolf)((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getEntity()).setSitting(false);
        }

        else {
            NPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen();
            SittingTrait trait = npc.getTrait(SittingTrait.class);

            if (!npc.hasTrait(SittingTrait.class)){
                npc.addTrait(SittingTrait.class);
                dB.echoDebug(scriptEntry, "...added sitting trait");
            }

            trait.stand();
            npc.removeTrait(SittingTrait.class);
        }
    }
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.