예제 #1
0
        public override CellsGroup GetArea(GridCell gCell)
        {
            CellsGroup cG = new CellsGroup();

            //  Debug.Log(gCell);
            if (!gCell)
            {
                return(cG);
            }
            switch (OData.bombType)
            {
            case BombDir.Vertical:
                cG.AddRange(gCell.GColumn.cells);      //cG.AddRange(gCell.GColumn.GetDynamicArea());
                break;

            case BombDir.Horizontal:
                cG.AddRange(gCell.GRow.cells);     // cG.AddRange(gCell.GRow.GetDynamicArea());
                break;

            case BombDir.Radial:
                List <GridCell> areaRad = MBoard.grid.GetAroundArea(gCell, 1).Cells;
                cG.Add(gCell);
                foreach (var item in areaRad)
                {
                    cG.Add(item);        // if (item.IsMatchable)
                }
                break;

            case BombDir.Color:
                cG.AddRange(MGrid.GetAllByID(OData.matchID).SortByDistanceTo(gCell));
                break;
            }
            return(cG);
        }
예제 #2
0
        public override CellsGroup GetArea(GridCell gCell)
        {
            CellsGroup cG = new CellsGroup();

            if (!gCell)
            {
                return(cG);
            }

            cG.AddRange(MGrid.GetAllByID(OData.matchID).SortByDistanceTo(gCell));
            return(cG);
        }