class Rover::Movable

Direct Known Subclasses

Defined in:

rover/movable.cr

Constant Summary

Acceleration = 80
Decceleration = 75
InitialSpeed = 3
MaxSpeed = 333
Sheet = "./assets/player.png"
SpriteFPS = 60
SpriteHeight = 96
SpriteWidth = 64

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

[View source]

Class Method Detail

def self.acceleration #

[View source]
def self.decceleration #

[View source]
def self.initial_speed #

[View source]
def self.max_speed #

[View source]
def self.sprite_fps #

[View source]
def self.sprite_height #

[View source]
def self.sprite_sheet #

[View source]
def self.sprite_width #

[View source]

Instance Method Detail

def acceleration #

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

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

[View source]
def decceleration #

[View source]
def disable #

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

[View source]
def dx : Float64 #

[View source]
def dy : Float64 #

[View source]
def enable #

[View source]
def enabled? : Bool #

[View source]
def hidden? : Bool #

[View source]
def hide #

[View source]
def initial_speed #

[View source]
def max_speed #

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

[View source]
def show(enable : Bool = true) #

[View source]
def speed : Float32 | Int32 #

[View source]
def sprite_fps #

[View source]
def sprite_height #

[View source]
def sprite_sheet #

[View source]
def sprite_width #

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

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

[View source]
def x : Float64 #

[View source]
def y : Float64 #

[View source]