Ejemplo n.º 1
0
    private void _ProcessMsg(Message kMsg)
    {
        if (kMsg.m_eType == MessageType.MT_DialogClick)
        {
            StoryManager kStoryManager = ApplicationStatusManager.GetStatus <GameStatus>().GetLogicMain().GetModule("StoryManager") as StoryManager;
            Story        curstory      = kStoryManager.GetCurrentStory();
            if (curstory == null)
            {
                Debug.LogError("[MessageManager] : MessageType.MT_DialogClick Error,Story is null");
                return;
            }
            Action_Dialog kActionDialog = curstory.GetCurrentAction() as Action_Dialog;
            if (kActionDialog == null)
            {
                Debug.LogError("[MessageManager] : MessageType.MT_DialogClick Error,Story is null");
                return;
            }

            // 需要判断story的下一个是否仍旧是dialog类型
            kActionDialog.OnDialogEnd();
        }
    }
Ejemplo n.º 2
0
    public void OnDialogEnd()
    {
        // 对话结束的时候,需要判定一下是否需要隐藏界面,依据是下一个动作是否仍旧是action_dialog类型
        bool         isneeddel     = true;
        StoryManager kStoryManager = ApplicationStatusManager.GetStatus <GameStatus>().GetLogicMain().GetModule("StoryManager") as StoryManager;
        Story        curstory      = kStoryManager.GetCurrentStory();

        if (curstory != null)
        {
            Action_Dialog kNextAction = curstory.GetNextAction() as Action_Dialog;
            if (kNextAction != null)
            {
                isneeddel = false;
            }
        }
        if (isneeddel)
        {
            ApplicationStatusManager.GetStatus <GameStatus>().OnDialogEnd(isneeddel);
        }

        // 结束本动作
        End();
    }