Пример #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);
 }