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.cr
engine.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

Class Method Detail

def self.background_color : Raylib::Color #

The background color for the screen


[View source]
def self.background_color=(background_color : Raylib::Color) #

The background color for the screen


[View source]
def self.check_collisions #

Runs all collision checks


[View source]
def self.colors : Colors #

A static array of Tsh::Color of size COLOR_COUNT


[View source]
def self.delta_time : Float64 #

Returns the time since the last frame rendered


[View source]
def self.destroy_all_playthings #

Destroys every PlayThing


[View source]
def self.game_time : Float64 #

Returns the time since the game started


[View source]
def self.key_down?(key : Key) : Bool #

Checks if a key is currently down


[View source]
def self.key_pressed?(key : Key) : Bool #

Checks if a key has been pressed


[View source]
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


[View source]
def self.res_x : UInt32 #

The internal screen's resolution


[View source]
def self.res_y : UInt32 #

[View source]