public static void HandleBreakableBrickBlockCollision(IPlayer player, BrickBlock brickBlock, CollisionSide side) { PlayerBlockRepel(brickBlock, player, side); if ((side == CollisionSide.Bottom) && !brickBlock.Broken) { brickBlock.BeBumped(); if (player.IsBig) { brickBlock.Break(); } } }
public static void HandleUnbreakableBrickBlockCollision(IPlayer player, BrickBlock brickBlock, CollisionSide side) { PlayerBlockRepel(brickBlock, player, side); if ((side == CollisionSide.Bottom) && !brickBlock.Depleted) { brickBlock.BeBumped(); brickBlock.SpawnItem(); if (brickBlock.Depleted) { brickBlock.BecomeUsed(); // Become used after all contained items have been spawned } } }