Exemplo n.º 1
0
    void OnOKBtnClickCallback(int index)
    {
        //Debug.LogError("OnOKBtnClickCallback");
        ClickDispatcher.Inst.EnableClick = true;

        PeopleManager.Instance.Reset();
        ChooseDo.Instance.ResetAll();
        HighLightCtrl.GetInstance().OffAllObjs();
        UIManager.Instance.GetUI <SwapUI>("SwapUI").ResetUI();
        GlobalEntity.GetInstance().RemoveAllListeners(ClickDispatcher.mEvent.DoClick);

        //上一个阶段处理
        Debug.LogFormat((string.Format("  当前阶段:   {0}  ", (ModelTasks)index)));
        ModelTasks mt = FlowModel.GetInstance().CurrFlowTask.FlowEnumID;

        FlowModel.GetInstance().RemovePrefabFromMem(mt.ToString());

        //跳转阶段
        FlowTask ft = FlowModel.GetInstance().CurrFlowTask;

        ft = FlowModel.GetInstance().FindFlowTask((ModelTasks)index);
        FlowModel.GetInstance().CurrFlowTask = ft;

        StringBuilder sb     = new StringBuilder("Prefabs/").Append(ft.FlowEnumID.ToString()).Append("/").Append(ft.FlowEnumID.ToString());
        GameObject    module = ResManager.GetPrefab(sb.ToString());

        FlowModel.GetInstance().PushPrefabToMem(ft.FlowEnumID.ToString(), module);
    }
Exemplo n.º 2
0
    public static FlowTask New(ModelTasks _enumId, string _name, int _no, FlowStepState _state)
    {
        FlowTask ft = new FlowTask();

        ft.FlowEnumID        = _enumId;
        ft.thisFlowStepName  = _name;
        ft.thisFlowNo        = _no;
        ft.thisFlowStepState = _state;
        return(ft);
    }
Exemplo n.º 3
0
 private void OnFlowStepFinished(ModelTasks mt)
 {
     ////Debug.LogError(mt.ToString());s
     //FlowModel.GetInstance().RemovePrefabFromMem(mt.ToString());
     //FlowModel.GetInstance().NextFlowTask();
     //FlowTask ft = FlowModel.GetInstance().CurrFlowTask;
     //StringBuilder sb = new StringBuilder("Prefabs/").Append(ft.FlowEnumID.ToString()).Append("/").Append(ft.FlowEnumID.ToString());
     //GameObject module = ResManager.GetPrefab(sb.ToString());
     //FlowModel.GetInstance().PushPrefabToMem(ft.FlowEnumID.ToString(), module);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 查找指定流程步骤
 /// </summary>
 /// <param name="modeltask"></param>
 /// <returns></returns>
 public FlowTask FindFlowTask(ModelTasks modeltask)
 {
     return(FlowTaskList.Find((item) => { return item.FlowEnumID == modeltask; }));
 }