All Data Structures Functions Variables Pages
Static Public Member Functions
GameLevelUtil Class Reference

Static Public Member Functions

static getNextLevelPointValueByTypeAndCurrentLevel ($type, GameLevel $level)
 
static getNextLevelByTypeAndCurrentLevel ($type, GameLevel $level)
 
static getUserStatisticsData (User $user)
 
static getStatisticsDataForAGivenLevelType (User $user, $levelType)
 

Detailed Description

Helper class for working with game levels.

Definition at line 40 of file GameLevelUtil.php.

Member Function Documentation

static getNextLevelPointValueByTypeAndCurrentLevel (   $type,
GameLevel  $level 
)
static

Given a level type and GameLevel, get the point value needed to 'level up' to the next level.

Parameters
string$type
GameLevel$level
Returns
false if there is no next level or returns an integer of the points required to 'level up' to the next level.

Definition at line 49 of file GameLevelUtil.php.

static getNextLevelByTypeAndCurrentLevel (   $type,
GameLevel  $level 
)
static

Given a level type and GameLevel, get the next level.

Parameters
string$type
GameLevel$level
Returns
Next level as integer or false if there is no next level.

Definition at line 67 of file GameLevelUtil.php.

static getUserStatisticsData ( User  $user)
static

Given a user, return level information including total points, what level the user is at for each level type, and how many points until the user reaches the next of each level type.

Parameters
User$user
Returns
array

Definition at line 84 of file GameLevelUtil.php.

static getStatisticsDataForAGivenLevelType ( User  $user,
  $levelType 
)
static
Parameters
User$user
$levelType
Returns
array

Definition at line 101 of file GameLevelUtil.php.


The documentation for this class was generated from the following file:
Generated on Sat May 30 2020 07:10:47