Example #1
0
    //


    public InGameSystem()
    {
        //初始化系统
        heroSystem     = new HeroSystem(this);
        synopsisSystem = new SynopsisSystem(this);
        Init(heroSystem);
    }
Example #2
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="_sy"></param>
 public TaskSystem(SynopsisSystem _sy)
 {
     sy       = _sy;
     progress = new Dictionary <string, int>();
     EventCenter.AddListener(EventDefine.ChangeDialogueTask, ChangeDialogueTaskState);
     EventCenter.AddListener <Dictionary <string, int> >(EventDefine.ChangeOtherTask, SetChangeAndCheck);
     EventCenter.AddListener(EventDefine.FirstCheck, CheckOtherTask);
 }
Example #3
0
    /// <summary>
    /// 构造方法
    /// </summary>
    /// <param name="_sy"></param>
    public NpcSystem(SynopsisSystem _sy)
    {
        sy   = _sy;
        list = new List <Npc>();
        //******************************测试

        _npcState.Add(1, 1);
        _npcState.Add(2, 0);
        _npcState.Add(3, 0);
        //InitNpcSystem(_npcState);
    }
Example #4
0
    /// <summary>
    /// 抓取文本并设置
    /// </summary>
    private void TalkShow(SynopsisSystem _sy, TalkSystem talkSystem)
    {
        if (isFirst)
        {
            //设置剧情系统正在对话中
            _sy.SetTalkState(TalkState.Talking);
            talkTxt.GetTxt(_sy.currentNpc.NpcState, _sy.currentNpc.NpcID, talkSystem);
            isFirst = false;
        }
        ShowTxt showTxt = talkSystem.ShowTxts();

        //********************************
        if (showTxt != null)
        {
            Talk(showTxt.name, showTxt.txt);
        }
    }
Example #5
0
 /// <summary>
 /// 设置任务面板的激活状态
 /// </summary>
 /// <param name="sy"></param>
 public void SetTaskPanel(SynopsisSystem sy)
 {
     //如果正在npc对话,无法调出任务面板来
     if (sy.TalkState == TalkState.Talking)
     {
         return;
     }
     bg.SetActive(!bg.activeSelf);
     if (bg.activeSelf)
     {
         //任务面板打开无法进行对话
         sy.IsShowTaskPanel = true;
     }
     else
     {
         sy.IsShowTaskPanel = false;
     }
 }
Example #6
0
 /// <summary>
 /// 对话结束展示任务面板
 /// </summary>
 /// <param name="bg"></param>
 public void ShowTaskPanel(SynopsisSystem sy, TalkSystem talkSystem)
 {
     sy.IsShowTaskPanel = true;
     //TODO 实现任务面板的初始化
     if (sy.TalkState == TalkState.EndTalk)
     {
         if (sy.currentNpc.NpcState == NpcState.HasTask)
         {
             //Debug.Log(1);
             //*************发生了更改
             UIManager.GetInstance().ShowUIForms("MainTaskShow");
             //bg.SetActive(true);
         }
         else if (sy.currentNpc.NpcState == NpcState.FinishTask)
         {
             UIManager.GetInstance().ShowUIForms("MainTaskShow");
             //bg.SetActive(true);
         }
     }
 }
Example #7
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="_sy"></param>
 public TalkSystem(SynopsisSystem _sy)
 {
     sy = _sy;
     EventCenter.AddListener <Npc>(EventDefine.SetCurrentNpc, SetCurrentNpc);
     EventCenter.AddListener(EventDefine.SetCurrentNpcNull, SetCurrentNpc);
 }