Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public static void dispatchAttributeChange(Entity e, object att)
        {
            DynamicChangeEvent evt = new DynamicChangeEvent(e.id, (bool)att);

            Kernel.eventManager.queueEvent(evt);
        }