class MonsterMaze::Movable

Direct Known Subclasses

Defined in:

monster_maze/movable.cr

Constant Summary

Radius = Size // 2
Size = 64
Speed = 256

Constructors

Instance Method Summary

Constructor Detail

def self.new(row = 0, col = 0) #

[View source]

Instance Method Detail

def collides?(dx, dy, box : Box, box_x, box_y) #

[View source]
def collides?(dx, dy, circle : Circle, cx, cy) #

[View source]
def collides?(circle : Circle, cx, cy) #

[View source]
def collides?(dx, dy, movable : Movable) #

[View source]
def collides?(movable : Movable) #

[View source]
def collision_circle : Circle #

[View source]
def collision_cx #

[View source]
def collision_cy #

[View source]
def collision_radius #

[View source]
def collision_x #

[View source]
def collision_y #

[View source]
def cx #

[View source]
def cy #

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

[View source]
def dx : Int32 | Float32 #

[View source]
def dy : Int32 | Float32 #

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

[View source]
def jump_to_tile(row, col) #

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

[View source]
def move_with_collidable_tiles(tiles) #

[View source]
def move_with_level(level_width, level_height) #

[View source]
def move_with_movables(movables) #

[View source]
def moved? : Bool #

[View source]
def size #

[View source]
def speed #

[View source]
def update_movement(frame_time, speed = speed, level_width = 0, level_height = 0, collidable_tiles = [] of TileData, movables = [] of Movable) #

[View source]
def update_with_direction_and_speed(frame_time, speed) #

[View source]
def x : Int32 | Float32 #

[View source]
def y : Int32 | Float32 #

[View source]