Exemplo n.º 1
0
 /// <inheritdoc />
 public override void OnCourseFinished(ICourse course)
 {
     if (lockOnCourseFinished)
     {
         foreach (LockableProperty prop in SceneUtils.GetActiveAndInactiveComponents <LockableProperty>())
         {
             prop.SetLocked(true);
         }
     }
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 public void RegisterAll()
 {
     foreach (TrainingSceneObject trainingObject in SceneUtils.GetActiveAndInactiveComponents <TrainingSceneObject>())
     {
         try
         {
             Register(trainingObject);
         }
         catch (NameNotUniqueException)
         {
             logger.ErrorFormat("Registration of training scene object entity with name '{0}' failed. Name is not unique! Entity will destroy itself. Referenced game object: '{1}'.", trainingObject.UniqueName, trainingObject.GameObject.name);
             Object.DestroyImmediate(trainingObject.gameObject);
         }
         catch (AlreadyRegisteredException)
         {
         }
     }
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     SceneUtils.GetActiveAndInactiveComponents <LockableProperty>().ToList()
     .ForEach(lockable => lockable.SetLocked(lockSceneObjectsOnSceneStart));
 }