Exemplo n.º 1
0
 public static void drawAggro(EntityWorld entityWorld, int entity, int targetEntity) {
   if (entityWorld.hasAllComponents(entity, AutoAttackComponent.class, IsAliveComponent.class)) {
     if (entityWorld.hasComponent(entity, AttackMoveComponent.class)
         || (!entityWorld.hasComponent(entity, MovementComponent.class))) {
       entityWorld.setComponent(entity, new AggroTargetComponent(targetEntity));
     }
   }
 }
Exemplo n.º 2
0
 public static void tryDrawAggro(EntityWorld entityWorld, int entity, int targetEntity) {
   if (!entityWorld.hasComponent(entity, AggroTargetComponent.class)) {
     drawAggro(entityWorld, entity, targetEntity);
   }
 }