예제 #1
0
        private void RefreshCommandTime()
        {
            ScenarioDialogue dialogue = CurrentDialogue;

            if (dialogue == null || dialogue.commands == null)
            {
                m_commandTime = 0;
            }
            else
            {
                m_commandTime = 0;
                for (int i = 0; i < dialogue.commands.Count; i++)
                {
                    ScenarioDialogue.Command c = dialogue.commands[i];
                    float time = c.command.GetDuration();
                    if (m_commandTime < time)
                    {
                        m_commandTime = time;
                    }
                }
            }
        }
예제 #2
0
        private void DoCurrentCommands()
        {
            ScenarioDialogue dialogue = CurrentDialogue;

            if (dialogue == null || dialogue.commands == null)
            {
                return;
            }
            for (int i = 0; i < dialogue.commands.Count; i++)
            {
                ScenarioDialogue.Command c       = dialogue.commands[i];
                ScenarioCommand          command = c.command;
                if (command != null)
                {
                    if (command.instantiate)
                    {
                        command = Instantiate(command);
                    }
                    currentCommands.Add(command);
                    commandMessages.Add(c.message);
                    StartCoroutine(command.DoCommand(c.message));
                }
            }
        }