GameTime

indigo.shared.time.GameTime
See theGameTime companion object
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.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def setTargetFPS(fps: Int): GameTime

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val frameDuration: Option[Millis]