class GameSFTemplate::Player

Defined in:

game_sf_template/player.cr

Constant Summary

AnimationFPS = 8
Sheet = "./assets/player.png"
Size = 128
Speed = 640

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def animations : GSF::Animations #

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

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

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

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

[View source]
def size #

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

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

[View source]
def x : Int32 | Float32 #

[View source]
def y : Int32 | Float32 #

[View source]