Package com.l2client.component

Examples of com.l2client.component.EnvironmentComponent


    if(pcpos != null && npcpos != null){
      pcpos.targetHeading = PositioningSystem.getHeading(pcpos.position, npcpos.position);
      //npcpos.targetHeading = PositioningSystem.getHeading(npcpos.position, pcpos.position);
System.out.println("MyTargetSelected: Set targetheading for "+pID+" to "+pcpos.targetHeading+" looking at "+id);     
    }
    EnvironmentComponent env = (EnvironmentComponent) Singleton.get().getEntityManager().getComponent(pID, EnvironmentComponent.class);
    if (env != null){
      env.changed = true;
    }else
      log.severe("No EnvironmentComponent found with entity id "+pID+", perhaps just create one?");
View Full Code Here


//    readD();//0x00
    EntityManager em = Singleton.get().getEntityManager();
    TargetComponent tc = (TargetComponent) em.getComponent(id, TargetComponent.class);
    tc.setTarget(TargetComponent.NO_TARGET);
    tc.color = null;
    EnvironmentComponent env = (EnvironmentComponent) em.getComponent(id, EnvironmentComponent.class);
    if (env != null){
      env.changed = true;
    }else
      log.severe("No EnvironmentComponent found with entity id "+id+", perhaps just create one?");
  }
View Full Code Here

      if(pcpos != null && npcpos != null){
        //pcpos.targetHeading = PositioningSystem.getHeading(pcpos.position, npcpos.position);
        npcpos.targetHeading = PositioningSystem.getHeading(npcpos.position, pcpos.position);
System.out.println("TargetSelected: Set heading for "+id+" to "+npcpos.targetHeading+" looking at "+target);
      }
      EnvironmentComponent env = (EnvironmentComponent) em.getComponent(id, EnvironmentComponent.class);
      if (env != null){
        env.changed = true;
      }else
        log.severe("No EnvironmentComponent found with entity id "+id+", perhaps just create one?");
    }
View Full Code Here

        } else { //target died?
          TargetComponent tgt = (TargetComponent) ent.getComponent(playerId, TargetComponent.class);
          if(tgt.getCurrentTarget() == id){
            //remove it and signla env change
            tgt.setNoTarget();
            EnvironmentComponent env = (EnvironmentComponent) ent.getComponent(playerId, EnvironmentComponent.class);
            env.changed = true;
           
          }
        }
  }
View Full Code Here

    readD();//writeD(_tz);
  }

  private void updateComponents(int attack, int defend, int damage, int type){
    EntityManager em = Singleton.get().getEntityManager();
    EnvironmentComponent com = (EnvironmentComponent) em.getComponent(attack, EnvironmentComponent.class);
    if(com != null){
      com.damageDealt += damage;
      com.damageDealtType  |= type;
      com.changed = true
      Singleton.get().getAnimSystem().callAction(CallActions.DefaultAttack, attack);
View Full Code Here

TOP

Related Classes of com.l2client.component.EnvironmentComponent

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.