class Escapist::MovableBlock

Direct Known Subclasses

Defined in:

escapist/movable_block.cr

Constant Summary

Color = SF::Color.new(153, 153, 153, 30)
IconMargin = 14
Key = "movable"
OutlineColor = SF::Color.new(102, 102, 102)
OutlineThickness = 4
TileSize = 128

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Escapist::BaseBlock

block : String block, block=(block : String) block=, collidable? collidable?, draw(window : SF::RenderWindow) draw

Constructor methods inherited from class Escapist::BaseBlock

new(pull : JSON::PullParser)
new(block : String, col = 0, row = 0)
new

Class methods inherited from class Escapist::BaseBlock

key key

Instance methods inherited from class Escapist::TileObj

area? area?, area_box area_box, area_entered area_entered, area_entered? area_entered?, area_exited area_exited, col : Int32 col, collidable? collidable?, collision_box collision_box, draw(window : SF::RenderWindow) draw, draw_offset draw_offset, draw_size draw_size, jump_to(col : Int32, row : Int32) jump_to, key key, movable? movable?, move(dx : Float32 | Int32, dy : Float32 | Int32) move, row : Int32 row, size size, type : String type, type=(type : String) type=, x x, y y

Constructor methods inherited from class Escapist::TileObj

new(pull : JSON::PullParser)
new(type : String = "block", col : Int32 = 0, row : Int32 = 0)
new(*, __pull_for_json_serializable pull : JSON::PullParser)
new

Class methods inherited from class Escapist::TileObj

cells_near(x, y) cells_near, draw_size draw_size, key key

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(col = 0, row = 0) #

[View source]

Class Method Detail

def self.key #

[View source]

Instance Method Detail

def draw(window : SF::RenderWindow) #

[View source]
def draw_icon(window) #

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

[View source]
def dx : Float32 | Int32 #

[View source]
def dy : Float32 | Int32 #

[View source]
def movable? #

[View source]
def move(dx : Float32 | Int32, dy : Float32 | Int32) #

[View source]
def x #

[View source]
def y #

[View source]