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; }
public void CopyFrom(QuestNode node) { if (node == null) { Debug.LogWarning("Quest Machine: QuestNodeProxy.CopyFrom source is null."); return; } id = StringField.GetStringValue(node.id); intName = StringField.GetStringValue(node.internalName); type = node.nodeType; optional = node.isOptional; state = node.GetState(); speaker = StringField.GetStringValue(node.speaker); states = QuestStateInfoProxy.NewArray(node.stateInfoList); conds = new QuestConditionSetProxy(node.conditionSet); tags = new TagDictionary(node.tagDictionary); childIdx = node.childIndexList.ToArray(); r = QuestProxy.includeCanvasRect ? ((int)node.canvasRect.x + ";" + (int)node.canvasRect.y + ";" + (int)node.canvasRect.width + ";" + (int)node.canvasRect.height) : string.Empty; }