class Escapist::Cursor

Included Modules

Defined in:

escapist/cursor.cr

Constant Summary

Color = SF::Color.new(153, 0, 0, 25)
JumpSound = SF::SoundBuffer.from_file("./assets/cursor.wav")
JumpSoundPitchVariation = 0.13
JumpSoundVolume = 33
MovedDuration = 250.milliseconds
MoveDelayDuration = 150.milliseconds
MoveRepeatDelayDuration = 75.milliseconds
OutlineColor = SF::Color.new(153, 0, 0, 125)
OutlineThickness = 4
Size = 128

Constructors

Instance Method Summary

Instance methods inherited from module Escapist::ScaleHelpers

scale(new_min, new_max, min, max, x) scale

Constructor Detail

def self.new(col : Int32 = 0, row : Int32 = 0) #

[View source]

Instance Method Detail

def col : Int32 #

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

[View source]
def draw_cursor(window) #

[View source]
def get_d_col_row(keys, room_width, room_height) #

[View source]
def jump_sound : SF::Sound #

[View source]
def jump_to(col : Int32, row : Int32) #

[View source]
def just_moved? : Bool #

[View source]
def last_cursors : Array(Escapist::LastCursor) #

[View source]
def move_delay_timer : Timer #

[View source]
def move_repeat_delay_timer : Timer #

[View source]
def moved_timer : Timer #

[View source]
def row : Int32 #

[View source]
def size #

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

[View source]
def update_last_cursors #

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

[View source]
def x #

[View source]
def y #

[View source]