class Dungeon::LockedChest

Defined in:

dungeon/locked_chest.cr

Constant Summary

CHANCES = 5
ITEM_POOL = [{chance: 0.3, items: [{chance: 0.7, klass: FullHeart}, {chance: 0.3, klass: HalfHeart}]}, {chance: 0.3, items: [{chance: 0.7, klass: BombItem}, {chance: 0.3, klass: ArrowItem}]}, {chance: 0.25, items: [{chance: 1.0, klass: Key}]}]

Constructors

Instance Method Summary

Instance methods inherited from class Dungeon::Chest

chances chances, collidable? collidable?, drop_items drop_items, item_chance item_chance, opened? : Bool opened?, pick_up pick_up, position_items(items) position_items

Constructor methods inherited from class Dungeon::Chest

new(loc : Location, room : Room, player : Player, animation_row = 0, animation_fps = 0) new

Instance methods inherited from class Dungeon::Item

collidable? collidable?, draw draw, pick_up pick_up, remove remove, removed? : Bool? removed?, update(_entities) update

Constructor methods inherited from class Dungeon::Item

new(loc : Location, sprite : Sprite, animation_row = 0, animation_fps = 24, hit_box_padding = 0) new

Instance methods inherited from class Dungeon::Entity

bottom_layer? : Bool bottom_layer?, bump_damage bump_damage, centered? : Bool centered?, collidable? collidable?, collision?(entity : Entity, other_box : Box = entity.collision_box, own_box : Box = collision_box) collision?, collision_box : Box collision_box, collision_box=(collision_box : Box) collision_box=, collisions?(entities : Array(Entity)) collisions?, draw draw, draw_box(box : Box, color = LibRay::WHITE) draw_box, draw_collision_box draw_collision_box, draw_collision_box? draw_collision_box?, draw_hit_box draw_hit_box, height : Int32 height, height=(height : Int32) height=, hit_box : Box hit_box, loc : Location loc, loc=(loc : Location) loc=, origin : Location origin, origin=(origin : Location) origin=, removed? removed?, update(_entities) update, update_to_camera(camera : Camera) update_to_camera, updates_to_camera(camera : Camera) updates_to_camera, viewable?(camera : Camera) viewable?, width : Int32 width, width=(width : Int32) width=, x x, x=(x) x=, y y, y=(y) y=

Constructor methods inherited from class Dungeon::Entity

new(loc : Location, width : Int32, height : Int32, collision_box : Box, hit_box : Box, tint : LibRay::Color = TINT_DEFAULT)
new(loc, width, height, collision_box : Box, tint = TINT_DEFAULT)
new(loc, width, height, tint = TINT_DEFAULT)
new

Constructor Detail

def self.new(loc : Location, room : Room, player : Player, animation_row = 0, animation_fps = 0) #

[View source]

Instance Method Detail

def chances #

[View source]
def collidable? #
Description copied from class Dungeon::Entity

used for checking for movement collisions


[View source]
def opened? : Bool #

[View source]
def pick_up #

[View source]