class Dungeon::Player
- Dungeon::Player
- Dungeon::LivingEntity
- Dungeon::Entity
- Reference
- Object
Defined in:
dungeon/player.crConstant Summary
-
FADED =
LibRay::Color.new(r: 255, g: 255, b: 255, a: 100)
-
INVINCIBLE_FLASH_INTERVAL =
(INVINCIBLE_TIME / INVINCIBLE_FLASHES) / 2
-
INVINCIBLE_FLASHES =
2
-
INVINCIBLE_TIME =
0.5
-
INVINCIBLE_TINT =
FADED
-
MAX_HIT_POINTS =
30
-
PLAYER_MOVEMENT =
200
Constructors
Instance Method Summary
- #add_arrow
- #add_bomb
- #add_key
- #after_hit_flash
- #arrows_left
- #bombs : Array(Bomb)
- #bombs_left : Int32
- #bombs_left?
- #bump(damage)
- #bump_detections(entities : Array(Entity))
-
#collidable?
used for checking for movement collisions
- #direction : Direction
- #direction=(direction : Direction)
- #draw
- #drawables
- #invincible?
- #invincible_flash(delta_t)
- #key?
- #keys_left : Int32
- #max_hit_points
- #move(entities)
- #pick_up(item : Item)
- #tint!(tint : LibRay::Color)
- #update(entities)
- #updates_to_camera(camera : Camera)
- #use_key
Instance methods inherited from class Dungeon::LivingEntity
after_hit_flash
after_hit_flash,
dead? : Bool
dead?,
death_fade(delta_t)
death_fade,
die
die,
draw_hit_points
draw_hit_points,
draw_hit_points?
draw_hit_points?,
heal(hit_points)
heal,
hit(damage = 0)
hit,
hit_flash(delta_t)
hit_flash,
hit_points : Int32
hit_points,
invincible?
invincible?,
max_hit_points
max_hit_points,
max_hit_points?
max_hit_points?,
removed?
removed?,
tint!(tint : LibRay::Color)
tint!,
tint_default : LibRay::Color
tint_default,
update(_entities)
update
Constructor methods inherited from class Dungeon::LivingEntity
new(loc : Location, width, height, collision_box : Box, hit_box : Box, tint_default : LibRay::Color = TINT_DEFAULT)
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
Instance Method Detail
def collidable?
#
Description copied from class Dungeon::Entity
used for checking for movement collisions