class MonsterMaze::Spider

Defined in:

monster_maze/spider.cr

Constant Summary

AnimationFrames = 4
Speed = 448
SpriteSheet = "./assets/sprites/spider.png"

Instance Method Summary

Instance methods inherited from class MonsterMaze::Monster

add_animation(name, row, flip_horizontal = false, flip_vertical = false) add_animation, animation_frames animation_frames, animations : GSF::Animations animations, attack! attack!, attack_speed attack_speed, attacked? : Bool attacked?, attacking? : Bool attacking?, collision_radius collision_radius, damage damage, draw(window : SF::RenderWindow) draw, follow_player! follow_player!, follow_range?(player : Player) follow_range?, following? : Bool following?, init_animations init_animations, move_change_from_distance(p_value, value, p_dist, inner_threshold) move_change_from_distance, move_towards(p_cx, p_cy, p_dist, inner_threshold) move_towards, next_attack_timer : Timer next_attack_timer, play_animation play_animation, ready_to_attack? ready_to_attack?, speed speed, sprite_sheet sprite_sheet, stop_attacking! stop_attacking!, update(frame_time) update, update_following(frame_time, p_cx, p_cy, p_dist, collidable_tiles, movables) update_following

Constructor methods inherited from class MonsterMaze::Monster

new(row = 0, col = 0) new

Instance methods inherited from class MonsterMaze::Movable

collides?(dx, dy, box : Box, box_x, box_y)
collides?(dx, dy, circle : Circle, cx, cy)
collides?(circle : Circle, cx, cy)
collides?(dx, dy, movable : Movable)
collides?(movable : Movable)
collides?
, collision_circle : Circle collision_circle, collision_cx collision_cx, collision_cy collision_cy, collision_radius collision_radius, collision_x collision_x, collision_y collision_y, cx cx, cy cy, draw(window : SF::RenderWindow) draw, dx : Int32 | Float32 dx, dy : Int32 | Float32 dy, jump(x : Float32 | Int32, y : Float32 | Int32) jump, jump_to_tile(row, col) jump_to_tile, move(dx, dy) move, move_with_collidable_tiles(tiles) move_with_collidable_tiles, move_with_level(level_width, level_height) move_with_level, move_with_movables(movables) move_with_movables, moved? : Bool moved?, size size, speed speed, update_movement(frame_time, speed = speed, level_width = 0, level_height = 0, collidable_tiles = [] of TileData, movables = [] of Movable) update_movement, update_with_direction_and_speed(frame_time, speed) update_with_direction_and_speed, x : Int32 | Float32 x, y : Int32 | Float32 y

Constructor methods inherited from class MonsterMaze::Movable

new(row = 0, col = 0) new

Instance Method Detail

def animation_frames #

[View source]
def speed #

[View source]
def sprite_sheet #

[View source]