Package com.l2client.component

Examples of com.l2client.component.PositioningComponent


      if(t>=4f){

        t=0f;
System.out.println("Cam@"+cam.getLocation());   
System.out.println("Walker@:"+walker.getLocalTranslation());
PositioningComponent pc = (PositioningComponent)em.getComponent(((Entity)walker).getId(), PositioningComponent.class);
if(pc != null){
 
    System.out.print("Ent 1@:"+pc.position+" path:"+pc.path);
    if(pc.nextWayPoint != null)
      System.out.println(" heading:"+pc.nextWayPoint.position);
View Full Code Here


            e.printStackTrace();
          }
         
          if(ent != null && destination != null){
                Path pa = new Path();
                PositioningComponent pc = (PositioningComponent) em.getComponent(ent.getId(), PositioningComponent.class);
                if(pc != null){
                boolean foundPath = enm.buildNavigationPath(pa, pc.position, destination);
                if(foundPath){
                  NavTestHelper.printPath(pa);
                  pc.initByWayPoint(pa);
                  pc.acc =0f;
                  pc.direction = Vector3f.ZERO;
                  pc.heading = 0f;
                  pc.maxAcc = 2f;
                  pc.maxDcc = 3f;
View Full Code Here

  private Entity createEntity(Vector3f pos) {

    Entity e = EntityManager.get().createEntity(id++);
    if (e != null) {
      Cell c = Singleton.get().getNavManager().FindClosestCell(pos, false);
      pc = new PositioningComponent();
      if (c != null) {
        pc.cell = c.getId();
        c.MapVectorHeightToCell(pos);
      }
      pc.position.set(pos);
View Full Code Here

    private Entity placeObject(final Vector3f position, final Vector3f destination/*can be null*/){
      final Entity ent =  createEntity(position);

          if(ent != null && destination != null){
                Path pa = new Path();
                PositioningComponent pc = (PositioningComponent) em.getComponent(ent.getId(), PositioningComponent.class);
                if(pc != null){
                  boolean foundPath = enm.buildNavigationPath(pa, pc.position, destination);
                  if(foundPath){
                    NavTestHelper.printPath(pa);
                    pc.initByWayPoint(pa);
                    pc.acc =0f;
                    pc.direction = Vector3f.ZERO;
                    pc.heading = 0f;
                    pc.maxAcc = 2f;
                    pc.maxDcc = 3f;
View Full Code Here

  private Entity createEntity(Vector3f pos) {

    Entity e = em.createEntity(id++);
    if (e != null) {
      Cell c = enm.FindClosestCell(pos, false);
      pc = new PositioningComponent();
      if (c != null) {
        pc.cell = c.getId();
        c.MapVectorHeightToCell(pos);
        System.out.println("Entity placed at "+pos);
      } else {
View Full Code Here

      if(t>=4f){
//
        t=0f;
System.out.println("Cam@"+cam.getLocation());   
System.out.println("Walker@:"+walker.getLocalTranslation());
PositioningComponent pc = (PositioningComponent)em.getComponent(((Entity)walker).getId(), PositioningComponent.class);
if(pc != null){
 
    System.out.print("Ent 1@:"+pc.position+" path:"+pc.path);
    if(pc.nextWayPoint != null)
      System.out.println(" heading:"+pc.nextWayPoint.position);
View Full Code Here

            e.printStackTrace();
          }
         
          if(ent != null && destination != null){
                Path pa = new Path();
                PositioningComponent pc = (PositioningComponent) em.getComponent(ent.getId(), PositioningComponent.class);
                if(pc != null){
                boolean foundPath = enm.buildNavigationPath(pa, pc.position, destination);
                if(foundPath){
                  NavTestHelper.printPath(pa);
                  pc.initByWayPoint(pa);
                  pc.acc =0f;
                  pc.direction = Vector3f.ZERO;
                  pc.heading = 0f;
                  pc.maxAcc = 2f;
                  pc.maxDcc = 3f;
View Full Code Here

  private Entity createEntity(Vector3f pos) {

    Entity e = em.createEntity(id++);
    if (e != null) {
      Cell c = enm.FindClosestCell(pos, false);
      pc = new PositioningComponent();
      if (c != null) {
        pc.cell = c.getId();
        c.MapVectorHeightToCell(pos);
      }
      pc.position.set(pos);
View Full Code Here

      t+=tpf;
      if(t>=4f){
        t=0f;
      System.out.println("Cam@"+cam.getLocation());   
      System.out.println("Walker@:"+walker.getLocalTranslation());
      PositioningComponent pc = (PositioningComponent)em.getComponent(((Entity)walker).getId(), PositioningComponent.class);
      if(pc != null){
        System.out.print("Ent 1@:"+pc.position+" path:"+pc.path);
        if(pc.nextWayPoint != null)
          System.out.println(" heading:"+pc.nextWayPoint.position);
        else
View Full Code Here

  //FIXME this is a copy from NPCHandler move this out to the entity Manager !!
  public Entity createPCComponents(EntityData e, VisibleModel visible) {
   
    EntityManager em = Singleton.get().getEntityManager();
    final Entity ent = em.createEntity(e.getObjectId());
    PositioningComponent pos = new PositioningComponent();
    L2JComponent l2j = new L2JComponent();
    VisualComponent vis = new VisualComponent();
    EnvironmentComponent env = new EnvironmentComponent();
    TargetComponent tgt = new TargetComponent();
    LoggingComponent log = new LoggingComponent();
View Full Code Here

TOP

Related Classes of com.l2client.component.PositioningComponent

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.