module Tsh
Overview
The T(hirty) S(ix) h(undred) engine
The primary module for the engine.
Tsh.play()
and Tsh::PlayThing
are the most
used parts of the engine.
Defined in:
colors.crengine.cr
plaything.cr
sounds.cr
tsh-cr.cr
Constant Summary
-
COLOR_COUNT =
32
-
The size of
Tsh.colors
-
MAX_SOUNDS =
16
-
The maximum amount of sound that can play at the same time. 1-16
-
VERSION =
"0.2.0"
Class Method Summary
-
.background_color : Raylib::Color
The background color for the screen
-
.background_color=(background_color : Raylib::Color)
The background color for the screen
-
.check_collisions
Runs all collision checks
-
.colors : Colors
A static array of
Tsh::Color
of sizeCOLOR_COUNT
-
.delta_time : Float64
Returns the time since the last frame rendered
-
.destroy_all_playthings
Destroys every PlayThing
-
.game_time : Float64
Returns the time since the game started
-
.key_down?(key : Key) : Bool
Checks if a key is currently down
-
.key_pressed?(key : Key) : Bool
Checks if a key has been pressed
-
.play(title : String, res_x : UInt32, res_y : UInt32, colors : Array(Tsh::Color) = [] of Tsh::Color, &)
Starts the engine.
-
.res_x : UInt32
The internal screen's resolution
- .res_y : UInt32
Class Method Detail
def self.play(title : String, res_x : UInt32, res_y : UInt32, colors : Array(Tsh::Color) = [] of Tsh::Color, &)
#
Starts the engine. Yields a block to update the game