class EnemyBomb

Constants

AOE
COOLDOWN_DELAY
DAMAGE
INITIAL_DELAY
MAX_CURSOR_FOLLOW
MAX_SPEED
SPEED_INCREASE_FACTOR
STARTING_SPEED

Public Instance Methods

draw() click to toggle source
# File line-em-up/models/enemy_bomb.rb, line 19
def draw
  return draw_rot()
end
get_image() click to toggle source
# File line-em-up/models/enemy_bomb.rb, line 15
def get_image
  Gosu::Image.new("#{MEDIA_DIRECTORY}/bomb.png")
end
update(mouse_x = nil, mouse_y = nil, player = nil, scroll_factor = 1) click to toggle source
Calls superclass method Projectile#update
# File line-em-up/models/enemy_bomb.rb, line 24
def update mouse_x = nil, mouse_y = nil, player = nil, scroll_factor = 1
  vx = (self.class.get_starting_speed * @scale) * Math.cos(@angle * Math::PI / 180)

  vy =  (self.class.get_starting_speed * @scale) * Math.sin(@angle * Math::PI / 180)
  # Because our y is inverted
  vy = vy * -1

  @x = @x + vx
  @y = @y + vy

  super(mouse_x, mouse_y)
end