Exemplo n.º 1
0
    void Start()
    {
        _dialogueView = Game.Instance.UI.DialogueView;
        _narrative    = Game.Instance.Narrative;

        var lines = script.text.Split('\n');

        print("parsed " + lines.Length + " lines of dialogue");
        _lines = new DialogueLine[lines.Length];

        for (int i = 0; i < _lines.Length; i++)
        {
            var parts = lines[i].Split('\t');
            if (parts.Length != 3)
            {
                throw new System.Exception("can't parse line: " + lines[i]);
            }

            _lines[i] = new DialogueLine()
            {
                index   = int.Parse(parts[0]),
                speaker = parts[1],
                text    = parts[2]
            };
        }
        _lastIndex = _lines.Select(l => l.index).Max();

        _narrative.StoryProgressed.AddListener(ShowLine);
    }
Exemplo n.º 2
0
    void Start()
    {
        _questView    = Game.Instance.UI.QuestView;
        _dialogueView = Game.Instance.UI.DialogueView;

        _narrative = Game.Instance.Narrative;
        _narrative.StoryProgressed.AddListener(OnProgress);
    }
Exemplo n.º 3
0
    private void ProcessTextLog(DialogueComp dialogueComp)
    {
        DialogueView dialogueView = MainAppManager.Instance.FindViewObject <DialogueView>(ParameterFlag.ViewUIPath.DialogueBox);

        dialogueView.Show(true);

        dialogueView.SetAvatar(null);
        dialogueView.SetMessage(dialogueComp.mainValue);
        dialogueView.SetTitle(null);
    }
Exemplo n.º 4
0
    void Start()
    {
        _questView    = Game.Instance.UI.QuestView;
        _dialogueView = Game.Instance.UI.DialogueView;

        _narrative = Game.Instance.Narrative;
        _narrative.StoryProgressed.AddListener(OnProgress);

        _soundEngine = GameObject.FindGameObjectWithTag(GameConstants.Persistent).GetComponentInChildren <SoundEngine>();
    }
Exemplo n.º 5
0
    void Start()
    {
        if (!books.Any())
        {
            throw new System.Exception();
        }

        _questView    = Game.Instance.UI.QuestView;
        _dialogueView = Game.Instance.UI.DialogueView;

        _narrative = Game.Instance.Narrative;
        _narrative.StoryProgressed.AddListener(OnProgress);

        _storage = Game.Instance.Storage;
    }
Exemplo n.º 6
0
 private void ReloadDialogue_Button_Click(object sender, RoutedEventArgs e)
 {
     DialogueView.Display();
 }
Exemplo n.º 7
0
#pragma warning restore 0219, 414

    protected override void OnEnable()
    {
        base.OnEnable();

        this._sDialogueView = this.target as DialogueView;
    }
Exemplo n.º 8
0
 private void Awake()
 {
     QuestView    = questView.GetComponent <QuestView>();
     DialogueView = dialogueView.GetComponent <DialogueView>();
 }