示例#1
0
    //---------------重写方法----------------------
    public override void StartWithParam(ModuleParamBase param)
    {
        ModuleParamToProcess p = (ModuleParamToProcess)param;

        AudioEditManagercs.Instance.initWithNew(p.StrAudioPath, p.StrOutPutPath, onProcessChange, onProcessFinish);
        cacheParam_         = p;
        SliderProcess.value = 1;
    }
示例#2
0
    //-------------重写方法------------------------
    public override void StartWithParam(ModuleParamBase param)
    {
        /*
         * 初始化ui 信息
         */
        List <TaskTransform> listTasks = TaskManager.Instance.GetTasks();

        listTasks_ = listTasks;

        /*
         * 初始化列表
         */
        MyTableViewTasks.SetData(listTasks_);

        /*
         * 初始化事件回调
         */
        MyTableViewTasks.OnValueRateChange += onValueChangeTableViewTask;

        /*
         * 初始化进度条
         */
        float width  = GameObjectUtil.GetWidth(GTaskProcess);
        float length = width / (float)listTasks.Count;

        for (int i = 0; i < listTasks.Count; ++i)
        {
            GameObject part = GameObject.Instantiate(PrefabTaskProcessPart);
            GameObjectUtil.SetWidth(part, length);
            if (listTasks[i].IsFinish)
            {
                GameObjectUtil.SetColor(part, Color.blue);
            }
            else
            {
                GameObjectUtil.SetColor(part, Color.red);
            }
            GameObjectUtil.SetX(part, i * length);
            GameObjectUtil.SetParentToChild(GTaskProcess, part, false);
            ListTaskProcessPart.Add(part);
        }
    }
    //---------------对外接口----------------------
    public void StartModule(ModuleType type, ModuleParamBase param = null)
    {
        LayerManagerBase baseLm = null;

        switch (type)
        {
        case ModuleType.E_START:
            baseLm = LayerStart.GetComponent <LayerManagerBase>();
            break;

        case ModuleType.E_OPENNEW:
            baseLm = LayerOpenNew.GetComponent <LayerManagerBase>();
            break;

        case ModuleType.E_OPENOLD:
            baseLm = LayerOpenOld.GetComponent <LayerManagerBase>();
            break;

        case ModuleType.E_PROCESS:
            baseLm = LayerProcess.GetComponent <LayerManagerBase>();
            break;

        case ModuleType.E_EDITOR:
            baseLm = LayerEditor.GetComponent <LayerManagerBase>();
            break;

        case ModuleType.E_EDITORRESULT:
            baseLm = LayerEditorResult.GetComponent <LayerManagerBase>();
            break;
        }
        if (activeLm_ != null)
        {
            activeLm_.Dispose(); activeLm_.gameObject.SetActive(false);
        }
        if (baseLm != null)
        {
            baseLm.StartWithParam(param); baseLm.gameObject.SetActive(true); activeLm_ = baseLm;
        }
    }
 public virtual void StartWithParam(ModuleParamBase param)
 {
     //throw new System.NotImplementedException();
 }