class Escapist::Player

Defined in:

escapist/player.cr

Constant Summary

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

Instance Method Summary

Constructor Detail

def self.new(x : Float32 | Int32 = 0, y : Float32 | Int32 = 0) #

[View source]

Instance Method Detail

def above_or_below_of_movable?(tile_obj : TileObj) #

[View source]
def actionable_checks(keys, room) #

[View source]
def area_checks(room) #

[View source]
def collision?(box : Box, dx = 0, dy = 0) #

[View source]
def draw(window : SF::RenderWindow) #

[View source]
def jump_to(x : Float32 | Int32, y : Float32 | Int32) #

[View source]
def left_or_right_of_movable?(tile_obj : TileObj) #

[View source]
def movable_collision?(tile_obj, box : Box, dx = 0, dy = 0) #

[View source]
def movable_collisions(tile_obj, dx, dy, room, collidables) #

[View source]
def movable_other_collisions(tile_obj, dx, dy, room, collidables) #

[View source]
def movable_speed(dx, dy) #

[View source]
def move(dx, dy) #

[View source]
def move_with_room(dx, dy, room) #

[View source]
def move_with_room_bounds(dx, dy, room) #

[View source]
def move_with_room_collisions(dx, dy, room) #

[View source]
def move_with_room_movables(dx, dy, room, collidables) #

[View source]
def move_with_speed(dx, dy, frame_time) #

[View source]
def pull_movables(dx, dy, room, keys) #

[View source]
def pullable(movables, dx, dy) #

[View source]
def pullable_down?(movable) #

[View source]
def pullable_left?(movable) #

[View source]
def pullable_right?(movable) #

[View source]
def pullable_up?(movable) #

[View source]
def size #

[View source]
def sprint_timer : Timer #

[View source]
def sprint_wait_timer : Timer #

[View source]
def sprinting? : Bool #

[View source]
def update(frame_time, keys : Keys, room) #

[View source]
def update_movement(frame_time, keys : Keys, room) #

[View source]
def update_sprinting(keys) #

[View source]
def x : Float32 | Int32 #

[View source]
def y : Float32 | Int32 #

[View source]