class Dungeon::Entity
- Dungeon::Entity
- Reference
- Object
Direct Known Subclasses
Defined in:
dungeon/entity.crConstant Summary
-
DRAW_COLLISION_BOXES =
Game::DEBUG
-
TINT_DEFAULT =
LibRay::WHITE
Constructors
- .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)
Instance Method Summary
- #bottom_layer? : Bool
- #bump_damage
- #centered? : Bool
-
#collidable?
used for checking for movement collisions
- #collision?(entity : Entity, other_box : Box = entity.collision_box, own_box : Box = collision_box)
- #collision_box : Box
- #collision_box=(collision_box : Box)
- #collisions?(entities : Array(Entity))
- #draw
- #draw_box(box : Box, color = LibRay::WHITE)
- #draw_collision_box
- #draw_collision_box?
- #draw_hit_box
- #height : Int32
- #height=(height : Int32)
- #hit_box : Box
- #loc : Location
- #loc=(loc : Location)
- #origin : Location
- #origin=(origin : Location)
- #removed?
- #update(_entities)
- #update_to_camera(camera : Camera)
- #updates_to_camera(camera : Camera)
- #viewable?(camera : Camera)
- #width : Int32
- #width=(width : Int32)
- #x
- #x=(x)
- #y
- #y=(y)
Constructor Detail
def self.new(loc : Location, width : Int32, height : Int32, collision_box : Box, hit_box : Box, tint : LibRay::Color = TINT_DEFAULT)
#