class FogOfWar::Player

Defined in:

fog_of_war/player.cr

Constant Summary

Color = SF::Color.new(153, 0, 0, 30)
OutlineColor = SF::Color.new(153, 0, 0)
OutlineThickness = 4
Radius = 64
Size = Radius * 2
Speed = 640
VisibilityColor = SF::Color.new(127, 127, 127, 63)
VisibilityRadius = 256

Constructors

Instance Method Summary

Constructor Detail

def self.new(point : Point = {x: 0, y: 0}) #

[View source]

Instance Method Detail

def draw(window : SF::RenderWindow) #

[View source]
def draw_player(window) #

[View source]
def jump_to_point(point : Point) #

[View source]
def just_moved? : Bool? #

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

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

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

[View source]
def radius #

[View source]
def size #

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

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

[View source]
def visibility_radius #

[View source]
def x : Int32 | Float32 #

[View source]
def y : Int32 | Float32 #

[View source]