module SF
#
Extended modules
SF
Constants#
SFML_VERSION = "2.6.0"
#
VERSION = "2.6.0"
#
Methods#
#microseconds(amount : Int) : Time
#
Construct a time value from a number of microseconds
- amount - Number of microseconds
Returns: Time value constructed from the amount of microseconds
See also: seconds
, milliseconds
#milliseconds(amount : Int) : Time
#
Construct a time value from a number of milliseconds
- amount - Number of milliseconds
Returns: Time value constructed from the amount of milliseconds
See also: seconds
, microseconds
#seconds(amount : Number) : Time
#
Construct a time value from a number of seconds
- amount - Number of seconds
Returns: Time value constructed from the amount of seconds
See also: milliseconds
, microseconds
#sleep(duration : Time)
#
Make the current thread sleep for a given duration
SF.sleep
is the best way to block a program or one of its
threads, as it doesn't consume any CPU power.
- duration - Time to sleep
#vector2(x, y)
#
Shorthand for Vector2.new
If arguments are mixed between Int32
and Float
,
they are converted to match Vector2f
#vector2f(x : Number, y : Number)
#
Shorthand for Vector2f.new
Converts arguments to Float32
#vector3f(x : Number, y : Number, z : Number)
#
Shorthand for Vector3f.new
Converts arguments to Float32