C# Class PGCGame.CoreTypes.Extensions

Exibir arquivo Open project: GreatMindsRobotics/PGCGame

Public Methods

Method Description
NextShipTier ( this random, ShipTier minValue, ShipTier maxValue ) : ShipTier

Generates a new ShipTier between minValue and maxValue, inclusively

Both minimum and maximum values are inclusive for this extension method

NextTimeSpan ( this random, System.TimeSpan minValue, System.TimeSpan maxValue ) : System.TimeSpan

Generates a new TimeSpan between minValue and maxValue

The amount of total milliseconds from each TimeSpan, which is used for random generation, is rounded to an integer.

ToFriendlyString ( this sessType ) : string

Method Details

NextShipTier() public static method

Generates a new ShipTier between minValue and maxValue, inclusively
Both minimum and maximum values are inclusive for this extension method
public static NextShipTier ( this random, ShipTier minValue, ShipTier maxValue ) : ShipTier
random this Random number generator to use
minValue ShipTier Inclusive minimum value
maxValue ShipTier Inclusive maximum value
return ShipTier

NextTimeSpan() public static method

Generates a new TimeSpan between minValue and maxValue
The amount of total milliseconds from each TimeSpan, which is used for random generation, is rounded to an integer.
public static NextTimeSpan ( this random, System.TimeSpan minValue, System.TimeSpan maxValue ) : System.TimeSpan
random this Random number generator to use.
minValue System.TimeSpan Inclusive minimum value.
maxValue System.TimeSpan Exclusive maximum value.
return System.TimeSpan

ToFriendlyString() public static method

public static ToFriendlyString ( this sessType ) : string
sessType this
return string