Exemplo n.º 1
0
 public void RegisterEntityNotify(Entity entity, IEntityNotify entityNotify)
 {
     if (!notifies.ContainsKey(entity.entityId) || notifies[entity.entityId] == null)
     {
         notifies.Add(entity.entityId, entityNotify);
     }
 }
Exemplo n.º 2
0
        public void mapEntiiesSync(List <NEntitySync> messageEntitySyncs)
        {
            foreach (var NEntitySync in messageEntitySyncs)
            {
                Entity entity = null;
                if (entities.TryGetValue(NEntitySync.Id, out entity))
                {
                    entity.EntityData = NEntitySync.Entity;
                }

                IEntityNotify notify = null;
                if (noTifys.TryGetValue(NEntitySync.Id, out notify))
                {
                    notify.OnStateChange(NEntitySync.Event);
                    notify.OnTransformChange();
                }
            }
        }
Exemplo n.º 3
0
 public void RegisterEntityChanegNotify(int entityId, IEntityNotify notify)
 {
     this.notifiers[entityId] = notify;
 }
Exemplo n.º 4
0
 public void RegistNotify(int entityId, IEntityNotify entity)
 {
     noTifys[entityId] = entity;
 }
Exemplo n.º 5
0
 public void RegisterEntityChangeNotify(int entityId, IEntityNotify entity)
 {
     this.notifiers[entityId] = entity;
 }