class JamWarmUp::Enemy

Defined in:

jam_warm_up/enemy.cr

Constant Summary

Color = SF::Color.new(255, 128, 255)
FlashColor = SF::Color.new(255, 64, 64)
FlashDuration = 25.milliseconds
FlashTimes = 3
MaxHealth = 100
Score = 100
Speed = -256

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 flash #

[View source]
def flash_timer : Timer #

[View source]
def health : Int32 #

[View source]
def score #

[View source]
def take_damage(damage) #

[View source]
def update(frame_time) #

[View source]