Esempio n. 1
0
    private CallbackThing <bool> Quiz(string text, List <string> possibleAnswers, int actualAnswer)
    {
        var cb = new CallbackThing <bool>();

        Conversation.Instance.StartConversation(c =>
        {
            c.Add("Policeman", text, BoxType.Right);
            c.Add("Alice", "", BoxType.QuestionRight).Answers.AddRange(possibleAnswers);
        })
        .Then(c =>
        {
            if (c.Single() != actualAnswer)
            {
                Conversation.Instance.StartConversation(c =>
                {
                    c.Add("Policeman", "... That's not right. Off to the hoosegow with you!", BoxType.Right);
                })
                .Then(() => DeathCanvas.Instance.Show());
            }
            else
            {
                cb.Callback(true);
            }
        });
        return(cb);
    }
Esempio n. 2
0
 private CallbackThing <List <int> > StartConversationInternal()
 {
     Global.WhoHasMouseControl = Mouser.Cutscene;
     ConversationIndex         = 0;
     ShowCurrentIndex();
     Callback = new CallbackThing <List <int> >();
     return(Callback);
 }
Esempio n. 3
0
        public CallbackThing <bool> Start()
        {
            var cb = new CallbackThing <bool>();

            Assert.IsNull(Coroutine, "Cannot Start tweener while it is active");
            Coroutine = GameObject.StartCoroutine(Begin(() => cb.Callback(true)));
            return(cb);
        }