class Escapist::Room

Included Modules

Defined in:

escapist/room.cr

Constant Summary

BorderColor = SF::Color.new(102, 102, 102)
BorderOutlineThickness = 8
SectionTiles = 15
TileFloorColor = SF::Color.new(6, 6, 6)
TileGridColor = SF::Color.new(13, 13, 13)
TileGridOutlineThickness = 2
TileSize = 128

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(s_rows : Int32 = 1, s_cols : Int32 = 1, key : String = UUID.random.to_s) #

[View source]

Class Method Detail

def self.tile_size #

[View source]

Instance Method Detail

def add_door(door : Symbol, room_key, section_index) #

[View source]
def add_tile_obj(place_type : Symbol, col, row) #

[View source]
def clear_entered(*args, **options) #

[View source]
def clear_entered(*args, **options, &) #

[View source]
def cols #

[View source]
def display_name #

[View source]
def doors : RoomDoors #

[View source]
def draw(window : SF::RenderWindow, p : Player | Nil) #

[View source]
def draw_border(window) #

[View source]
def draw_floor(window) #

[View source]
def draw_tile_cell(window, col, row) #

[View source]
def draw_tile_grid(window) #

[View source]
def entered(*args, **options) #

[View source]
def entered(*args, **options, &) #

[View source]
def height #

[View source]
def key : String #

[View source]
def move_tile_obj(col, row, new_col, new_row) #

[View source]
def remove_tile_obj(col, row) #

[View source]
def rows #

[View source]
def s_cols : Int32 #

[View source]
def s_rows : Int32 #

[View source]
def spawn_player(player, room_key) #

[View source]
def tile_obj?(col, row) #

[View source]
def tile_size #

[View source]
def tiles : TileGrid #

[View source]
def tiles_near(x, y) #

[View source]
def update(frame_time, keys : Keys, p : Player | Nil) #

[View source]
def update_laser_blocks(frame_time) #

[View source]
def update_laser_switches #

[View source]
def update_tiles #

[View source]
def width #

[View source]