예제 #1
0
    public void AddFlowItem(FlowItemBase flowItem)
    {
        flowItem.flowManager = this;

        if (allFlowItems.ContainsKey(flowItem.Name))
        {
            allFlowItems[flowItem.Name] = flowItem;
        }
        else
        {
            allFlowItems.Add(flowItem.Name, flowItem);
        }
    }
예제 #2
0
    public void RunFlowItem(string name, bool forceRestartIfSameName = false, params object[] paras)
    {
        FlowItemBase newItem = null;

        if (allFlowItems.ContainsKey(name))
        {
            newItem = allFlowItems[name];
        }

        if (newItem == null)
        {
            Debug.LogError("No Flow Item:" + name);
            return;
        }
        if (CurrentRunFlowItem != null)
        {
            if (CurrentRunFlowItem.Name == name)
            {
                if (!forceRestartIfSameName)
                {
                    return;
                }
                else
                {
                    CurrentRunFlowItem.Start(paras);
                    return;
                }
            }
            //else
            //{
            //    CurrentRunFlowItem.Finish(null);
            //}
        }

        CurrentRunFlowItem = newItem;
        CurrentRunFlowItem.Start(paras);
    }
 private static void OnDownloadRegionServerListFlowItemFinish(FlowItemBase arg1, string arg2)
 {
     iPGeolocationDetail = FlowManager.GetFlowItem <DownloadRegionServerListFlowItem>().iPGeolocationDetail;
     IsChinaIP           = FlowManager.GetFlowItem <DownloadRegionServerListFlowItem>().IsChinaIP;
 }