Ejemplo n.º 1
0
 public void CopyFrom(Quest quest)
 {
     if (quest == null)
     {
         Debug.LogWarning("Quest Machine: QuestProxy.CopyFrom source quest is null.");
         return;
     }
     isInstance            = quest.isInstance;
     id                    = StringField.GetStringValue(quest.id);
     displayName           = StringField.GetStringValue(quest.title);
     iconPath              = QuestMachine.GetImagePath(quest.icon);
     group                 = StringField.GetStringValue(quest.group);
     labels                = StringFieldsToStrings(quest.labels);
     giver                 = StringField.GetStringValue(quest.questGiverID);
     isTrackable           = quest.isTrackable;
     track                 = quest.showInTrackHUD;
     isAbandonable         = quest.isAbandonable;
     rememberIfAbandoned   = quest.rememberIfAbandoned;
     autostartConditionSet = new QuestConditionSetProxy(quest.autostartConditionSet);
     offerConditionSet     = new QuestConditionSetProxy(quest.offerConditionSet);
     offerUnmetContentList = QuestContentProxy.NewArray(quest.offerConditionsUnmetContentList);
     offerContentList      = QuestContentProxy.NewArray(quest.offerContentList);
     maxTimes              = quest.maxTimes;
     timesAccepted         = quest.timesAccepted;
     cooldownSecs          = quest.cooldownSeconds;
     cooldownSecsRemain    = quest.cooldownSecondsRemaining;
     state                 = quest.GetState();
     stateInfoList         = QuestStateInfoProxy.NewArray(quest.stateInfoList);
     counterList           = QuestCounterProxy.NewArray(quest.counterList);
     nodeList              = QuestNodeProxy.NewArray(quest.nodeList);
     tags                  = new TagDictionary(quest.tagDictionary);
     indicators            = QuestIndicatorStateRecordProxy.NewArray(quest.indicatorStates);
     goalEntity            = quest.goalEntityTypeName;
 }
Ejemplo n.º 2
0
 public override void OnBeforeProxySerialization()
 {
     base.OnBeforeProxySerialization();
     m_imageNameProxy = QuestMachine.GetImagePath(m_image);
 }