protected static void triggerTransactionsChanged()
 {
     if (DevkitTransactionManager.transactionsChanged != null)
     {
         DevkitTransactionManager.transactionsChanged();
     }
 }
 public static void resetTransactions()
 {
     DevkitTransactionManager.clearUndo();
     DevkitTransactionManager.clearRedo();
     DevkitTransactionManager.pendingGroup     = null;
     DevkitTransactionManager.transactionDepth = 0;
 }
 protected static void triggerTransactionPerformed(DevkitTransactionGroup group)
 {
     if (DevkitTransactionManager.transactionPerformed != null)
     {
         DevkitTransactionManager.transactionPerformed(group);
     }
 }
        public static void beginGenericTransaction()
        {
            TranslatedText translatedText = new TranslatedText(new TranslationReference("SDG", "Devkit.Transactions.Generic"));

            translatedText.format();
            DevkitTransactionManager.beginTransaction(translatedText);
        }
 public static void beginTransaction(TranslatedText name)
 {
     if (DevkitTransactionManager.transactionDepth == 0)
     {
         DevkitTransactionManager.clearRedo();
         DevkitTransactionManager.pendingGroup = new DevkitTransactionGroup(name);
     }
     DevkitTransactionManager.transactionDepth++;
 }
        public static DevkitTransactionGroup redo()
        {
            if (!DevkitTransactionManager.canRedo)
            {
                return(null);
            }
            DevkitTransactionGroup devkitTransactionGroup = DevkitTransactionManager.popRedo();

            devkitTransactionGroup.redo();
            DevkitTransactionManager.pushUndo(devkitTransactionGroup);
            DevkitTransactionManager.triggerTransactionPerformed(devkitTransactionGroup);
            return(devkitTransactionGroup);
        }
 public static void endTransaction()
 {
     if (DevkitTransactionManager.transactionDepth == 0)
     {
         return;
     }
     DevkitTransactionManager.transactionDepth--;
     if (DevkitTransactionManager.transactionDepth == 0)
     {
         DevkitTransactionManager.pendingGroup.end();
         if (DevkitTransactionManager.pendingGroup.delta)
         {
             DevkitTransactionManager.pushUndo(DevkitTransactionManager.pendingGroup);
         }
         else
         {
             DevkitTransactionManager.pendingGroup.forget();
         }
         DevkitTransactionManager.pendingGroup = null;
         DevkitTransactionManager.triggerTransactionsChanged();
     }
 }
 public static void recordTransformChangeParent(Transform transform, Transform parent)
 {
     DevkitTransactionManager.recordTransaction(new DevkitTransformChangeParentTransaction(transform, parent));
 }
 public static void recordDestruction(GameObject go)
 {
     DevkitTransactionManager.recordTransaction(new DevkitGameObjectDestructionTransaction(go));
 }
 public static void recordObjectDelta(object instance)
 {
     DevkitTransactionManager.recordTransaction(new DevkitObjectDeltaTransaction(instance));
 }
 public static void recordInstantiation(GameObject go)
 {
     DevkitTransactionManager.recordTransaction(new DevkitGameObjectInstantiationTransaction(go));
 }
 public static void endGenericTransaction()
 {
     DevkitTransactionManager.endTransaction();
 }