Пример #1
0
Файл: _Def.cs Проект: kuviman/Q
        public void UpdateEntity(Entity e, Entity update)
        {
            HashSet <string> updated = new HashSet <string>();

            OnUpdateEntity?.Invoke(e, update, updated);
            foreach (var comp in update.Components)
            {
                if (updated.Contains(comp.Key))
                {
                    continue;
                }
                e.Set(comp.Key, comp.Value);
            }
        }
Пример #2
0
 public void UpdateEntity(EntityInfo entityInfo)
 {
     OnUpdateEntity?.Invoke(entityInfo);
 }