Exemplo n.º 1
0
        /// <summary>
        /// 新增任务点
        /// </summary>
        private void AddPoint(Type type, Vector2 position)
        {
            TaskPointBase taskPoint = CreateInstance(type) as TaskPointBase;

            taskPoint.Anchor        = new Rect(position.x, position.y, 200, 85);
            taskPoint.GUID          = _asset.TaskPointIDName + _asset.TaskPointIDSign.ToString();
            taskPoint.Details       = taskPoint.Name = "New Task Point " + _asset.TaskPointIDSign.ToString();
            _asset.TaskPointIDSign += 1;
            _currentContent.Points.Add(taskPoint);

            TaskContentBase.GenerateSerializeSubObject(taskPoint, _asset);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 新增任务点
        /// </summary>
        private void AddPoint(Type type, Vector2 position)
        {
            TaskPointAttribute tpa       = type.GetCustomAttribute <TaskPointAttribute>();
            TaskPointBase      taskPoint = CreateInstance(type) as TaskPointBase;

            taskPoint.Anchor        = new Rect(position.x, position.y, 200, 85);
            taskPoint.GUID          = _asset.TaskPointIDName + _asset.TaskPointIDSign.ToString();
            taskPoint.Name          = (tpa != null ? tpa.GetLastName() : "New Task Point ") + _asset.TaskPointIDSign.ToString();
            _asset.TaskPointIDSign += 1;
            _currentContent.Points.Add(taskPoint);

            TaskContentBase.GenerateSerializeSubObject(taskPoint, _asset);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 新增任务内容
        /// </summary>
        private void AddContent(Type type)
        {
            TaskContentBase taskContent = CreateInstance(type) as TaskContentBase;

            taskContent.GUID    = _asset.TaskIDName + _asset.TaskIDSign.ToString();
            taskContent.Details = taskContent.Name = "New Task " + _asset.TaskIDSign.ToString();
            _asset.TaskIDSign  += 1;
            _asset.Content.Add(taskContent);
            _taskContentList.index = _asset.Content.Count - 1;
            _currentContent        = taskContent;

            TaskContentBase.GenerateSerializeSubObject(taskContent, _asset);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 新增任务内容
        /// </summary>
        private void AddContent(Type type)
        {
            TaskContentAttribute tca         = type.GetCustomAttribute <TaskContentAttribute>();
            TaskContentBase      taskContent = CreateInstance(type) as TaskContentBase;

            taskContent.GUID   = _asset.TaskIDName + _asset.TaskIDSign.ToString();
            taskContent.Name   = (tca != null ? tca.GetLastName() : "New Task  ") + _asset.TaskIDSign.ToString();
            _asset.TaskIDSign += 1;
            _asset.Content.Add(taskContent);
            _taskContentList.index = _asset.Content.Count - 1;
            _currentContent        = taskContent;

            TaskContentBase.GenerateSerializeSubObject(taskContent, _asset);
        }