Package Model

Examples of Model.Entity


    Graphics2D g2 = (Graphics2D) g;
    // Dessin des entité_
    _listEntity = new ArrayList<PersoGUI>();
    for (ListIterator<Entity> i = Game.getInstance().getListEntity()
        .listIterator(); i.hasNext();) {
      Entity e = i.next();
      if (e.getClass().getSimpleName().equals("Human"))
        _listEntity.add(new HumanGUI(e));
      else if (e.getClass().getSimpleName().equals("Zombie"))
        _listEntity.add(new ZombieGUI(e));
      else if (e.getClass().getSimpleName().equals("Hunter") || e.getClass().getSimpleName().equals("Hero"))
        _listEntity.add(new HunterGUI(e));
      else if (e.getClass().getSimpleName().equals("Medic"))
        _listEntity.add(new MedicGUI(e));
      // else
      // _listEntity.add(new EntityGUI(i.current()));
    }
   
View Full Code Here


    s += "Vitesse  (" + ((Perso) e).getDX() + ", " + ((Perso) e).getDY()
        + ")\n";
    s += "Liste ami :\n";
    for (ListIterator<Entity> i = ((Perso) e).get_friends().listIterator(); i
        .hasNext();) {
      Entity tmp = i.next();
      s += "\t" + tmp.getClass().getSimpleName() + " (" + tmp.getX()
          + ", " + tmp.getY() + ")\n";
    }
    s += "\nListe ennemies :\n";
    for (ListIterator<Entity> i = ((Perso) e).get_enemies().listIterator(); i
        .hasNext();) {
      Entity tmp = i.next();
      s += "\t" + tmp.getClass().getSimpleName() + " (" + tmp.getX()
          + ", " + tmp.getY() + ")\n";
    }
    s += "\n-------------------------------------";
    return s;
  }
View Full Code Here

    }

    @Override
    public boolean delete(long id) {
        Map<Long, Entity> storage = EntityStorage.getEntities();
        Entity entity = storage.get(id);
        if (entity == null) {
            return false;
        }
        return storage.remove(id) != null;
    }
View Full Code Here

TOP

Related Classes of Model.Entity

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.