Exemplo n.º 1
0
 // 显示任务结算界面 //
 private void ShowTaskSettlement(sg.GS2C_Task_GetRunning_Res.GetRunning_TaskItem taskitem)
 {
     if (Globals.Instance.MGameDataManager.MActorData.starData.IsTimeborrowing)
     {
         return;
     }
     Globals.Instance.MGUIManager.CreateWindow <GUIGameOutcome>(delegate(GUIGameOutcome guiGameOutcome) {
         guiGameOutcome.ShowTaskSettlement(taskitem);
     });
 }
Exemplo n.º 2
0
    public void StartNextTask(int id, bool isSpendDiamond = false, int fatherTaskId = 0)
    {
        if (Globals.Instance.MGameDataManager.MActorData.starData.IsTimeborrowing)
        {
            GUIGuoChang.Hide();
            return;
        }
        if (CheckGuideTask(id))
        {
            // 如果新手引导 不需要接任务就先加到缓存里面 -- //
            if (id > 0)
            {
                bool ishave = false;
                foreach (sg.GS2C_Task_GetRunning_Res.GetRunning_TaskItem taskitem in Globals.Instance.MGameDataManager.MActorData.MainTaskIDList)
                {
                    if (taskitem.taskId == id)
                    {
                        ishave = true;
                    }
                }
                if (!ishave)
                {
                    sg.GS2C_Task_GetRunning_Res.GetRunning_TaskItem taskitem = new sg.GS2C_Task_GetRunning_Res.GetRunning_TaskItem();
                    taskitem.taskId        = id;
                    taskitem.taskState     = 1;
                    taskitem.taskLastLevel = 0;

                    Globals.Instance.MGameDataManager.MActorData.MainTaskIDList.Add(taskitem);
                }
            }
            GUITaskTalkView taskview = Globals.Instance.MGUIManager.GetGUIWindow <GUITaskTalkView>();
            if (taskview != null)
            {
                taskview.DestroyThisGUI();
            }
            GUIGuoChang.Hide();
            return;
        }

        if (id == 0)
        {
            GUITravel guiTravel = Globals.Instance.MGUIManager.GetGUIWindow <GUITravel>();
            if (guiTravel != null)
            {
                guiTravel.Close();
            }
            else
            {
                GUIMain main = Globals.Instance.MGUIManager.GetGUIWindow <GUIMain>();
                if (main != null)
                {
                    main.SetVisible(true);
                    Globals.Instance.MSceneManager.mMainCamera.enabled = true;
                }
            }
            GUIGuoChang.Hide();
            Globals.Instance.MTaskManager.mTaskDailyData.NextTaskId = 0;
            return;
        }


        NetSender.Instance.RequestTaskAcceptReq(id, isSpendDiamond, 0, fatherTaskId);
    }