DecreaseWrapAt

final case class DecreaseWrapAt(value: Double, unitsPerSecond: Double, limit: Double) extends TimeVaryingValue

A value that decreases over time and wraps back to zero when it hits the limit

Value parameters:
limit

The lower limit

unitsPerSecond

The rate of change

value

The current/starting value

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def update(timeDelta: Seconds): DecreaseWrapAt

Update the time varying value based on a time delta

Update the time varying value based on a time delta

Value parameters:
timeDelta

the time delta typically supplied from GameTime(..).delta

Returns:

TimeVaryingValue

Inherited methods

Inherited from:
Product

Value as an Double

Value as an Double

Returns:

Double

Inherited from:
TimeVaryingValue

Value as an Float

Value as an Float

Returns:

Float

Inherited from:
TimeVaryingValue
def toInt: Int

Value as an Int

Value as an Int

Returns:

Int

Inherited from:
TimeVaryingValue

Value as an Long

Value as an Long

Returns:

Long

Inherited from:
TimeVaryingValue