class

Escapist::Player

Inherits Reference < Object

Constants

Color = SF::Color.new(153, 0, 0, 30)
OutlineColor = SF::Color.new(153, 0, 0)
OutlineThickness = 4
PullRangeThreshold = 4
Radius = 64
Size = Radius * 2
Speed = 640
SprintDuration = 500.milliseconds
SprintSpeed = 1280
SprintWaitDuration = 300.milliseconds

Constructors

new(x : Float32 | Int32 = 0, y : Float32 | Int32 = 0)
Source

Instance methods

above_or_below_of_movable?(tile_obj : TileObj)
Source
actionable_checks(keys, room)
Source
area_checks(room)
Source
collision?(box : Box, dx = 0, dy = 0)
Source
draw(window : SF::RenderWindow)
Source
jump_to(x : Float32 | Int32, y : Float32 | Int32)
Source
left_or_right_of_movable?(tile_obj : TileObj)
Source
movable_collision?(tile_obj, box : Box, dx = 0, dy = 0)
Source
movable_collisions(tile_obj, dx, dy, room, collidables)
Source
movable_other_collisions(tile_obj, dx, dy, room, collidables)
Source
movable_speed(dx, dy)
Source
move(dx, dy)
Source
move_with_room(dx, dy, room)
Source
move_with_room_bounds(dx, dy, room)
Source
move_with_room_collisions(dx, dy, room)
Source
move_with_room_movables(dx, dy, room, collidables)
Source
move_with_speed(dx, dy, frame_time)
Source
pull_movables(dx, dy, room, keys)
Source
pullable(movables, dx, dy)
Source
pullable_down?(movable)
Source
pullable_left?(movable)
Source
pullable_right?(movable)
Source
pullable_up?(movable)
Source
size
Source
sprint_timer
Source
sprint_wait_timer
Source
sprinting?
Source
update(frame_time, keys : Keys, room)
Source
update_movement(frame_time, keys : Keys, room)
Source
update_sprinting(keys)
Source