Candies
Last updated
Last updated
The Candies system is responsible for managing all candy-related functionalities in the game. This includes the creation, spawning, merging, and boundary checks of candy objects. The system ensures that candies behave correctly within the game world and interact with other game elements as intended.
Represents a candy object in the Candy Merge game. This class is used to define the properties and behaviors of individual candy types, such as their appearance, value, and unlock status.
Represents a candy instance in the game world. This class handles the physical representation of candies, including their sprite, collider, and rigidbody components. It also manages the initialization, dropping, and disposal of candy instances.
Manages candies in the game world, including merging and boundary checks. This class is responsible for handling the interactions between candies, such as merging two candies into a new, upgraded candy, and ensuring that all candies remain within the game boundaries.
Manages the creation, spawning, and manipulation of candy objects in the game. This class provides methods for creating new candies, spawning them at specific positions, and handling the overall lifecycle of candies within the game.
Controls the behavior and unlocking of candy objects in the game. This class is responsible for managing the progression of candies, including unlocking new candies and triggering events when certain conditions are met.
Manages the selection and switching of CandyObject instances. This class allows for the selection of random candies based on their weight and handles the switching of the current candy with the next one.
A singleton scriptable object that holds the root candy and provides access to all candy objects in the game. This class is used to define the hierarchy of candies and ensure that all candies are properly initialized and managed.
The Spawner system is responsible for managing the spawning and switching of candy objects in the game. It ensures that candies are spawned at the correct positions and handles the input for dropping and switching candies.
The main class responsible for managing the spawning and switching of candy objects. It inherits from the Singleton class to ensure only one instance exists. This class handles the initialization of the cooldown counter, subscribes to events, and updates the cooldown counter and input handling each frame.
Creating a New Candy: The CandyManager class provides methods for creating new candies and spawning them at specific positions. This can be used to add new candies to the game world during gameplay.
Merging Candies: The CandyInWorld class handles the merging of two candies into a new, upgraded candy. This can be used to implement gameplay mechanics where players can combine candies to create more powerful ones.
Unlocking Candies: The CandyController class manages the unlocking of new candies based on player progression. This can be used to reward players with new candy types as they progress through the game.
Spawning Candies: The Spawner class provides methods for spawning candies at specific positions. This can be used to add new candies to the game world at predefined locations.
Switching Candies: The Spawner class handles the input for switching candies. This can be used to implement gameplay mechanics where players can switch between different candy types during gameplay.
By using these systems, you can manage the creation, spawning, merging, and unlocking of candies in the Candy Merge game, providing a rich and engaging gameplay experience for players.