GameTime

final case class GameTime(running: Seconds, delta: Seconds, targetFPS: Option[FPS])

An instance of GameTime is present on every frame, and the values it holds do not change during that frame. This allows for "synchronous" programming, where it is assumed that everything happens at the exact same time during the current frame. The most commonly used fields (e.g. for animation) are the running time of the game and the time delta since the last frame.

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

Value members

Concrete methods

@targetName("setTargetFPS_Int")
def setTargetFPS(fps: Int): GameTime

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

lazy val frameDuration: Option[Millis]