C# Class ActivEarth.Objects.Competition.Badges.Badge

Mostra file Open project: mlcamilli/ActivEarth Class Usage Examples

Public Methods

Method Description
Badge ( ) : System

Empty constructor for reading back in from the DB.

Badge ( int userId, Statistic statistic ) : System

Creates a new badge belonging to a user, based on a specific statistic.

Badge ( int userId, Statistic statistic, float levelValues, int levelPoints, string imagePaths ) : System

Creates a new badge belonging to a user, based on a specific statistic.

GetNextLevelRequirement ( ) : float

Returns the statistic value required to get to the next level of the badge.

GetNextLevelReward ( ) : int

Returns the number of Activity Points awarded for achieving the next level of the badge.

IsComplete ( ) : bool

Whether or not the badge path has been completed.

Method Details

Badge() public method

Empty constructor for reading back in from the DB.
public Badge ( ) : System
return System

Badge() public method

Creates a new badge belonging to a user, based on a specific statistic.
public Badge ( int userId, Statistic statistic ) : System
userId int
statistic Statistic Statistic to which the Badge is bound.
return System

Badge() public method

Creates a new badge belonging to a user, based on a specific statistic.
public Badge ( int userId, Statistic statistic, float levelValues, int levelPoints, string imagePaths ) : System
userId int
statistic Statistic Statistic to which the Badge is bound.
levelValues float
levelPoints int
imagePaths string
return System

GetNextLevelRequirement() public method

Returns the statistic value required to get to the next level of the badge.
public GetNextLevelRequirement ( ) : float
return float

GetNextLevelReward() public method

Returns the number of Activity Points awarded for achieving the next level of the badge.
public GetNextLevelReward ( ) : int
return int

IsComplete() public method

Whether or not the badge path has been completed.
public IsComplete ( ) : bool
return bool