Example #1
0
 private static void ChangeAction(AudioEvent audioEvent, AudioEventAction action, EventActionTypes newEnumType)
 {
     for (int i = 0; i < audioEvent.ActionList.Count; ++i)
     {
         if (audioEvent.ActionList[i] == action)
         {
             Type oldType = AudioEventWorker.ActionEnumToType(action.EventActionType);
             Type newType = AudioEventWorker.ActionEnumToType(newEnumType);
             if (oldType != newType)
             {
                 AudioEventWorker.ReplaceActionDestructiveAt(audioEvent, newEnumType, i);
             }
             else
             {
                 action.EventActionType = newEnumType;
             }
             break;
         }
     }
 }