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


def self.background_color=(background_color : Raylib::Color) #

The background color for the screen


def self.check_collisions #

Runs all collision checks


def self.colors : Colors #

A static array of Tsh::Color of size COLOR_COUNT


def self.delta_time : Float64 #

Returns the time since the last frame rendered


def self.destroy_all_playthings #

Destroys every PlayThing


def self.game_time : Float64 #

Returns the time since the game started


def self.key_down?(key : Key) : Bool #

Checks if a key is currently down


def self.key_pressed?(key : Key) : Bool #

Checks if a key has been pressed


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


def self.res_x : UInt32 #

The internal screen's resolution


def self.res_y : UInt32 #