public static RequirementData Deserialize(RequirementSerializable serializable, Database database) { var data = new RequirementData(serializable, database); data.CreateContent(serializable, database); return(data); }
public Content_None(RequirementSerializable serializable, Database database) { if (serializable == null || database == null) { return; } Requirements = serializable.Requirements?.Select(item => RequirementData.Deserialize(item, database)).ToArray(); }
private QuestData(QuestSerializable serializable, Database database) { ItemId = new ItemId <QuestData>(serializable.Id, serializable.FileName); Name = serializable.Name; QuestType = serializable.QuestType; StartCondition = serializable.StartCondition; Weight = new NumericValue <float>(serializable.Weight, 0f, 1000f); Requirement = RequirementData.Deserialize(serializable.Requirement, database); Level = new NumericValue <int>(serializable.Level, 0, 1000); Nodes = serializable.Nodes?.Select(item => NodeData.Deserialize(item, database)).ToArray(); }
private NodeTransitionData(NodeTransitionSerializable serializable, Database database) { TargetNode = new NumericValue <int>(serializable.TargetNode, 1, 1000); Requirement = RequirementData.Deserialize(serializable.Requirement, database); Weight = new NumericValue <float>(serializable.Weight, 0f, 1000f); }
private NodeActionData(NodeActionSerializable serializable, Database database) { TargetNode = new NumericValue <int>(serializable.TargetNode, 1, 1000); Requirement = RequirementData.Deserialize(serializable.Requirement, database); ButtonText = serializable.ButtonText; }