public override void SetWithArgs(ProppStory story, List <string> arguments)
 {
     base.SetWithArgs(story, arguments);
     performChar       = story.FindCharacterName(arguments[0]);
     targetChar        = story.FindCharacterName(arguments[1]);
     liquidationAction = story.villainy.liquidationAction;
 }
    public void TellStory(StoryTellingSystem stSystem)
    {
        if (story == null)
        {
            return;
        }
        if (IsStoryEnd)
        {
            SceneManager.LoadScene("2_Main");
        }

        if (currentStoryIndex >= story.functions.Count)
        {
            return;
        }
        ProppFunction currentFuntion = story.functions[currentStoryIndex];

        if (currentActionIndex >= currentFuntion.actions.Count)
        {
            return;
        }
        ProppAction currentAction = currentFuntion.actions[currentActionIndex];

        if (currentAction != null)
        {
            stSystem.DefaultSetting();
            currentAction.ShowAction(stSystem);
            currentAction.TellAction(stSystem);
        }
    }
 public ProppStory(ProppStoryData data)
 {
     ProppActionFactory.Instance.SetStory(this);
     characters = data.characters;
     locations  = data.locations;
     characters.SetDict();
     locations.SetDict();
     interdiction = ProppActionFactory.Instance.CreateAction(data.interdiction);
     villainy     = new ProppVillainy(data.villainy);
     foreach (var f in data.functions)
     {
         AddFunction(new ProppFunction(f));
     }
 }
Beispiel #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);
    }
 public override void SetWithArgs(ProppStory story, List <string> arguments)
 {
     base.SetWithArgs(story, arguments);
     villainyAction = story.villainy.villainyAction;
 }
Beispiel #6
0
 public ProppVillainy(ProppVillainyData data)
 {
     villainyAction    = ProppActionFactory.Instance.CreateAction(data.villainyActionData);
     liquidationAction = ProppActionFactory.Instance.CreateAction(data.liquidationActionData);
 }
Beispiel #7
0
 public override void SetWithArgs(ProppStory story, List <string> arguments)
 {
     base.SetWithArgs(story, arguments);
     violateChar   = story.FindCharacterName(arguments[0]);
     violateAction = story.interdiction;
 }
Beispiel #8
0
 public ProppActionData(ProppAction action)
 {
     actionName = action.ActionName;
     arguments  = action.arguments;
 }