public EventManager.EventResult handleAttributeChange(Event e) { DynamicChangeEvent ac = e as DynamicChangeEvent; if (ac != null) { Entity ent = myDatabase.findEntity(ac.entity); if (ac.dynamic == true) { myEntities.Add(ent); } else { myEntities.Remove(ent); } return(EventManager.EventResult.HANDLED); } return(EventManager.EventResult.IGNORED); }
public static void dispatchAttributeChange(Entity e, object att) { DynamicChangeEvent evt = new DynamicChangeEvent(e.id, (bool)att); Kernel.eventManager.queueEvent(evt); }