本文整理汇总了C#中Grid.DestroyCell方法的典型用法代码示例。如果您正苦于以下问题:C# Grid.DestroyCell方法的具体用法?C# Grid.DestroyCell怎么用?C# Grid.DestroyCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid
的用法示例。
在下文中一共展示了Grid.DestroyCell方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ColoringBombTrigger
public void ColoringBombTrigger(Grid bombGrid,Grid triggerGrid)
{
if (bombGrid == null || triggerGrid == null)
{
return;
}
CellColor targetColor;
List<Grid> mostColorList;
if (bombGrid.isMatchColor(triggerGrid))
{
mostColorList = FindMostOtherColor(triggerGrid);
}else
{
mostColorList = FindColorGrids(triggerGrid);
}
TintGrids(bombGrid,mostColorList);
bombGrid.DestroyCell(Constants.CELL_ELIM_TIME,true,null);
// List<Grid>
}
示例2: ElimGridListAndGenBomb
void ElimGridListAndGenBomb(List<Grid> lst,Grid g,BombType genBomb = BombType.None)
{
if (lst.Count == 0)
{
return;
}
if (genBomb == BombType.None) {
g.DestroyCell (Constants.CELL_ELIM_TIME,true,g);
for (int i = 0; i < lst.Count; ++i) {
Grid curGrid = lst [i];
curGrid. DestroyCell(Constants.CELL_ELIM_TIME,true,g);
}
} else {
if (g.bombType != BombType.None)
{
BombManager.instance.triggerBomb(g,g);
}
if (!g.Cell) {
return;
}
g.Cell.cellType = CellType.Bomb;
g.Cell.cellBombType = genBomb;
if (g.bombType == BombType.Color)
{
g.Cell.cellColor = CellColor.All;
}
g.Cell.highZorder();
g.Cell.updateCell (Constants.FORM_TIME);
for (int i = 0; i < lst.Count; ++i) {
Grid curGrid = lst [i];
curGrid. MoveToAndElim(g,Constants.FORM_TIME,g);
}
}
}
示例3: ColorBombTrigger
void ColorBombTrigger(Grid bombGrid,Grid triggerGrid)
{
if (bombGrid == null || triggerGrid == null)
{
return;
}
UpdateBorder();
for (int curRow = _activeMinRow ; curRow < _activeMaxRow; ++curRow)
{
for (int curCol = _activeMinCol; curCol < _activeMaxCol; ++curCol)
{
var curGrid = GridsManager.instance[curRow,curCol];
if (curGrid && curGrid != triggerGrid && curGrid.isBombable() && curGrid.isMatchColor(triggerGrid))
{
curGrid.DestroyCell(Constants.CELL_ELIM_TIME,true,triggerGrid);
CreateBombEff(bombGrid,curGrid);
}
}
}
triggerGrid.DestroyCell(Constants.CELL_ELIM_TIME,true,triggerGrid);
bombGrid.DestroyCell(Constants.CELL_ELIM_TIME,true,triggerGrid);
}