Beispiel #1
0
    public override event EventHandler <UpdateTaskEvent> updateTaskEvent; //sended to the asset manager part

    public ConceptTask(AssetManagerModel _assetManager, TaskState _state, TaskName[] _nextTasks) : base(_assetManager, _state, _nextTasks)
    {
        m_taskName = TaskName.Concepts;
        GameObject conceptPanel = GameObject.Find("ConceptPanel");

        //Debug.Log("Concept panel = " + conceptPanel);
        m_view = conceptPanel.AddComponent <Concept_View>();
        m_view.selectConceptEvent += HandleSelectConcept;
        m_view.addConceptEvent    += HandleAddConcept;
        m_view.validTaskEvent     += HandleUpdateConcept;
        m_view.removeConceptEvent += HandleRemoveConcept;
        m_concepts = new Dictionary <int, string>();
    }
Beispiel #2
0
    public Subtask_Model(AssetManagerModel _assetManager, TaskName _taskName, string _name, int _softwareIndex) : base(_assetManager, _taskName)
    {
        m_name = _name;
        Debug.Log("_softwareIndex = " + _softwareIndex + " Taskname = " + _taskName);
        m_software = AssetSystem.System.GetSoftwareList(m_taskName)[_softwareIndex];
        //Debug.Log("Create a subtask");
        m_mementoHandler = new MementoHandler();                 //using memento pattern to handle saving/loading and also undo/redo in the

        PipelineSystem.System.CreateSubtask(m_taskName, m_name); //create the directory if not exist

        //todo : m_versions = pipelineSystem.GetVersions(subtaskName, TaskName)
        m_versions = PipelineSystem.System.GetVersionList(m_taskName, m_name);
        IsSelected = false;
    }
    public ModelisationTask(AssetManagerModel _assetManager, TaskState _state, TaskName[] _nextTasks) : base(_assetManager, _state, _nextTasks)
    {
        m_taskName = TaskName.Modelisation;
        //init view
        GameObject view = GameObject.Find("ModePanel");

        m_view = view.AddComponent <Modelisation_View>();
        //Connect to the view part, will maybe move to the parent class
        m_view.onCreateSubtask += HandleCreateSubtask;
        m_view.onRemoveSubtask += HandleRemoveSubtask;
        m_view.onSelectSubtask += HandleSelectSubtask;
        m_view.onOpenSoftware  += HandleOpenSoftware;
        m_model = new ModelisationTask_Model(_assetManager, m_taskName);
        //m_model.onLoadSubtask += m_view.HandleLoadSubtask;//HandleSubtask;
        Debug.Log("Init mode panel");
    }
    //add the model

    public AssetManagerController(IAssetManagerView _view, AssetManagerModel _model)
    {
        m_view  = _view;
        m_model = _model;
        m_view.loadAssetEvent += LoadAsset;
        m_view.saveAssetEvent += SaveAsset;
        SystemState state         = m_model.LoadSystem();
        string      lastAssetPath = null;

        if (state != null)
        {
            lastAssetPath = state.LastAssetPath;
        }
        m_model.updateTaskEvent += UpdateTaskView;
//        m_view.InitPipelineButtons(m_model.GetTasks());
        m_view.Init(lastAssetPath, m_model.GetTasks());
    }
    //public event EventHandler<LoadSubtaskEvent> onLoadSubtask;

    public ModelisationTask_Model(AssetManagerModel _assetModel, TaskName _taskName) : base(_assetModel, _taskName)
    {
        m_Subtasks = new Dictionary <int, Subtask_Controller>();
    }
Beispiel #6
0
 public TaskController(AssetManagerModel _assetManager, TaskState _state, TaskName[] _nextTasks)
 {
     m_state      = _state;//m_state = read a saved file with last saved state
     m_nextTasks  = _nextTasks;
     m_warningMsg = "";
 }
Beispiel #7
0
 public TaskModel(AssetManagerModel _assetManager, TaskName _taskName)
 {
     m_assetManager   = _assetManager;
     m_taskName       = _taskName;
     m_currentVersion = 1;
 }