示例#1
0
 public ProppStoryData(ProppStoryData data)
 {
     interdiction = data.interdiction;
     villainy     = data.villainy;
     functions    = data.functions;
     characters   = data.characters;
     locations    = data.locations;
 }
示例#2
0
 public ProppStoryData(ProppStory story)
 {
     interdiction = new ProppActionData(story.interdiction);
     villainy     = new ProppVillainyData(story.villainy);
     foreach (var f in story.functions)
     {
         functions.Add(new ProppFunctionData(f));
     }
     characters = story.characters;
 }
示例#3
0
 public ProppStoryData(ProppStory story, int newId, string newName)
 {
     interdiction = new ProppActionData(story.interdiction);
     villainy     = new ProppVillainyData(story.villainy);
     foreach (var f in story.functions)
     {
         functions.Add(new ProppFunctionData(f));
     }
     characters = story.characters;
     id         = newId;
     name       = newName;
 }
示例#4
0
    public ProppAction CreateAction(ProppActionData data)
    {
        ConstructorInfo constructorInfo;

        if (data == null)
        {
            return(null);
        }

        if (!_constructorInfos.TryGetValue(data.actionName, out constructorInfo))
        {
            Debug.Log(data.actionName);
            return(null);
        }

        ProppAction result = (constructorInfo.Invoke(null) as ProppAction);

        result.SetWithArgs(story, data.arguments);
        return(result);
    }
示例#5
0
 protected void ReplaceActionData(ref ProppActionData targetAction, string newActionName, params string[] args)
 {
     targetAction = new ProppActionData(newActionName, args.ToList());
 }
示例#6
0
 protected void ReplaceActionData(ref ProppActionData targetAction, ProppActionData newAction)
 {
     targetAction = newAction;
 }
 public void AddActionData(ProppActionData actionData)
 {
     actions.Add(actionData);
 }
 public ProppVillainyData(ProppVillainy villainy)
 {
     villainyActionData    = new ProppActionData(villainy.villainyAction);
     liquidationActionData = new ProppActionData(villainy.liquidationAction);
 }