예제 #1
0
 // PRAGMA MARK - ISerializationCallbackReceiver Implementation
 public void OnAfterDeserialize()
 {
     this._conditions = new List <ITransitionCondition>();
     foreach (string serializedCondition in this._serializedConditions)
     {
         ITransitionCondition condition = JsonSerialization.DeserializeGeneric <ITransitionCondition>(serializedCondition);
         if (condition != null)
         {
             this._conditions.Add(condition);
         }
     }
 }
예제 #2
0
        // PRAGMA MARK - ISerializationCallbackReceiver Implementation
        public void OnAfterDeserialize()
        {
            if (this._nodeDelegates == null)
            {
                this._nodeDelegates = new List <INodeDelegate>();
            }
            else
            {
                this._nodeDelegates.Clear();
            }

            foreach (string serializedNodeDelegate in this._serializedNodeDelegates)
            {
                INodeDelegate nodeDelegate = JsonSerialization.DeserializeGeneric <INodeDelegate>(serializedNodeDelegate);
                if (nodeDelegate != null)
                {
                    this._nodeDelegates.Add(nodeDelegate);
                }
            }
        }