public override void Operate()
 {
     foreach (var model in OperableEntities.Where(entity => entity.HasComponent <Transformation>()))
     {
         var transformation = model.GetComponent <Transformation>().Value;
         model.GetComponent <IModelTransformation>().ModelTransformation = transformation;
     }
 }
Пример #2
0
        public override void Operate()
        {
            var uninitializedCompositions = OperableEntities
                                            .Where(entity => entity.GetComponent <Composition>().Initialized == false);

            foreach (var entity in uninitializedCompositions)
            {
                var composition = entity.GetComponent <Composition>();
                var providers   = entity.GetComponents <ComposableResource>()
                                  .Where(provider => composition.IsComposable(provider.GetType()))
                                  .ToList();
                providers.ForEach(composition.Compose);
            }
        }