BaseAction06 / 15

Running an action

Play an effect for a cleared cell.

In layout.json, the effect is named lineClearBurst. When a cell clears, the component calls runAction with the cell coordinates. layout.json · BlockPuzzleBoardEffectsComponent.ts

this.trackTask(
  this.node.runAction(this.config.actionId, {
    position: this.cellPosition(cell.row, cell.column),
  }),
);
LinesClearedThe line is cleared
runActionPass the action name and coordinates
PlayParticlesActionParticles appear at the cell

Sources ↗

Block Puzzle · BlockPuzzleBoardEffectsComponent.ts↗Running an effect for each cell.