예제 #1
0
        public static RequirementData Deserialize(RequirementSerializable serializable, Database database)
        {
            var data = new RequirementData(serializable, database);

            data.CreateContent(serializable, database);
            return(data);
        }
예제 #2
0
 public Content_None(RequirementSerializable serializable, Database database)
 {
     if (serializable == null || database == null)
     {
         return;
     }
     Requirements = serializable.Requirements?.Select(item => RequirementData.Deserialize(item, database)).ToArray();
 }
예제 #3
0
 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();
 }
예제 #4
0
 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);
 }
예제 #5
0
 private NodeActionData(NodeActionSerializable serializable, Database database)
 {
     TargetNode  = new NumericValue <int>(serializable.TargetNode, 1, 1000);
     Requirement = RequirementData.Deserialize(serializable.Requirement, database);
     ButtonText  = serializable.ButtonText;
 }