Example #1
0
 public void SetModelComposition(ModelComposition composition)
 {
     CurrentModelComposition?.DestroyAdditionalInstances();
     CurrentModelComposition = composition;
     _saberSet.SetModelComposition(CurrentModelComposition);
     OnModelCompositionSet?.Invoke(CurrentModelComposition);
 }
Example #2
0
 public void SetModelComposition(ModelComposition composition)
 {
     CurrentModelComposition?.DestroyAdditionalInstances();
     CurrentModelComposition = composition;
     _saberSet.SetModelComposition(CurrentModelComposition);
     OnModelCompositionSet?.Invoke(CurrentModelComposition);
     _logger.Info($"Selected Saber: {composition.ListName}");
 }
Example #3
0
        public void SetModelComposition(ModelComposition composition, bool lazyInit = true)
        {
            if (CurrentModelComposition != null)
            {
                CurrentModelComposition.SaveAdditionalData();
                CurrentModelComposition.DestroyAdditionalInstances();
            }

            if (lazyInit && CurrentModelComposition != composition)
            {
                composition?.LazyInit();
            }

            CurrentModelComposition = composition;
            _saberSet.SetModelComposition(CurrentModelComposition);
            OnModelCompositionSet?.Invoke(CurrentModelComposition);
            _logger.Info($"Selected Saber: {composition?.ListName}");
        }