-
Notifications
You must be signed in to change notification settings - Fork 2
Pellet Manager Reference
This class handles creating and updating pellet locations. The global EventBus is used to handle data receipt asynchronously. Methods annotated with @Subscribe are used to handle relevant EventBus data.
Used for logging.
The API client for making requests. Results are published on the EventBus, received by the local methods annotated with @Subscribe.
The list of pellets, kept up to date in onPelletsReceived.
Callback passed in by the calling code used to create pellets on a map.
The game loop. An action is registered to refresh pellet data via an API call.
PelletManager(PacMacroClient apiClient, InitializeCircleCallback mapCallback, GameController gameController)
Constructor. Each parameter is assigned to a field (see above), and a game loop action is registered to update pellets.
An EventBus handler for when new pellet data is received. For each pellet received, the location, type, and visibility is extracted, the pellet is plotted on a map (via mMapCallback), it's visibility is set, and it is added to mPelletList.
Convenience method for clearing the circle (on the map) for each pellet in mPelletList. This method makes all the pellets disappear on the map.
- Home
- Overview
- Configuration
- Reference
- Activity and Fragment
- API
- Controller
- Model
- Other functionality