Ejemplo n.º 1
0
        public override void Invoke()
        {
            (TimelineController.Instance as TimelineExecuter).TogglePause(true);

            myData = Event as TextPromptData;

            TextPrompt3D prompt = Instantiate(PromptObject, transform);

            prompt.SetText(myData.Message);
            prompt.OnSelected += OnPromptClicked;

            Transform orientation = TransformSingleton.Instance ?? Camera.main.transform;

            transform.position = transform.position + orientation.forward * CameraDistance;
            transform.rotation = orientation.rotation;
        }
Ejemplo n.º 2
0
        private void OnPromptClicked(TextPrompt3D text)
        {
            // TODO: THis is copied from multiplechoice menu. Add this into some generically accessible script.
            string result = myData.Result;

            // HACK: this should not be stored as a string. OR this should not be filled in as a string. Try enum or something.
            if (result.StartsWith("switchto:"))
            {
                result = result.Substring(9);
                int chapterId = TimelineController.Instance.CurrentTimeline.GetIdOf(result);

                if (chapterId != -1)
                {
                    TimelineController.Instance.SwitchChapterTo(chapterId);
                }

                StopPrompt();
            }
            else
            {
                StopPrompt();
            }
        }