Exemplo n.º 1
0
        /// <summary>
        /// Excel处理
        /// </summary>
        /// <param name="excelGlobalDTO"></param>
        public void ExcelHandle(ExcelGlobalDTO <TEntity> excelGlobalDTO)
        {
            //执行处理前扩展
            ExcelHandleBefore(excelGlobalDTO);

            //设置区块
            AreaBlock <TEntity> areaBlock = new AreaBlock <TEntity>();

            areaBlock.SetAreaBlock(excelGlobalDTO);

            //设置头部颜色
            HeadColor <TEntity> headColor = new HeadColor <TEntity>();

            headColor.SetHeadColor(excelGlobalDTO);

            excelGlobalDTO.PerformanceMonitoring.Start("SetRowColor");
            //设置行颜色
            RowColor <TEntity> rowColor = new RowColor <TEntity>();

            rowColor.SetRowColor(excelGlobalDTO);
            excelGlobalDTO.PerformanceMonitoring.Stop();

            //设置锁定
            SheetLocked <TEntity> sheetLocked = new SheetLocked <TEntity>();

            sheetLocked.SetSheetLocked(excelGlobalDTO);

            //设置列隐藏
            SheetColumnHidden <TEntity> sheetColumnHidden = new SheetColumnHidden <TEntity>();

            sheetColumnHidden.SetSheetColumnHidden(excelGlobalDTO);

            //批注
            Comment <TEntity> comment = new Comment <TEntity>();

            //清空批注
            comment.ClearComment(excelGlobalDTO);

            //设置批注
            comment.SetComment(excelGlobalDTO);

            //设置列类型
            SheetColumnType <TEntity> sheetColumnType = new SheetColumnType <TEntity>();

            sheetColumnType.SetSheetColumnType(excelGlobalDTO);

            //从Excel处理
            SlaveExcel <TEntity> slaveExcel = new SlaveExcel <TEntity>();

            slaveExcel.SlaveExcelHandle(excelGlobalDTO);

            //执行处理后扩展
            ExcelHandleAfter(excelGlobalDTO);
        }
Exemplo n.º 2
0
    void CreateAreaBlock()
    {
        SelectSphereHandle();
        m_CurBlock = new GameObject();
        m_CurBlock.transform.parent = m_BlockContainer.transform;
        m_AreaBlock = m_CurBlock.AddComponent <AreaBlock>();
        m_AreaBlock.Initialize();
        m_CurSelectedBlockName = m_CurBlock.name;

        m_Creating = true;
    }
Exemplo n.º 3
0
        public Game(Area[] areas, int currentArea = 0, Player player = null)
        {
            Doors.CreateDoors();

            if (player == null)
            {
                player = new Player("Unknown", new Inventory(10));
            }

            AreaBlock        = new AreaBlock(areas, currentArea);
            InventoryBlock   = new InventoryBlock(player.Inventory);
            DialogBlock      = new DialogBlock();
            MenuBlock        = new MenuBlock();
            PlayerStateBlock = new PlayerStateBlock(player);
            TickHandler      = new TickHandler(this, 41);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获取区块
        /// </summary>
        /// <param name="areaBlock"></param>
        /// <returns></returns>
        public static AreaBlock GetAreaBlock(XmlElement areaBlock)
        {
            if (areaBlock == null)
            {
                return(null);
            }
            AreaBlock entity = new AreaBlock
            {
                StartRowIndex    = areaBlock.Attributes["StartRowIndex"]?.Value.ToInt() ?? 0,
                EndRowIndex      = areaBlock.Attributes["EndRowIndex"]?.Value.ToInt() ?? 0,
                StartColumnIndex = areaBlock.Attributes["RowColumnIndex"]?.Value.ToInt() ?? 0,
                EndColumnIndex   = areaBlock.Attributes["EndColumnIndex"]?.Value.ToInt() ?? 0,
                Height           = areaBlock.Attributes["Height"]?.Value.ToShort() ?? 0,
                Content          = areaBlock.Attributes["Content"]?.Value,
                LanguageKey      = areaBlock.Attributes["LanguageKey"]?.Value
            };

            return(entity);
        }
Exemplo n.º 5
0
 void OnSelectBlockButton(Transform _transform)
 {
     m_CurBlock  = _transform.gameObject;
     m_AreaBlock = _transform.GetComponent <AreaBlock>();
     Selection.activeGameObject = _transform.gameObject;
 }