Game components

The ball game is created with the following primary components:

  • GameController manages the overall game, including the current score. It subscribes to the BallGame's won and lost events, manages the score, and displays game data. As the game supports switching between ball game types, the GameController chooses and starts a random game.
  • GameDataManager saves and restores data for the game. It manages persistent storage of the player progress and high scores.
  • The BallGame component manages individual ball games. One is attached to each separate ball game. It uses the ThrowControl component to determine when the show is done and if the ball hit the goal, and then it invokes a won or lost event accordingly.
  • The ThrowControl ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.