class Dungeon::Entity

Direct Known Subclasses

Defined in:

dungeon/entity.cr

Constant Summary

DRAW_COLLISION_BOXES = Game::DEBUG
TINT_DEFAULT = LibRay::WHITE

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.new(loc, width, height, collision_box : Box, tint = TINT_DEFAULT) #

[View source]
def self.new(loc, width, height, tint = TINT_DEFAULT) #

[View source]

Instance Method Detail

def bottom_layer? : Bool #

[View source]
def bump_damage #

[View source]
def centered? : Bool #

[View source]
def collidable? #

used for checking for movement collisions


[View source]
def collision?(entity : Entity, other_box : Box = entity.collision_box, own_box : Box = collision_box) #

[View source]
def collision_box : Box #

[View source]
def collision_box=(collision_box : Box) #

[View source]
def collisions?(entities : Array(Entity)) #

[View source]
def draw #

[View source]
def draw_box(box : Box, color = LibRay::WHITE) #

[View source]
def draw_collision_box #

[View source]
def draw_collision_box? #

[View source]
def draw_hit_box #

[View source]
def height : Int32 #

[View source]
def height=(height : Int32) #

[View source]
def hit_box : Box #

[View source]
def loc : Location #

[View source]
def loc=(loc : Location) #

[View source]
def origin : Location #

[View source]
def origin=(origin : Location) #

[View source]
def removed? #

[View source]
def update(_entities) #

[View source]
def update_to_camera(camera : Camera) #

[View source]
def updates_to_camera(camera : Camera) #

[View source]
def viewable?(camera : Camera) #

[View source]
def width : Int32 #

[View source]
def width=(width : Int32) #

[View source]
def x #

[View source]
def x=(x) #

[View source]
def y #

[View source]
def y=(y) #

[View source]