Esempio n. 1
0
 private static void HandlePropertiesChange(QGradualMovementProperties oldProperties, QGradualMovementProperties newProperties)
 {
     if (!oldProperties.dontDestroyOnLoad && newProperties.dontDestroyOnLoad)
     {
         //change to dont destroy on load.
         DontDestroyOnLoad(singleton);
     }
     else if (oldProperties.dontDestroyOnLoad && !newProperties.dontDestroyOnLoad)
     {
         //change to DO destroy on load.
         SceneManager.MoveGameObjectToScene(singleton.gameObject, SceneManager.GetActiveScene());
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Changes the properties that the manager is abiding by.
 /// </summary>
 /// <param name="newProperties"> the new properties struct </param>
 public static void ChangeProperties(QGradualMovementProperties newProperties)
 {
     HandlePropertiesChange(singleton.currentProperties, newProperties);
     singleton.currentProperties = newProperties;
 }