Ejemplo n.º 1
0
        /// <summary>
        /// Re-boardcast the "saveLoad" events to this object's listeners
        /// </summary>
        private void SaveLoad_PersistenceEvent(PersistenceSaveLoad source, PersistenceEventArgs args)
        {
            AnchorPersistenceEventType type = AnchorPersistenceEventType.Unknown;

            switch (args.Type)
            {
            case PersistenceEventType.AppliedShared:
                type = AnchorPersistenceEventType.AppliedShared;
                break;

            case PersistenceEventType.ApplyingShared:
                type = AnchorPersistenceEventType.ApplyingShared;
                break;

            case PersistenceEventType.Loaded:
                type = AnchorPersistenceEventType.Loaded;
                break;

            case PersistenceEventType.Saved:
                type = AnchorPersistenceEventType.Saved;
                break;
            }

            if (type != AnchorPersistenceEventType.Unknown)
            {
                RaiseAnchorPersistenceEvent(type, args.AnchorOwner, args.AnchorId);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Re-boardcast the "saveLoad" events to this object's listeners
 /// </summary>
 private void SaveLoad_PersistenceEvent(PersistenceSaveLoad source, PersistenceEventArgs args)
 {
     if (PersistenceEvent != null)
     {
         PersistenceEvent(this, args);
     }
 }
Ejemplo n.º 3
0
        private void RaisePersistenceEvent(PersistenceEventType type, GameObject owner, string anchorId)
        {
            Debug.LogFormat("[PersistenceSaveLoad] RaisePersistenceEvent (type: {0}) (anchor id: {1})", type, anchorId);
            if (PersistenceEvent != null)
            {
                PersistenceEventArgs args = new PersistenceEventArgs();
                args.AnchorId    = anchorId;
                args.AnchorOwner = owner;
                args.Type        = type;

                PersistenceEvent(this, args);
            }
        }