abstract class RPG::Character

Direct Known Subclasses

Defined in:

rpg/character.cr

Constant Summary

BodyColor = SF::Color.new(217, 160, 102)
ShadowSprite = "./assets/sprites/shadow.png"
Sheet = "./assets/sprites/player.png"
Speed = 320
SpriteHeight = 96
SpriteWidth = 64

Constructors

Instance Method Summary

Instance methods inherited from class RPG::Collidable

action action, area_radius area_radius, area_triggered? : Bool area_triggered?, check_area_triggered?(player : Player) check_area_triggered?, collision_height collision_height, collision_width collision_width, dialog_key : String dialog_key, draw(window : SF::RenderWindow) draw, jump(x : Float32 | Int32, y : Float32 | Int32) jump, jump_to_tile(col, row, tile_size) jump_to_tile, reset_area_triggered reset_area_triggered, size size, update(frame_time) update, x : Int32 | Float32 x, y : Int32 | Float32 y

Constructor methods inherited from class RPG::Collidable

new(x : Float32 | Int32 = 0, y : Float32 | Int32 = 0, dialog_key : String = "") new

Constructor Detail

def self.new(x = 0, y = 0, dialog_key = "") #

[View source]

Instance Method Detail

def add_animation(name, row, frames, fps_factor, loops, flip_horizontal = false) #

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

[View source]
def animations : GSF::Animations #

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

[View source]
def draw_shadow(window) #

[View source]
def init_animations #

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

[View source]
def shadow_sprite : SF::Sprite #

[View source]
def update(frame_time) #

[View source]