class MonsterMaze::Level

Direct Known Subclasses

Defined in:

monster_maze/level.cr

Constant Summary

EmptyString = ""
GameWinDuration = 500.milliseconds
OilFillSheetFile = "./assets/tiles/oil_fill.png"
SoundFootsteps = "./assets/sounds/footsteps.ogg"
SoundOilDip = "./assets/sounds/oil_dip.ogg"
SoundThud = "./assets/sounds/thud.ogg"
TextColorFocused = SF::Color.new(255, 127, 0)
TileSheetDataFile = "./assets/tiles/tiles.json"
TileSheetFile = "./assets/tiles/tiles.png"
VisibilitySize = 16
VisibilitySizeFactor = TileSize // VisibilitySize

Constructors

Instance Method Summary

Constructor Detail

def self.new(player : Player, rows : Int32 = 1, cols : Int32 = 1) #

[View source]

Instance Method Detail

def close_collidable_movables(movable : Movable) #

[View source]
def close_collidable_tiles(movable : Movable) #

[View source]
def close_oil_pools(movable : Movable) #

[View source]
def collision_with_circle?(x, y, size) #

[View source]
def cols : Int32 #

[View source]
def draw(window : SF::RenderWindow) #

[View source]
def draw_collision_tiles(window) #

[View source]
def draw_game_over_menu(window) #

[View source]
def draw_visibility(window) #

[View source]
def exit? : Bool #

[View source]
def game_over? #

[View source]
def game_win? #

[View source]
def height #

[View source]
def init #

[View source]
def init_finish_area(finish_tile) #

[View source]
def init_monsters #

[View source]
def init_oil_pools(oil_pool_tile) #

[View source]
def init_sounds #

[View source]
def init_spawns(spawn_tile) #

[View source]
def init_sprites #

[View source]
def init_tiles #

[View source]
def init_visibilities #

[View source]
def monsters : Array(Monster) #

[View source]
def oil_pools : Array(OilPool) #

[View source]
def play_sound(sound : SF::Sound) #

[View source]
def player : Player #

[View source]
def reset #

[View source]
def reset_visibility(tile_row, tile_col) #

[View source]
def rows : Int32 #

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

[View source]
def tile_map_file #

[View source]
def tile_sheet_data_file #

[View source]
def tile_sheet_file #

[View source]
def tile_size #

[View source]
def tiles : Array(Array(Int32)) #

[View source]
def update(frame_time, keys : Keys, joysticks : Joysticks) #

[View source]
def update_game_over(frame_time, keys, joysticks) #

[View source]
def update_tile_visibility(tile_row, tile_col) #

[View source]
def update_visibility #

[View source]
def v_cols #

[View source]
def v_rows #

[View source]
def visibilities_from_tile(tile_row, tile_col) : Array(VisibilityData) #

[View source]
def width #

[View source]