class JamWarmUp::Player

Defined in:

jam_warm_up/player.cr

Constant Summary

FireDuration = 125.milliseconds
Speed = 640
SpriteFile = "./assets/player.png"

Constructors

Instance Method Summary

Instance methods inherited from class JamWarmUp::Ship

collision_box : CollisionBox collision_box, dead? : Bool dead?, die die, draw(window : SF::RenderWindow) draw, move(dx, dy) move, size size, sprite : SF::Sprite sprite, update(frame_time) update, x : Int32 | Float32 x, y : Int32 | Float32 y

Constructor methods inherited from class JamWarmUp::Ship

new(x : Float32 | Int32 = 0, y : Float32 | Int32 = 0, flip_horizontal = false, color = SF::Color::White) new

Class methods inherited from class JamWarmUp::Ship

size size

Constructor Detail

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

[View source]

Instance Method Detail

def bullets : Array(Bullet) #

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

[View source]
def fire_bullet #

[View source]
def fire_timer : Timer #

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

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

[View source]
def remove_dead_bullets #

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

[View source]
def update_firing(keys) #

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

[View source]