skadistats.clarity.processor.entities.OnEntityCreated Java Examples

The following examples show how to use skadistats.clarity.processor.entities.OnEntityCreated. 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 Project: parser   Author: odota   File: Wards.java    License: MIT License 5 votes vote down vote up
@OnEntityCreated
public void onCreated(Context ctx, Entity e) {      
    if (!isWard(e)) return;
    
    FieldPath lifeStatePath;
    
    clearCachedState(e);
    ensureFieldPathForEntityInitialized(e);
    if ((lifeStatePath = getFieldPathForEntity(e)) != null) {
        processLifeStateChange(e, lifeStatePath);
    }
}
 
Example #2
Source Project: clarity-analyzer   Author: spheenik   File: ObservableEntityList.java    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@OnEntityCreated
public void onCreate(Entity entity) {
    lock.lock();
    try {
        markChange(CF_LIST);
        int i = entity.getIndex();
        //System.out.println("create " + i);
        changes[i] = new ObservableEntity(entity);
    } finally {
        lock.unlock();
    }
}
 
Example #3
Source Project: clarity-examples   Author: skadistats   File: Main.java    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@OnEntityCreated
public void onCreated(Entity e) {
    if (!isHero(e)) {
        return;
    }
    ensureFieldPaths(e);
    System.out.format("%s (%s/%s)\n", e.getDtClass().getDtName(), e.getPropertyForFieldPath(mana), e.getPropertyForFieldPath(maxMana));
}
 
Example #4
Source Project: clarity-examples   Author: skadistats   File: Main.java    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@OnEntityCreated
public void onCreated(Entity e) {
    FieldPath fp = e.getDtClass().getFieldPathForName("CBodyComponent.m_hModel");
    if (fp == null) {
        return;
    }
    Long resourceHandle = e.getPropertyForFieldPath(fp);
    if (resourceHandle == null || resourceHandle == 0L) {
        return;
    }
    Resources.Entry entry = resources.getEntryForResourceHandle(resourceHandle);
    System.out.format("model for entity at %d (%d): %s\n", e.getIndex(), resourceHandle, entry);
}
 
Example #5
Source Project: clarity-examples   Author: skadistats   File: SpawnsAndDeaths.java    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@OnEntityCreated
public void onCreated(Context ctx, Entity e) {
    clearCachedState(e);
    ensureFieldPathForEntityInitialized(e);
    FieldPath p = getFieldPathForEntity(e);
    if (p != null) {
        processLifeStateChange(e, p);
    }
}