skadistats.clarity.processor.entities.OnEntityUpdated Java Examples
The following examples show how to use
skadistats.clarity.processor.entities.OnEntityUpdated.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Main.java From clarity-examples with BSD 3-Clause "New" or "Revised" License | 6 votes |
@OnEntityUpdated public void onUpdated(Entity e, FieldPath[] updatedPaths, int updateCount) { if (!isHero(e)) { return; } ensureFieldPaths(e); boolean update = false; for (int i = 0; i < updateCount; i++) { if (updatedPaths[i].equals(mana) || updatedPaths[i].equals(maxMana)) { update = true; break; } } if (update) { System.out.format("%s (%s/%s)\n", e.getDtClass().getDtName(), e.getPropertyForFieldPath(mana), e.getPropertyForFieldPath(maxMana)); } }
Example #2
Source File: Wards.java From parser with MIT License | 5 votes |
@OnEntityUpdated public void onUpdated(Context ctx, Entity e, FieldPath[] fieldPaths, int num) { FieldPath p; if ((p = getFieldPathForEntity(e)) != null) { for (int i = 0; i < num; i++) { if (fieldPaths[i].equals(p)) { toProcess.add(new ProcessEntityCommand(e, p)); break; } } } }
Example #3
Source File: ObservableEntityList.java From clarity-analyzer with BSD 3-Clause "New" or "Revised" License | 5 votes |
@OnEntityUpdated public void onUpdate(Entity entity, FieldPath[] fieldPaths, int num) { lock.lock(); try { markChange(CF_PROP); int i = entity.getIndex(); ObservableEntity e = changes[i] == null ? entities[i] : changes[i]; e.update(fieldPaths, num); } finally { lock.unlock(); } }
Example #4
Source File: SpawnsAndDeaths.java From clarity-examples with BSD 3-Clause "New" or "Revised" License | 5 votes |
@OnEntityUpdated public void onUpdated(Context ctx, Entity e, FieldPath[] fieldPaths, int num) { FieldPath p = getFieldPathForEntity(e); if (p != null) { for (int i = 0; i < num; i++) { if (fieldPaths[i].equals(p)) { processLifeStateChange(e, p); break; } } } }