GameViewControllerDelegate

@protocol GameViewControllerDelegate <NSObject>

GameViewControllerDelegate is used to notify the delegate of any changes a game view controller makes to the GameData.

  • This method will be called anytime a game view controller updated a property in the GameData.

    Declaration

    Objective-C

    - (void)gameDifficultyUpdatedWithGameData:(nonnull GameData *)gameData;

    Swift

    func gameDifficultyUpdated(with gameData: GameData)
  • This method will be called anytime a game view controller finishes playing a game.

    Declaration

    Objective-C

    - (void)gameCompletedWithScore:(NSInteger)score
                          gameData:(nullable GameData *)gameData;

    Swift

    optional func gameCompleted(withScore score: Int, gameData: GameData?)
  • This method gets called when the user opts to share their score

    Declaration

    Objective-C

    - (void)gameShareWithScore:(NSInteger)score
                      gameData:(nonnull GameData *)gameData;

    Swift

    optional func gameShare(withScore score: Int, gameData: GameData)