Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DestroyOrCollect(GamePiece p) {
- LevelManager.instance.OnPieceCleared(p);
- if (p.Type == Pieces.Type.CLEF) {
- grid.clefsManager.CollectClef(p);
- } else if (p.Type == Pieces.Type.DIAMONDSBASKET &&
- p.GetComponent<DiamondsBasketPiece>().GetCurrentAmount() <= 0) {
- return;
- } else {
- p.ClearableComponent.Clear();
- }
- if (p.LayerID == GridData.mainLayerID && p.Type != Pieces.Type.DIAMONDSBASKET) {
- grid.Spawner.SpawnNewPiece(p.X, p.Y, Pieces.Type.EMPTY, GridData.mainLayerID);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement