Package com.l2client.component

Examples of com.l2client.component.PositioningSystem


    sys.update(0.01f);
    assertEquals(5, count);
   
    Singleton single = Singleton.get();
    single.init(null);
    PositioningSystem ps = Singleton.get().getPosSystem();
    PositioningComponent pos = new PositioningComponent();
    pos.position = new Vector3f(10,0,0);
    pos.startPos.set(pos.position);
    pos.goalPos = new Vector3f(0,0,0);
    pos.walkSpeed = 2f;
    pos.maxSpeed = pos.walkSpeed;
    ps.addComponentForUpdate(pos);
    for(int i = 0; i<11;i++){
      ps.update(1f);
    }
    assertEquals(pos.position, pos.goalPos);
   
   }
View Full Code Here


//            System.out.println("  - opt:"+cur.Position);
//            last = cur;
//            cur = pa.GetFurthestVisibleWayPoint(cur);
//          }
         
          PositioningSystem mover = Singleton.get().getPosSystem();
          PositioningComponent com = new PositioningComponent();
          com.initByWayPoint(pa);
          com.acc =0f;
          com.direction = Vector3f.ZERO;
          com.heading = 0f;
          com.maxAcc = 2f;
          com.maxDcc = 3f;
          com.maxSpeed = maxSpeed;
          com.speed = 0f;
          mover.addComponentForUpdate(com);
          float dt = 0f;
          float maxt = 200f;
          float step = 0.2f;
          while(dt < maxt){
            dt +=step;
            mover.update(step);
            if(com.path == null){
              System.out.println("Reached:"+com.position);
              return pa;
            }
           
View Full Code Here

TOP

Related Classes of com.l2client.component.PositioningSystem

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.