Board Prefab Overview

BoardManager — the central manager of the game board.
Prefab path: Assets/StaticAssets/Prefabs/Board/Board.prefab
Cell Management: handles adding parts, upgrading them, and checking for free slots.
Purchasing & Economy: checks if parts can be bought and interacts with the player’s wallet.
Visualization & Animations: displays and animates the garbage zone, handles upgrade and merge effects.
Part Type Logic: selects part types with weighted probabilities based on player levels.
Integration with Other Systems: coordinates with the object factory, UI, upgrade system, and player context.
Progress Saving & Loading: saves the current board state and restores it when needed.
On the game scene, the prefab is parented under the PlayerContext object.
To create a part on the board, use the ADD PART button. The button accesses the BoardManager component and, through the GameFactory, creates the part and places it on the board.
Component

cellTransforms – A list of
Transformobjects for all cells on the game board. Used for placing parts and finding free slots.garbage – The
Transformof the deletion zone object. Used for visualizing and animating part removal.garbageDuration – Duration of the deletion zone animation (in seconds).
garbageBackground –
SpriteRendererof the deletion zone background. Its color changes depending on readiness for deletion.readyForDeletionColor – Background color of
garbageBackgroundwhen an object is ready for deletion.notReadyForDeletionColor – Background color of
garbageBackgroundwhen an object is not ready for deletion.levelDecayExponent – Controls the rate at which the probability of a part drop decreases with increasing level. Higher values cause the chance to drop faster.
minWeight – The minimum probability value below which the drop chance does not decrease.
Last updated