示例#1
0
    public override void Enter()
    {
        base.Enter ();
        if (IsBattleOver ()) {
            if(DidPlayerWin())
                data = Resources.Load<ConversationData>("Conversations/OutroSceneWin");
            else
                data = Resources.Load<ConversationData>("Conversations/OutroSceneLose");
        } else {
            data = Resources.Load<ConversationData> ("Conversations/IntroScene");
        }

        conversationController.Show (data);
    }
示例#2
0
    IEnumerator Sequence(ConversationData data)
    {
        for (int i = 0; i < data.list.Count; ++i)
        {
            SpeakerData sd = data.list[i];

            ConversationPanel currentPanel = (sd.anchor == TextAnchor.UpperLeft || sd.anchor == TextAnchor.MiddleLeft || sd.anchor == TextAnchor.LowerLeft) ? leftPanel : rightPanel;
            IEnumerator presenter = currentPanel.Display(sd);
            presenter.MoveNext();

            string show, hide;
            if (sd.anchor == TextAnchor.UpperLeft || sd.anchor == TextAnchor.UpperCenter || sd.anchor == TextAnchor.UpperRight)
            {
                show = ShowTop;
                hide = HideTop;
            }
            else
            {
                show = ShowBottom;
                hide = HideBottom;
            }

            currentPanel.panel.SetPosition(hide, false);
            MovePanel(currentPanel, show);

            yield return null;
            while (presenter.MoveNext())
                yield return null;

            MovePanel(currentPanel, hide);
            transition.easingControl.completedEvent += delegate(object sender, EventArgs e) {
                conversation.MoveNext();
            };

            yield return null;
        }

        canvas.gameObject.SetActive(false);
        if (completeEvent != null)
            completeEvent(this, EventArgs.Empty);
    }
示例#3
0
 protected override void Awake()
 {
     base.Awake ();
     conversationController = owner.GetComponentInChildren<ConversationController>();
     data = Resources.Load<ConversationData>("Conversations/IntroScene");
 }
 public void Show(ConversationData data)
 {
     canvas.gameObject.SetActive (true);
     conversation = Sequence (data);
     conversation.MoveNext ();
 }